Gracker / Gracker/SmartPerfetto
[Feature]: OrcaRouter provider support for SmartPerfetto
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 692
- Forks
- 119
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 22
Description
Problem Statement
SmartPerfetto gives Android performance engineers a natural-language layer over Perfetto trace analysis that still lands on evidence: load a .pftrace, ask "Why is startup slow?", and get SQL-backed findings, Skill outputs, and root-cause reasoning. Keeping the deterministic YAML Skill outputs separate from the timeline facts is what makes those conclusions trustworthy enough to act on.
The design already treats models as a pluggable choice. Provider Manager stores per-provider Base URLs and API keys, and the runtime adapters in backend/src/agentRuntime (Claude Agent SDK, OpenAI Agents SDK, Pi Agent Core, OpenCode, Qoder) accept documented presets over both Claude-compatible and OpenAI-compatible endpoints. Because each analysis round is billed per upstream model, the flexibility users want is more endpoints to choose among.
Proposed Solution
I'm an engineer on the OrcaRouter team, and I'd like to propose adding OrcaRouter as an optional provider. It would not replace or change any existing provider, .env block, or Provider Manager profile.
OrcaRouter exposes an OpenAI-compatible API and uses standard API-key authentication, so it maps onto SmartPerfetto's provider abstraction without a new runtime. The expected integration point is a third-party provider preset or Provider Manager custom provider on the OpenAI Agents SDK side, using the OPENAI_BASE_URL / OPENAI_API_KEY / OPENAI_MODEL / OPENAI_LIGHT_MODEL wiring already documented for OpenAI-compatible gateways. This is a proposal only; no code has been written or tested here.
A few capabilities seem most relevant to SmartPerfetto users:
- One OpenAI-compatible endpoint exposing many chat and reasoning models, so switching the model behind
smp runor the AI Assistant is a config change rather than a new provider setup. - Automatic model routing and provider failover, so a transient upstream error does not stall a batch, regression, or long agentic session.
- Usage tracking and budgets, which fit teams running the CLI or HTTP/SSE API in CI where every round is already billed per model.
- Prompt caching, so repeated SQL/Skill context across follow-up questions can lower cost on long investigations.
Alternatives Considered
OrcaRouter is already used by open-source projects such as RAGFlow, Dify, promptfoo, and OpenCode; integrations are listed at https://www.orcarouter.ai/built-with. Users who prefer the existing documented presets (DeepSeek, GLM, Qwen, and others) would keep using those unchanged.
Additional Context
Disclosure: OrcaRouter runs an optional open-source partner program under which approved OSS projects can receive a 5% revenue share from OrcaRouter usage attributed to their integration. Participation is not a prerequisite for the integration, and I would follow SmartPerfetto's disclosure and governance requirements if maintainers want to discuss it. If this sounds useful, I welcome maintainers' views and, with approval, would be glad to submit an implementation PR against main.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Provider Manager and the OpenAI Agents SDK side of backend/src/agentRuntime, then review the documented OPENAI_BASE_URL, OPENAI_API_KEY, OPENAI_MODEL, and OPENAI_LIGHT_MODEL wiring. Done means OrcaRouter can be selected as an optional OpenAI-compatible provider without changing existing providers, environment blocks, or profiles; the proposal does not name a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100