Skip to content

feat: add OrcaRouter as a built-in model provider - #434

Merged
Chenglong Wang (Chenglong-MS) merged 3 commits into
microsoft:devfrom
kuswardhanietidims-svg:add-orcarouter-provider
Aug 29, 2026
Merged

feat: add OrcaRouter as a built-in model provider#434
Chenglong Wang (Chenglong-MS) merged 3 commits into
microsoft:devfrom
kuswardhanietidims-svg:add-orcarouter-provider

Conversation

@kuswardhanietidims-svg

Copy link
Copy Markdown

Add OrcaRouter as a first-class model provider

Data Formulator's model picker and .env registry now support OrcaRouter, so you can plug the gateway in as a named provider — same as OpenAI, Azure, Anthropic, Gemini, or Ollama — instead of treating it as 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, and it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. 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.

The integration mirrors the existing ollama/openai wiring in Client (routes through LiteLLM with the provider's base URL) and registers orcarouter in the ModelRegistry built-in providers and the frontend provider dropdown. Set ORCAROUTER_ENABLED=true, ORCAROUTER_API_KEY, and ORCAROUTER_MODELS in .env (see .env.template) and the models appear alongside your other providers.

Verified locally: the backend suite passes (1991 tests, including new Client and ModelRegistry coverage), the frontend change is a trivial dropdown addition, and a live test against https://api.orcarouter.ai/v1 through the new Client(endpoint="orcarouter", …) path returned a completion (200) for orcarouter/auto.

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

I'm an engineer on the OrcaRouter team.

Add orcarouter to the built-in providers so Data Formulator users can
connect the OrcaRouter AI gateway from the model picker and via
ORCAROUTER_* environment variables, mirroring the existing ollama/openai
wiring. The client routes through LiteLLM's openai provider against the
OrcaRouter base URL, preserving the orcarouter/ model namespace.

Copilot AI left a comment

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.

Pull request overview

Adds OrcaRouter as a built-in OpenAI-compatible model provider.

Changes:

  • Registers OrcaRouter in backend and frontend provider lists.
  • Adds environment configuration and documentation.
  • Adds backend registry and client tests.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.env.template Documents OrcaRouter configuration.
README.md Updates supported providers.
py-src/data_formulator/agents/client_utils.py Configures OrcaRouter requests.
py-src/data_formulator/model_registry.py Registers the built-in provider.
src/views/ModelSelectionDialog.tsx Adds OrcaRouter to the model picker.
tests/backend/agents/test_client_utils.py Tests client configuration and model prefixing.
tests/backend/agents/test_model_registry.py Tests provider discovery and registry configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
- **v0.1.7** ([Demos](https://github.com/microsoft/data-formulator/releases/tag/0.1.7)): Dataset anchoring for cleaner workflows
- **v0.1.6** ([Demo](https://github.com/microsoft/data-formulator/releases/tag/0.1.6)): Multi-table support with automatic joins
- **Model Support**: OpenAI, Azure, Ollama, Anthropic via [LiteLLM](https://github.com/BerriAI/litellm) ([feedback](https://github.com/microsoft/data-formulator/issues/49))
- **Model Support**: OpenAI, Azure, Ollama, Anthropic, [OrcaRouter](https://www.orcarouter.ai) via [LiteLLM](https://github.com/BerriAI/litellm) ([feedback](https://github.com/microsoft/data-formulator/issues/49))
Comment thread py-src/data_formulator/agents/client_utils.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Chenglong-MS

Copy link
Copy Markdown
Collaborator

great work! merging it!

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

README.md:79

  • This model-support list is still incomplete: Gemini is a built-in provider in model_registry.py and appears in the provider dropdown, but is omitted here. Include it so the public documentation matches the supported providers.
- **Model Support**: OpenAI, Azure, Ollama, Anthropic, [OrcaRouter](https://www.orcarouter.ai) via [LiteLLM](https://github.com/BerriAI/litellm) ([feedback](https://github.com/microsoft/data-formulator/issues/49))

Comment on lines +285 to +286
if "/" not in model:
self.model = f"orcarouter/{model}"
@Chenglong-MS
Chenglong Wang (Chenglong-MS) merged commit a1bebf2 into microsoft:dev Aug 29, 2026
1 check passed
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.

3 participants