Skip to content

feat: add OrcaRouter as a named provider - #76

Open
Marc-oss-hub wants to merge 1 commit into
vitalops:mainfrom
Marc-oss-hub:feat/orcarouter-provider
Open

feat: add OrcaRouter as a named provider#76
Marc-oss-hub wants to merge 1 commit into
vitalops:mainfrom
Marc-oss-hub:feat/orcarouter-provider

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

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 — new ProviderInfo(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_ENV tuple so the configured API key is injected as ORCAROUTER_API_KEY for litellm.
  • openvibe/llm.py — new normalize_litellm_model() that routes orcarouter/<model> through litellm's openai provider with api_base=https://api.orcarouter.ai/v1 (litellm has no built-in orcarouter provider). Applied in LiteLLMBackend.stream(), count_tokens(), and model_context_limits().
  • openvibe/api.py — same normalization in the sync _run_turn litellm 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

  1. openvibe provider add and pick OrcaRouter (or set ORCAROUTER_API_KEY)
  2. Choose a namespaced model (e.g. orcarouter/openai/gpt-5.5)

Verification

  • pytest tests/test_provider.py tests/test_config.py — 30 passed
  • End-to-end: LiteLLMBackend.stream() with model orcarouter/openai/gpt-5.5 → OrcaRouter returned the expected completion over the streaming connection.

I'm an engineer on the OrcaRouter team.

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>
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.

1 participant