Skip to content

feat: add OrcaRouter as a named LLM provider - #1194

Open
JinhaoSong322 wants to merge 1 commit into
agentscope-ai:mainfrom
JinhaoSong322:add-orcarouter-provider
Open

feat: add OrcaRouter as a named LLM provider#1194
JinhaoSong322 wants to merge 1 commit into
agentscope-ai:mainfrom
JinhaoSong322:add-orcarouter-provider

Conversation

@JinhaoSong322

Copy link
Copy Markdown

Summary

Add OrcaRouter as a named LLM provider option for AgentTeams, mirroring the existing qwen / openai-compat named-provider wiring.

OrcaRouter is a unified AI gateway that exposes an OpenAI-compatible API at https://api.orcarouter.ai/v1. Setting AGENTTEAMS_LLM_PROVIDER=orcarouter (or credentials.llmProvider=orcarouter) routes the Manager and Workers through a single OrcaRouter API key across models. 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.

What changed

  • manager/scripts/init/setup-higress.sh — new orcarouter provider branch: registers the api.orcarouter.ai DNS service source and creates the Higress AI provider (type=openai, openaiCustomUrl=https://api.orcarouter.ai/v1), plus the default LLM_API_URL.
  • manager/scripts/init/start-manager-agent.sh — same provider setup for the embedded/K8s bootstrap path.
  • agentteams-controller/internal/initializer/initializer.go — new orcarouter case that registers the service source and creates the gateway provider.
  • agentteams-controller/cmd/agt/llm_preflight.goorcarouter resolves to https://api.orcarouter.ai/v1 by default in the LLM preflight probe.
  • agentteams-controller/cmd/agt/llm_preflight_test.go — test asserting the orcarouter default base URL.
  • install/agentteams-install.ps1 — third provider option in the interactive installer (OrcaRouter), with default model orcarouter/auto; New-OpenAICompatProvider now accepts a provider name.
  • helm/agentteams/values.yaml — updated llmProvider comment.
  • README.md / README.zh-CN.md / README.ja-JP.md / install/README.md — OrcaRouter usage documentation.

Verification

  • go build ./cmd/agt/... ./internal/initializer/... — clean
  • go test ./cmd/agt/... — pass (including new TestResolveLLMPreflightConfigDefaultsOrcaRouter)
  • gofmt -l — clean on edited Go files
  • bash -n — clean on both edited shell scripts
  • L3 live test — a real request to https://api.orcarouter.ai/v1/chat/completions with orcarouter/auto returned HTTP 200

Disclosure: I'm an engineer on the OrcaRouter team.

Signed-off-by: JinhaoSong322 <jinhao.song@myflashcloud.com>

@oss-maintainer oss-maintainer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Adds OrcaRouter as a named OpenAI-compatible LLM provider (orcarouter), mirroring the existing qwen/openai-compat wiring across the controller initializer, bootstrap scripts, LLM preflight probe, PowerShell installer, and docs. Overall a clean, consistent addition with no breaking config/env changes or Helm upgrade concerns.

Findings

  • [Warning] manager/scripts/init/start-manager-agent.sh:444 — k8s-mode orcarouter branch references orcarouter.dns without registering the DNS service source first (low practical impact, see inline comment).

Suggestions

In the k8s-mode Higress setup branch, register the DNS service source for api.orcarouter.ai before creating the AI provider, mirroring what the controller initializer and setup-higress.sh already do.


Automated review by github-manager-bot

'{"type":"qwen","name":"qwen","tokens":["'"${AGENTTEAMS_LLM_API_KEY}"'"],"protocol":"openai/v1","tokenFailoverConfig":{"enabled":false},"rawConfigs":{"qwenEnableSearch":false,"qwenEnableCompatible":true,"qwenFileIds":[],"agentteamsMode":true}}'
;;
orcarouter)
# OrcaRouter: OpenAI-compatible gateway (https://www.orcarouter.ai)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The k8s-mode orcarouter branch creates an AI provider that references orcarouter.dns but never registers the DNS service source for api.orcarouter.ai. Mirroring the controller initializer or setup-higress.sh, it should call the Higress service-sources API (or reuse a registered source) before creating the provider. Note: this block is only reached when _HIGRESS_CONSOLE_URL is set, which is empty in standard k8s mode, so the practical impact is low.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants