feat(models): add OrcaRouter as a named OpenAI-compatible provider - #2882
Closed
zsanig22-dotcom wants to merge 1 commit into
Closed
feat(models): add OrcaRouter as a named OpenAI-compatible provider#2882zsanig22-dotcom wants to merge 1 commit into
zsanig22-dotcom wants to merge 1 commit into
Conversation
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>
|
|
Collaborator
|
This PR has conflicts with the git fetch origin
git checkout feat/orcarouter-provider
git rebase origin/main
# resolve conflicts, then:
git push --force-with-leaseThis is a one-time reminder. Feel free to @mention me for a re-review after conflicts are resolved. Automated notification by github-manager-bot |
Collaborator
|
Thanks for your support, we are not considering it at the moment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentScope Java's
agentscope-extensions-model-openaialready ships OpenAI-compatible providers such as Kimi, MiniMax and DeepSeek viaModelRegistryids. This PR adds OrcaRouter the same way, mirroringcompat/kimi/compat/deepseek: anorcarouter:<model>provider (e.g.orcarouter:openai/gpt-5.5,orcarouter:orcarouter/auto) that defaults tohttps://api.orcarouter.ai/v1, readsORCAROUTER_API_KEY, and is registered throughServiceLoader. 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).https://api.orcarouter.ai/v1(orcarouter:openai/gpt-5.5) → HTTP 200.I'm an engineer on the OrcaRouter team. · Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter