Add OrcaRouter provider preset to the setup wizard - #138
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
Conversation
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>
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.
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 theorcarouterpreset inPROVIDER_PRESETS(base URLhttps://api.orcarouter.ai/v1, auth viaORCAROUTER_API_KEY,openaiadapter,anthropic/claude-sonnet-4.6default model).clearwing/ui/commands/setup.py: documentsclearwing setup --provider orcarouterin the--providerhelp 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
sk-orca-).ORCAROUTER_API_KEY.clearwing setup --provider orcarouter, pick "OrcaRouter" from the wizard menu, or setCLEARWING_BASE_URL=https://api.orcarouter.ai/v1with a model such asanthropic/claude-sonnet-4.6.Verification
tests/test_setup_and_doctor.py34 passed,tests/test_providers.py+tests/test_providers_env.py63 passed (97 total).ruff checkreports no new errors versus main.preset_by_key("orcarouter")resolves correctly, andAsyncLLMClient(provideropenai, base URLhttps://api.orcarouter.ai/v1) returns 200PONGfor bothanthropic/claude-sonnet-4.6andorcarouter/auto. An invalid key fails loudly with HTTP 401.python -m pytest tests/test_setup_and_doctor.py tests/test_providers.py tests/test_providers_env.pyand the L3 live script against the real API.