Skip to content

feat: add orcarouter as a built-in model provider - #898

Open
clementguarino06510-glitch wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
clementguarino06510-glitch:clementguarino06510-glitch/feat/897-add-orcarouter-provider
Open

feat: add orcarouter as a built-in model provider#898
clementguarino06510-glitch wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
clementguarino06510-glitch:clementguarino06510-glitch/feat/897-add-orcarouter-provider

Conversation

@clementguarino06510-glitch

Copy link
Copy Markdown

📋 Summary

This PR adds OrcaRouter as a built-in model provider, fully parallel to the existing OpenRouter wiring. Data Designer is a framework for generating high-quality synthetic datasets, and its model configs already ship NVIDIA, OpenAI, and OpenRouter as first-class providers; OrcaRouter now joins them as a named orcarouter provider instead of being used through an anonymous custom base URL.

OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding orcarouter as a first-class provider means this project's users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. 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.

🔗 Related Issue

Fixes #897

🔄 Changes

The change mirrors the existing openrouter provider block-for-block across the same files:

  • packages/data-designer-config/src/data_designer/config/utils/constants.py

    • Adds ORCAROUTER_PROVIDER_NAME = "orcarouter" and ORCAROUTER_API_KEY_ENV_VAR_NAME = "ORCAROUTER_API_KEY" next to their OPENROUTER_* counterparts.
    • Registers orcarouter in PREDEFINED_PROVIDERS with endpoint=https://api.orcarouter.ai/v1, provider_type="openai", and api_key=ORCAROUTER_API_KEY — the exact shape of the openrouter entry.
    • Adds an ORCAROUTER_PROVIDER_NAME block to PREDEFINED_PROVIDERS_MODEL_MAP with orcarouter-text, orcarouter-reasoning, orcarouter-vision, and orcarouter-embedding aliases, mirroring the openrouter key.
  • packages/data-designer-config/tests/config/test_default_model_settings.py

    • Updates the builtin counts (3 → 4 providers, 12 → 16 model configs) and asserts the new orcarouter provider + aliases, exactly as the openrouter assertions are written.
  • Docs

    • README.md — adds OrcaRouter to the default providers list and the ORCAROUTER_API_KEY env var example.
    • fern/versions/latest/pages/concepts/models/default-model-settings.mdx — adds the OrcaRouter provider section and OrcaRouter models table (mirroring the OpenRouter sections), plus the env-var mentions in the API-key warning/tip.
    • fern/versions/latest/pages/index.mdx, concepts/models/model-providers.mdx, and concepts/models/custom-model-settings.mdx — mention OrcaRouter alongside the existing default providers.

Models chosen

Each alias was validated against OrcaRouter's live model catalog (all return HTTP 200 through the new provider wiring):

Alias Model Modality
orcarouter-text openai/gpt-4.1 text
orcarouter-reasoning deepseek/deepseek-v4-pro-0813 reasoning
orcarouter-vision openai/gpt-4o vision (verified with an image input)
orcarouter-embedding openai/text-embedding-3-large embeddings (3072-dim)

🧪 Testing

  • make check-all-fix equivalent: ruff check and ruff format --check pass across all three packages.
  • pytest packages/data-designer-config/tests/ → 644 passed.
  • pytest packages/data-designer-engine/tests/engine/models/test_facade.py → 91 passed (OpenRouter-specific attribution tests unaffected).
  • L3 live test: exercised the new orcarouter provider through the real ModelFacadecreate_model_client path (ModelProviderRegistry + EnvironmentResolver) against api.orcarouter.ai:
    • orcarouter-text chat → 200, returned hello
    • orcarouter-reasoning chat → 200, returned hello
    • orcarouter-embedding200, 3072-dim vector
  • Note: 6 pre-existing test failures in the full suite (make test) are sandbox-environment artifacts (the make binary and tiktoken cache are unavailable) and fail identically on the pristine baseline.

✅ Checklist

  • Follows commit message conventions
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

I'm an engineer on the OrcaRouter team.

Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter

Add orcarouter to PREDEFINED_PROVIDERS and PREDEFINED_PROVIDERS_MODEL_MAP,
mirroring the existing openrouter wiring, with pre-configured aliases for
text, reasoning, vision, and embedding. Update the default-model-settings
docs and README quick-start so the new provider is discoverable.

Fixes NVIDIA-NeMo#897
@clementguarino06510-glitch
clementguarino06510-glitch requested a review from a team as a code owner August 30, 2026 03:44
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@github-actions

Copy link
Copy Markdown
Contributor

Linked Issue Check

Issue #897 has not been triaged yet. A maintainer needs to review
the issue and add the triaged label before this PR can be merged.

You can continue working on the PR in the meantime. The check will
re-run automatically once the issue is triaged.

@clementguarino06510-glitch

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds OrcaRouter as an OpenAI-compatible built-in provider with text, reasoning, vision, and embedding aliases, along with tests and user documentation.

  • Registers the OrcaRouter endpoint and API-key environment variable.
  • Adds four predefined OrcaRouter model configurations.
  • Documents provider setup and updates built-in configuration expectations.

Confidence Score: 4/5

The upgrade path should be fixed before merging because existing installations will not receive the newly advertised built-in OrcaRouter provider or aliases.

Default settings are only seeded when their files are absent, while existing files are loaded without merging current built-ins, leaving upgraded users unable to resolve the new provider and aliases.

Files Needing Attention: packages/data-designer-config/src/data_designer/config/utils/constants.py and the default-settings initialization/loading path

Important Files Changed

Filename Overview
packages/data-designer-config/src/data_designer/config/utils/constants.py Adds the OrcaRouter provider and model aliases, but the persisted-default lifecycle prevents existing installations from receiving them.
packages/data-designer-config/tests/config/test_default_model_settings.py Updates fresh built-in counts and validates the new provider and aliases, without covering upgrade behavior for existing settings files.
fern/versions/latest/pages/concepts/models/default-model-settings.mdx Documents the OrcaRouter provider, aliases, endpoint, and required API-key environment variable.
README.md Adds OrcaRouter to the provider setup instructions.
Prompt To Fix All With AI
### Issue 1
packages/data-designer-config/src/data_designer/config/utils/constants.py:333-339
**Built-ins bypass existing settings**

When an existing installation already has `model_configs.yaml` and `model_providers.yaml`, initialization neither rewrites nor merges those files, so the new OrcaRouter provider and aliases are never registered; selecting `orcarouter-text` then fails with a missing-model or unknown-provider error.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat: add orcarouter as a built-in model..." | Re-trigger Greptile

Comment on lines 333 to +339
"provider_type": "openai",
"api_key": OPENROUTER_API_KEY_ENV_VAR_NAME,
},
{
"name": ORCAROUTER_PROVIDER_NAME,
"endpoint": "https://api.orcarouter.ai/v1",
"provider_type": "openai",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Built-ins bypass existing settings

When an existing installation already has model_configs.yaml and model_providers.yaml, initialization neither rewrites nor merges those files, so the new OrcaRouter provider and aliases are never registered; selecting orcarouter-text then fails with a missing-model or unknown-provider error.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/data-designer-config/src/data_designer/config/utils/constants.py
Line: 333-339

Comment:
**Built-ins bypass existing settings**

When an existing installation already has `model_configs.yaml` and `model_providers.yaml`, initialization neither rewrites nor merges those files, so the new OrcaRouter provider and aliases are never registered; selecting `orcarouter-text` then fails with a missing-model or unknown-provider error.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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.

Add OrcaRouter as a built-in model provider

1 participant