Skip to content

feat: add OrcaRouter as a first-class model provider - #2624

Open
clementguarino06510-glitch wants to merge 1 commit into
kagent-dev:mainfrom
clementguarino06510-glitch:add-orcarouter-provider
Open

feat: add OrcaRouter as a first-class model provider#2624
clementguarino06510-glitch wants to merge 1 commit into
kagent-dev:mainfrom
clementguarino06510-glitch:add-orcarouter-provider

Conversation

@clementguarino06510-glitch

Copy link
Copy Markdown

This PR makes OrcaRouter a first-class model provider in kagent's ModelConfig, so kagent users can point their agents at OrcaRouter's gateway from the model form and kubectl the same way they already do for OpenAI or Anthropic. OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents: like OpenRouter, it exposes a provider/model namespace across many models, but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding OrcaRouter as a named provider means kagent users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.

The wiring mirrors the existing OpenAI provider end to end, since OrcaRouter speaks the OpenAI chat-completions wire format:

  • ModelConfig CRD (v1alpha2/v1alpha3): new OrcaRouter enum value, an OrcaRouterConfig block (base URL, temperature, maxTokens/maxCompletionTokens, topP, reasoningEffort, apiFormat, timeout), and the matching CEL XValidation so spec.orcaRouter is only accepted when provider: OrcaRouter.
  • ModelProviderConfig: default endpoint https://api.orcarouter.ai/v1.
  • Go ADK: an adk.OrcaRouter wire type, dispatch in CreateLLM, and NewOrcaRouterModelWithLogger which reads ORCAROUTER_API_KEY (or forwards the caller's bearer token under apiKeyPassthrough).
  • v2 compiler: translates provider: OrcaRouter into the ADK model, mounts the API-key Secret, and adds api.orcarouter.ai to the agent's network allowlist.
  • UI: OrcaRouter appears in the provider dropdown with its own icon and help links, backed by the discovery catalog's curated model list (orcarouter/auto and a few flagship models — the full catalog lives at https://www.orcarouter.ai/models).
  • Python ADK (kagent-adk): an orcarouter model type wired through the OpenAI-compatible client.

Validation:

  • Go: go build ./... for the touched packages, go vet, and unit tests pass for go/api/adk, go/api/client, go/core/internal/service/model (discovery catalog/provider list updated to 11 providers), go/core/v2/translator/..., and go/core/pkg/env.
  • UI: yarn typecheck and yarn lint pass (0 errors).
  • Live integration: exercised NewOrcaRouterModelWithLogger against the real gateway with ORCAROUTER_API_KEYPOST https://api.orcarouter.ai/v1/chat/completions with orcarouter/auto returned a 200 completion.

Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter

I'm an engineer on the OrcaRouter team.

Add OrcaRouter (an OpenAI-compatible AI gateway) as a named ModelConfig
provider, mirroring how the OpenAI provider is wired end to end:

- ModelConfig CRD (v1alpha2/v1alpha3): new OrcaRouter enum value,
  OrcaRouterConfig block, and CEL XValidation for the orcaRouter spec field.
- ModelProviderConfig: default endpoint https://api.orcarouter.ai/v1.
- Go ADK: new adk.OrcaRouter wire type, dispatch in CreateLLM, and
  NewOrcaRouterModelWithLogger reading ORCAROUTER_API_KEY.
- v2 compiler: translate ModelProviderOrcaRouter into adk.OrcaRouter, mount
  the API key secret, and allowlist api.orcarouter.ai for egress.
- Controller/UI: provider in the discovery catalog with curated models,
  provider definition, UI icon, provider info links, and mock fixtures.
- Python ADK: OrcaRouter model type wired through to the OpenAI-compatible
  client.
- Regenerated CRD manifests (go/api/config/crd + helm) and deepcopy.

Signed-off-by: clementguarino06510-glitch <clementguarino06510-glitch@users.noreply.github.com>
@github-actions github-actions Bot added the enhancement New feature or request label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant