Skip to content

feat: add WorldRouter as an OpenAI-compatible provider - #448

Open
Opgeek-1 wants to merge 1 commit into
ifixai-ai:mainfrom
Opgeek-1:feat/worldrouter-provider
Open

Opgeek-1 wants to merge 1 commit into
ifixai-ai:mainfrom
Opgeek-1:feat/worldrouter-provider

Conversation

@Opgeek-1

@Opgeek-1 Opgeek-1 commented Dec 2, 2026 •

Copy link
Copy Markdown

Adds WorldRouter as a named OpenAI-compatible provider, next to OpenRouter, OrcaRouter, Requesty and LLMTR (#441).

WorldRouter is an OpenAI-compatible gateway at https://inference-api.worldrouter.ai/v1: one key for Claude, GPT, Gemini, DeepSeek, GLM and other models. Create a key at https://www.worldrouter.ai/dashboard/api-keys. Model IDs are bare names such as claude-sonnet-5-5 or deepseek-v4-flash (list: https://www.worldrouter.ai/models).

Changes

  • ifixai/providers/worldrouter.py: WorldRouterProvider, the same shape as LLMTRProvider (cached AsyncOpenAI client, max_tokens ceiling, json_object on judge calls with the existing free-text fallback, same error mapping). config.endpoint still overrides the base URL. Default model claude-sonnet-5-5.
  • Registered everywhere a provider is named: resolver (REGISTERED_PROVIDERS, provider map, WORLDROUTER_API_KEY), CLI --provider choices, setup wizard and description, init key detection, model catalog default and suggestions, pip install ifixai[worldrouter] extra, docs/cli.md and the provider table in docs/testing-your-agent.md.
  • grading_vendor: WorldRouter is listed as an aggregator. Because its model IDs have no vendor/ prefix, the vendor is taken from the family before the first dash (claude-sonnet-5-5 → anthropic, gemini-… → google, gpt-… → openai, deepseek-… → deepseek), so a Claude system under test routed through WorldRouter and an Anthropic judge are still reported as same-vendor. Prefixed IDs keep the existing path.
  • As with the other gateways, a WORLDROUTER_API_KEY alone never auto-selects a judge; pass --judge-provider worldrouter to use it that way.

Test plan

  • pytest ifixai/tests/providers/test_worldrouter_registration.py ifixai/tests/test_sdk_pool_teardown.py ifixai/tests/test_sdk_timeout_native.py: 97 passed (9 new registration tests, plus WorldRouter in the shared timeout and pool-teardown parametrizations).
  • Full suite pytest -m "not acceptance" ifixai/tests with all extras installed: 4092 passed, 6 skipped.
  • ruff check on the touched Python files: passes.
  • Live calls with a real key through resolve_provider("worldrouter").send_message, for claude-sonnet-5-5, deepseek-v4-flash and deepseek-v4-pro: a plain system-under-test reply, and a judge call with json_output=True, seed, reject_truncated=True that returned a parseable {"verdict": …}. 6/6 passed.

Disclosure: I work on WorldRouter.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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