Skip to content

feat(models): add OrcaRouter as a named OpenAI-compatible provider - #2882

Closed
zsanig22-dotcom wants to merge 1 commit into
agentscope-ai:mainfrom
zsanig22-dotcom:feat/orcarouter-provider
Closed

feat(models): add OrcaRouter as a named OpenAI-compatible provider#2882
zsanig22-dotcom wants to merge 1 commit into
agentscope-ai:mainfrom
zsanig22-dotcom:feat/orcarouter-provider

Conversation

@zsanig22-dotcom

Copy link
Copy Markdown

Summary

AgentScope Java's agentscope-extensions-model-openai already ships OpenAI-compatible providers such as Kimi, MiniMax and DeepSeek via ModelRegistry ids. This PR adds OrcaRouter the same way, mirroring compat/kimi/compat/deepseek: an orcarouter:<model> provider (e.g. orcarouter:openai/gpt-5.5, orcarouter:orcarouter/auto) that defaults to https://api.orcarouter.ai/v1, reads ORCAROUTER_API_KEY, and is registered through ServiceLoader. 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 first-class provider means this project's 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.

Verification

  • mvn -pl agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-openai -am test → BUILD SUCCESS, 566 tests, 0 failures (includes new unit + e2e tests).
  • Live e2e against https://api.orcarouter.ai/v1 (orcarouter:openai/gpt-5.5) → HTTP 200.
  • EN + ZH docs and provider tables updated.

I'm an engineer on the OrcaRouter team. · Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter

Add an orcarouter:<model> provider to agentscope-extensions-model-openai,
mirroring the existing kimi/minimax/deepseek compat providers. OrcaRouter
exposes an OpenAI-compatible Chat Completions endpoint at
https://api.orcarouter.ai/v1, so the provider builds OpenAIChatModel
instances preconfigured for it, reads ORCAROUTER_API_KEY, and registers
through ServiceLoader. Native structured output defaults to disabled
because OrcaRouter routes across many upstream providers with varying
response_format support.

Includes unit tests, an e2e smoke test gated on ORCAROUTER_API_KEY, and
EN/ZH integration docs.

Co-Authored-By: Claude <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@oss-maintainer

Copy link
Copy Markdown
Collaborator

⚠️ Merge conflict detected

This PR has conflicts with the main branch and cannot be merged. Please rebase or merge main into your branch and resolve the conflicts:

git fetch origin
git checkout feat/orcarouter-provider
git rebase origin/main
# resolve conflicts, then:
git push --force-with-lease

This is a one-time reminder. Feel free to @mention me for a re-review after conflicts are resolved.


Automated notification by github-manager-bot

@jujn

jujn commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Thanks for your support, we are not considering it at the moment

@jujn jujn closed this Sep 12, 2026
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.

4 participants