feat: add OrcaRouter as a named embedding provider - #205
Merged
Conversation
Add OrcaRouter (https://api.orcarouter.ai/v1) as a first-class embedding provider, mirroring the existing siray/minimax OpenAI-compatible adapter pattern. Python SDK: - New OrcaRouterAdapter (chat + embeddings via OpenAI-compatible API) - Env config: ORCAROUTER_API_KEY, OM_ORCAROUTER_BASE_URL, OM_ORCAROUTER_MODEL, OM_ORCAROUTER_EMBEDDING_MODEL - emb_dispatch() handles the orcarouter provider JS SDK / server: - env.cfg exposes orcarouter settings (base URL defaults to https://api.orcarouter.ai/v1) - emb_orcarouter() + emb_batch_orcarouter() for single/batch embeddings - get_model() resolves per-sector defaults from models.yml - getEmbeddingInfo() reports orcarouter config Dashboard: - Settings page lists orcarouter in the embedding provider select and adds OrcaRouter base URL / model override / API key fields - Settings API masks ORCAROUTER_API_KEY Docs/config: - models.yml per-sector orcarouter defaults - .env.example, docs/mcp.md, README updated - Unit tests for the adapter (Python) and provider wiring (JS) Verified: Python 18+1 unit tests pass, JS 47 tests pass, live chat and embeddings against the OrcaRouter API return HTTP 200. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: JinhaoSong322 <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.
📋 Description
Add OrcaRouter as a first-class, named embedding provider, mirroring the existing
siray/minimaxOpenAI-compatible adapter pattern.OrcaRouter is an OpenAI-compatible AI gateway at
https://api.orcarouter.ai/v1(API keys start withsk-orca-). 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.Python SDK (
openmemory-py)OrcaRouterAdapter(chat + single/batch embeddings via the OpenAI-compatible API)ORCAROUTER_API_KEY,OM_ORCAROUTER_BASE_URL(defaulthttps://api.orcarouter.ai/v1),OM_ORCAROUTER_MODEL,OM_ORCAROUTER_EMBEDDING_MODELemb_dispatch()routes theorcarouterproviderJS SDK / server (
openmemory-js)envexposes orcarouter settings (base URL defaults tohttps://api.orcarouter.ai/v1)emb_orcarouter()/emb_batch_orcarouter()for single and batch embeddingsget_model()resolves per-sector defaults frommodels.ymlgetEmbeddingInfo()reports orcarouter config; simple-mode batch path enabledDashboard
orcarouterin the embedding provider select and adds OrcaRouter base URL / model override / API key fieldsORCAROUTER_API_KEYConfig / docs
models.ymlper-sector orcarouter defaults.env.example,docs/mcp.md,README.mdupdated🔄 Type of Change
🧪 Testing
Python:
tests/test_orcarouter.py(18 unit tests) + existingtest_minimax.py/test_omnibus.pyall pass (27 passed, 3 skipped — identical to a clean upstream checkout). JS: fullvitestsuite passes (9 files / 47 tests). Live test against the OrcaRouter API (/v1/chat/completions+/v1/embeddings) returns HTTP 200 with the real key.🔍 Code Review Checklist
📚 Related Issues
N/A
🚀 Deployment Notes
No deployment changes required. Users opt in by setting
OM_EMBEDDINGS=orcarouterandORCAROUTER_API_KEY.📋 Additional Context
Disclosure: I'm an engineer on the OrcaRouter team.