Skip to content

Add OrcaRouter provider preset to the setup wizard - #138

Open
XiaoHuo888-hue wants to merge 1 commit into
Lazarus-AI:mainfrom
XiaoHuo888-hue:add-orcarouter-provider
Open

Add OrcaRouter provider preset to the setup wizard#138
XiaoHuo888-hue wants to merge 1 commit into
Lazarus-AI:mainfrom
XiaoHuo888-hue:add-orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Adds OrcaRouter as a model provider. OrcaRouter is an OpenAI-compatible model routing gateway that exposes 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax, xAI and others behind a single endpoint and API key. It also provides gateway-level security controls for AI agents.

I'm an engineer on the OrcaRouter team.

What this changes

  • clearwing/providers/catalog.py: registers the orcarouter preset in PROVIDER_PRESETS (base URL https://api.orcarouter.ai/v1, auth via ORCAROUTER_API_KEY, openai adapter, anthropic/claude-sonnet-4.6 default model).
  • clearwing/ui/commands/setup.py: documents clearwing setup --provider orcarouter in the --provider help text.
  • tests/test_setup_and_doctor.py: unit test covering the preset's key fields and the OpenAI-compat flag.
  • docs/providers.md, README.md, docs/cli.md: provider docs alongside the existing OpenRouter coverage.

Why a named provider rather than the generic OpenAI-compatible endpoint

This mirrors how OpenRouter is already wired in this repo. A named preset carries the correct base URL, adapter, env-var name and model defaults, so the setup wizard, doctor and docs stay consistent for users instead of relying on the custom-endpoint escape hatch.

How to use it

  1. Get an API key at https://www.orcarouter.ai (keys start with sk-orca-).
  2. Set ORCAROUTER_API_KEY.
  3. Run clearwing setup --provider orcarouter, pick "OrcaRouter" from the wizard menu, or set CLEARWING_BASE_URL=https://api.orcarouter.ai/v1 with a model such as anthropic/claude-sonnet-4.6.

Verification

  • Unit tests: tests/test_setup_and_doctor.py 34 passed, tests/test_providers.py + tests/test_providers_env.py 63 passed (97 total). ruff check reports no new errors versus main.
  • Live API: exercised the real library path with a real key. preset_by_key("orcarouter") resolves correctly, and AsyncLLMClient (provider openai, base URL https://api.orcarouter.ai/v1) returns 200 PONG for both anthropic/claude-sonnet-4.6 and orcarouter/auto. An invalid key fails loudly with HTTP 401.
  • Ran locally: python -m pytest tests/test_setup_and_doctor.py tests/test_providers.py tests/test_providers_env.py and the L3 live script against the real API.

OrcaRouter is an OpenAI-compatible multi-model gateway (190+ models,
one key). Registering it as a named preset in the shared provider
catalog mirrors how OpenRouter is wired here, so the wizard menu, the
`--provider orcarouter` shortcut, doctor checks, and the docs all stay
consistent. A named provider beats the generic OpenAI-compatible
catch-all because the preset carries the correct base URL, adapter,
and model defaults with no guesswork.

Adds the catalog entry, a unit test for the preset fields, and docs
sections in providers.md / README.md / cli.md alongside the existing
OpenRouter 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