Skip to content

feat: add OrcaRouter as an LLM provider - #39

Open
XiaoHuo888-hue wants to merge 1 commit into
lynote-ai:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider
Open

feat: add OrcaRouter as an LLM provider#39
XiaoHuo888-hue wants to merge 1 commit into
lynote-ai:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Summary

This registers OrcaRouter the same way the existing OpenRouter and Atlas Cloud providers are wired, so the config reference and docs stay consistent. OrcaRouter is an OpenAI-compatible gateway: one ORCAROUTER_API_KEY (keys start with sk-orca-) unlocks 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax and xAI behind a single https://api.orcarouter.ai/v1 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.

I'm an engineer on the OrcaRouter team.

What this changes

  • src/standard/llm_client.py: registers the orcarouter provider in PROVIDER_DEFAULTS (base URL https://api.orcarouter.ai/v1, default model deepseek/deepseek-chat, config key orcarouter_api_key), with an ORCAROUTER_API_KEY env fallback
  • config/config.example.toml: adds orcarouter_api_key and updates the provider comment
  • README.md / README-zh.md: adds an OrcaRouter config block alongside the existing providers
  • docs/configuration.md: adds an OrcaRouter section, provider-defaults table row, and env-var row
  • docs/api-reference.md / docs/pipeline.md: documents the new provider and default model
  • tests/test_llm_client.py: adds test_orcarouter_provider and test_orcarouter_env_key

How to use it

  1. Get an API key at https://www.orcarouter.ai/console (keys start with sk-orca-).
  2. Set orcarouter_api_key in config/config.toml, or ORCAROUTER_API_KEY as an env var.
  3. Set [llm] provider = "orcarouter" (the default model is deepseek/deepseek-chat; any OrcaRouter model slug works).

Validation

  • Unit tests: pytest tests/ -q -> 28 passed (includes the 2 new OrcaRouter tests)
  • python -m py_compile on the changed Python files + git diff --check clean
  • Live API with a real key through the repo's own resolve_llm_config + chat_completions path: default model 200, orcarouter/auto 200, invalid key 401
  • Confirmed deepseek/deepseek-chat is present in the live OrcaRouter model catalog

README/docs updates are limited to existing technical provider configuration sections; no sponsor/logo/credits/partner content was added.

Add a named OrcaRouter provider preset (OpenAI-compatible routing gateway)
mirroring the existing OpenRouter entry: base_url, default model, API key
field, env var mapping, config example, README/docs, and unit tests.
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.

1 participant