feat: add OrcaRouter as a named model provider - #55
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
XiaoHuo888-hue wants to merge 1 commit into
XiaoHuo888-hue wants to merge 1 commit into
Conversation
Add orcarouter/auto (OrcaRouter smart-routing gateway) to the auto-selection preference list in agent_config.ts. When a Letta server exposes an orcarouter provider, the plugin now auto-selects it (or users can set LETTA_MODEL=orcarouter/auto directly). Includes unit tests for findModel and buildLlmConfig on the orcarouter handle, README docs, and a changelog entry. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.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.
Summary
Adds OrcaRouter as a named model provider. OrcaRouter is a unified AI gateway that routes every request to the best model for the job — one API key, one endpoint, all providers. 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.
When your Letta server exposes an
orcarouterprovider, the Subconscious agent can now use theorcarouter/autosmart-routing handle. This mirrors the existingminimax/MiniMax-M2.7andletta/autonamed-provider entries.Changes
scripts/agent_config.ts— addedorcarouter/autoto thePREFERRED_MODELSauto-selection preference list (afterminimax/MiniMax-M2.7, before the first-available-model fallback). ExistingbuildLlmConfig/findModellogic handles theorcarouter/autohandle out of the box (provider_name: orcarouter,model: auto).scripts/agent_config.test.ts— added anorcarouter/autoentry to the sample models list plus two tests:findModelresolves theorcarouter/autohandle, andbuildLlmConfigsplits it intoprovider_name: orcarouter/model: auto.README.md— addedorcarouter/autoto the auto-selection priority list and the provider table, plus a short "Using OrcaRouter as your model gateway" section (LETTA_MODEL="orcarouter/auto").CHANGELOG.md— Added entry under[Unreleased].No breaking changes: the new preference entry is only selected when the Letta server actually advertises an
orcaroutermodel; otherwise behavior is unchanged. No dependency changes.Validation
npm test— 39/39 passing (3 test files), including the 2 new OrcaRouter tests.tsc --noEmit(module nodenext) on the changed files — clean.orcarouter/autoathttps://api.orcarouter.ai/v1/chat/completionsreturned HTTP 200 (ORCA-LIVE-OK, routed upstream todeepseek-v4-pro), matching the documented smart-routing behavior.Disclosure: I'm an engineer on the OrcaRouter team.