feat: add OrcaRouter as an LLM provider - #128
Open
Marc-oss-hub wants to merge 1 commit into
Open
Conversation
Add OrcaRouter as a named provider in the Studio LLM picker and in the single-page export template (app/pg_export_crew.py), mirroring the existing LM Studio / Xai wiring. OrcaRouter is an OpenAI-compatible gateway at https://api.orcarouter.ai/v1 with namespaced model ids, so the provider uses ChatOpenAI with its base URL and the models are prefixed (orcarouter/auto, openai/gpt-5.5, anthropic/claude-sonnet-5). Includes ORCAROUTER_API_KEY in .env_example, the exported app's .env, and the README provider list. 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.
Overview
Adds OrcaRouter as a named LLM provider in CrewAI Studio's provider picker and in the single-page export template, mirroring the existing LM Studio and Xai wiring. OrcaRouter is an OpenAI-compatible model routing gateway that exposes models from OpenAI, Anthropic, Google and other providers behind one endpoint and one API key. 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.
What this adds
app/llms.py:ORCAROUTER_API_KEYin the env vars loaded from.env, a newcreate_orcarouter_llm()factory (ChatOpenAIpointed athttps://api.orcarouter.ai/v1), and anOrcaRouterentry inLLM_CONFIGwith namespaced model ids (orcarouter/auto,openai/gpt-5.5,anthropic/claude-sonnet-5).app/pg_export_crew.py: the samecreate_orcarouter_llm()factory andOrcaRouterentry in theEXPORT_LLMS_PYtemplate so exported single-page apps keep the provider, plus theORCAROUTER_API_KEYline in the generated.env..env_example: documentedORCAROUTER_API_KEY.README.md: OrcaRouter added to the supported providers list.Why a named provider
CrewAI Studio already ships named providers for OpenAI, Groq, Anthropic, Ollama, Grok and LM Studio, each with its own factory and env key. OrcaRouter is the same shape (an OpenAI-compatible gateway), so it gets a discoverable named slot in the dropdown instead of asking users to hand-edit an OpenAI-compatible base URL. The namespaced model ids matter here: the gateway rejects bare model names, so shipping
orcarouter/autoas the first preset makes the provider work out of the box.Files changed
app/llms.pycreate_orcarouter_llm+LLM_CONFIGentryapp/pg_export_crew.pyLLM_CONFIGentry + generated.envline.env_exampleORCAROUTER_API_KEYREADME.mdHow to use it
ORCAROUTER_API_KEYin your.env.OrcaRouterin the LLM provider dropdown.orcarouter/auto,openai/gpt-5.5oranthropic/claude-sonnet-5.Validation
python -m py_compile app/llms.py app/pg_export_crew.py— clean.pytest tests/test_tool_ids.py— 21 passed.create_orcarouter_llmpath (ChatOpenAIwith a realORCAROUTER_API_KEYagainsthttps://api.orcarouter.ai/v1):orcarouter/auto,openai/gpt-5.5andanthropic/claude-sonnet-5all returned model responses.I'm an engineer on the OrcaRouter team.