Skip to content

OrcaRouter provider support for Octocode #87

Open

Description

Octocode takes a different angle from most MCP tooling: the graphrag tool builds its symbol graph lazily from the current source tree via tree-sitter — no index, no embeddings, no LLM — so contains / imports / calls / extends / implements relationships stay correct even with [graphrag].enabled = false. For a Cursor or Claude Desktop user asking who calls refund.rs, that guarantee is the point.

That makes the optional LLM layer worth a second look: Octocode reaches for a model only for commit messages, code review, and persisted GraphRAG descriptions — never for the symbol graph — so a flaky provider degrades enrichment, not correctness. Today that layer resolves through ProviderFactory::get_provider_for_model in octolib over openrouter:, openai:, anthropic:, google:, deepseek:, and the local: escape hatch, with credentials from environment variables.

I'd like to propose OrcaRouter as an additional optional provider prefix — nothing existing would be removed, replaced, or changed in behavior.

OrcaRouter exposes an OpenAI-compatible API and uses standard API-key authentication (ORCAROUTER_API_KEY) against https://api.orcarouter.ai/v1. Since src/llm/mod.rs already delegates provider construction to octolib's ProviderFactory and drives everything through the AiProvider trait, the natural shape is a sibling implementation registered there rather than anything octocode-side. I understand from AGENTS.md that providers belong in the octolib repo and that new config options need a matching entry in config-templates/default.toml.

Two capabilities seem most relevant to Octocode's users specifically:

  • Automatic routing and failover. With orcarouter/auto, each prompt is graded and sent to a model clearing a configured quality bar, with a fallback chain that retries against healthy capacity before the response starts. For an enrichment pass that batches many file descriptions, that removes the manual "which cheap model is up right now" tuning.
  • Usage tracking and budgets. Per-request logs with grade, model, latency, and cost, plus spend caps and scoped keys — useful for attributing the optional LLM spend when Octocode runs across a team's repositories.

There is prior art to compare against: a merged promptfoo provider with docs, a Dify Marketplace plugin, goose's declarative OpenAI-compatible providers, and RAGFlow via its open-source program.

I'm an engineer on the OrcaRouter team, so full transparency: we run an optional open-source partner program where approved projects can receive a 5% revenue share from OrcaRouter usage attributed to their integration. It is not a condition of integrating, and I'm happy to follow whatever disclosure or governance rules this project prefers. Details: https://www.orcarouter.ai/built-with.

Would you be open to an OrcaRouter provider? If it fits your roadmap, I'm glad to open a PR against octolib following your contributing guide — and I'd welcome your input on whether it should be a first-class prefix or folded into your existing OpenAI-compatible handling.

Activity

  1. donk8r commented on Sep 11, 2026

    @donk8r
    Member

    Hey. Thanks for suggestions. It may be a great fit. If you can open PR would be great. Just let me know. I will review it and merge shortly with release afterwards. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions