feat: add OrcaRouter as a named provider - #76
Open
Marc-oss-hub wants to merge 1 commit into
Open
Conversation
Add OrcaRouter (https://www.orcarouter.ai) as a first-class provider, mirroring the OpenRouter entry: - provider catalogue: ProviderInfo(id="orcarouter", litellm_prefix "orcarouter", env ORCAROUTER_API_KEY) with a static starter model list - config: _PROVIDER_ENV tuple so the gateway API key is injected for litellm - llm: normalize_litellm_model() routes orcarouter/<model> through the openai provider with api_base https://api.orcarouter.ai/v1 (litellm has no built-in orcarouter provider); applied in stream(), count_tokens(), and model_context_limits() - api: normalize the model in the sync _run_turn litellm path - tests: provider registration, env tuple, and model-normalization coverage Co-Authored-By: Claude <noreply@anthropic.com>
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
Adds OrcaRouter as a first-class named provider, mirroring the existing OpenRouter entry. OrcaRouter is an OpenAI-compatible model gateway exposing 190+ frontier and open models behind namespaced model IDs (e.g.
openai/gpt-5.5,z-ai/glm-5.2).Changes
openvibe/provider/provider.py— newProviderInfo(id="orcarouter", name="OrcaRouter", litellm_prefix="orcarouter", env_key="ORCAROUTER_API_KEY")with a static starter model list (GPT-5.5, Claude Opus 4.8, GLM-5.2, DeepSeek V4 Pro, Gemini 3.1 Flash Lite).openvibe/config.py—_PROVIDER_ENVtuple so the configured API key is injected asORCAROUTER_API_KEYfor litellm.openvibe/llm.py— newnormalize_litellm_model()that routesorcarouter/<model>through litellm'sopenaiprovider withapi_base=https://api.orcarouter.ai/v1(litellm has no built-inorcarouterprovider). Applied inLiteLLMBackend.stream(),count_tokens(), andmodel_context_limits().openvibe/api.py— same normalization in the sync_run_turnlitellm path.tests/test_provider.py— new tests for the provider registration, the env tuple, and the model-normalization helper.Why
OpenRouter and OrcaRouter both work through litellm, and OrcaRouter gives openvibe users the same "one key, hundreds of models" workflow with an identical OpenAI-compatible protocol — no code changes beyond the provider registration. 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.
How to use
openvibe provider addand pick OrcaRouter (or setORCAROUTER_API_KEY)orcarouter/openai/gpt-5.5)Verification
pytest tests/test_provider.py tests/test_config.py— 30 passedLiteLLMBackend.stream()with modelorcarouter/openai/gpt-5.5→ OrcaRouter returned the expected completion over the streaming connection.I'm an engineer on the OrcaRouter team.