feat(llm): add OrcaRouter as a named LLM provider - #6687
Open
Marc-oss-hub wants to merge 1 commit into
Open
Conversation
Adds OrcaRouter (https://www.orcarouter.ai) as a first-class named provider across the shared LLM client and the client-side summarization chain, mirroring the existing OpenRouter wiring: - server/_shared/llm.ts: 'orcarouter' in the LlmProviderName union and getProviderCredentials (base URL https://api.orcarouter.ai/v1/chat/completions, ORCAROUTER_API_KEY, default deepseek/deepseek-v4-flash). Registered in PROVIDER_SET as an optional provider so LLM_TOOL_PROVIDER / LLM_REASONING_PROVIDER / FORECAST_LLM_*_PROVIDER_ORDER accept it, but deliberately NOT added to the default PROVIDER_CHAIN — default routing (China-hosted-provider exclusion koala73#4993, DeepSeek-V4-Flash pin koala73#4944) is unchanged unless the user opts in. - server/_shared/llm-health.ts: warm the health cache for the gateway. - server/worldmonitor/news/v1/summarize-article.ts: orcarouter skip reason. - scripts/lib/llm-chain.cjs: orcarouter entry in LLM_PROVIDERS. - src/services: aiOrcaRouter feature + ORCAROUTER_API_KEY secret in runtime-config, settings-constants (signup URL / label / AI category), summarization-outcome union, summarization API_PROVIDERS chain slot (opt-in: no-op without the server key), desktop-readiness. - .env.example + README: document ORCAROUTER_API_KEY. - tests: provider credential + chain coverage for orcarouter. Co-Authored-By: Claude <noreply@anthropic.com>
|
@Marc-oss-hub is attempting to deploy a commit to the World Monitor Team on Vercel. A member of the Team first needs to authorize it. |
koala73
requested changes
Aug 17, 2026
koala73
left a comment
Owner
There was a problem hiding this comment.
Review (not ready to merge yet)
GitHub reports CONFLICTING against current main (LLM / forecast provider tables have moved). Please rebase.
Implementation direction looks right once it applies cleanly: OrcaRouter is opt-in (ORCAROUTER_API_KEY), not in the default PROVIDER_CHAIN, so it does not bypass the OpenRouter China-provider exclusion. User-Agent is still applied at the callLlm fetch site like the other named providers.
After rebase, re-run tests/shared-llm.test.mts and any forecast-provider table tests that now include extra named providers.
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.
Summary
Adds OrcaRouter as a named LLM provider across the server LLM client and the client-side summarization chain, mirroring how OpenRouter is wired today.
OrcaRouter is an OpenAI-compatible model routing gateway that exposes 150+ provider-scoped models (e.g.
deepseek/deepseek-v4-flash,openai/gpt-4o-mini,anthropic/claude-opus-4.8) behind a single endpoint and 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.Because the provider is a thin base-URL + key swap, users who set
ORCAROUTER_API_KEYget a fully named provider in the existing chain; users who don't are completely unaffected (the provider is skipped, exactly like Groq/OpenRouter are today when their key is absent).Type of change
Affected areas
What this changes
server/_shared/llm.ts: addsorcarouterto theLlmProviderNameunion andgetProviderCredentials()(base URLhttps://api.orcarouter.ai/v1/chat/completions, auth viaORCAROUTER_API_KEY, default modeldeepseek/deepseek-v4-flash). Registered inPROVIDER_SETas an optional provider soLLM_TOOL_PROVIDER=orcarouter,LLM_REASONING_PROVIDER=orcarouterand theFORECAST_LLM_*_PROVIDER_ORDERenvs accept it — but it is deliberately not added to the defaultPROVIDER_CHAIN, so default routing (including the China-hosted-provider exclusion from feat(llm): never serve OpenRouter inference from China-hosted providers #4993) is unchanged unless the user opts in.server/_shared/llm-health.ts: warms the health cache forapi.orcarouter.aiwhenORCAROUTER_API_KEYis set.server/worldmonitor/news/v1/summarize-article.ts: addsorcarouterto the providerskipReasonsmap.scripts/lib/llm-chain.cjs: adds anorcarouterentry toLLM_PROVIDERS(inert without the key).src/services/summarization.ts: adds an OrcaRouter entry to the clientAPI_PROVIDERSchain, right after OpenRouter.src/services/summarization-outcome.ts: extendsAttemptedSummarizationProviderwith'orcarouter'.src/services/runtime-config.ts: addsORCAROUTER_API_KEYtoRuntimeSecretKeyand anaiOrcaRouterfeature toRuntimeFeatureId/RUNTIME_FEATURES.src/services/settings-constants.ts: adds the OrcaRouter sign-up URL, human label, and theaiOrcaRouterfeature to the AI settings category.src/services/desktop-readiness.ts: countsaiOrcaRouteramong the key-backed AI features and the summaries readiness check..env.example+README.md: documentORCAROUTER_API_KEYand the provider.tests/: provider credential + chain coverage fororcarouter.How to use it
sk-orca-).ORCAROUTER_API_KEYin your environment or the settings vault.LLM_TOOL_PROVIDER=orcarouter,LLM_REASONING_PROVIDER=orcarouter, orFORECAST_LLM_COMBINED_PROVIDER_ORDER=orcarouter.Verification
npm run typecheck— cleanhttps://api.orcarouter.ai/v1/chat/completionswith a real key: 200 + valid completion.I'm an engineer on the OrcaRouter team.