Skip to content

feat(ingestion): add named OrcaRouter LLM adapter - #606

Open
JinhaoSong322 wants to merge 1 commit into
getzep:mainfrom
JinhaoSong322:add-orcarouter-provider
Open

feat(ingestion): add named OrcaRouter LLM adapter#606
JinhaoSong322 wants to merge 1 commit into
getzep:mainfrom
JinhaoSong322:add-orcarouter-provider

Conversation

@JinhaoSong322

Copy link
Copy Markdown

Summary

Adds a named OrcaRouter adapter, OrcaRouterLLM, to zep-ingest, mirroring the existing OpenAILLM / AnthropicLLM named-adapter pattern in ingestion/src/zep_ingest/llm/.

OrcaRouter is an OpenAI-compatible gateway that routes each request to the best model. OrcaRouterLLM pre-fills:

  • base_url: https://api.orcarouter.ai/v1
  • model: orcarouter/auto (adaptive router)
  • api_key: read from ORCAROUTER_API_KEY (prefix sk-orca-) unless passed explicitly

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.

Changes

  • ingestion/src/zep_ingest/llm/orcarouter.py — new OrcaRouterLLM(OpenAICompatibleLLM) named adapter.
  • ingestion/src/zep_ingest/llm/__init__.py — export OrcaRouterLLM alongside the existing adapters.
  • ingestion/tests/test_llm_adapters.py — 5 new unit tests (defaults, env key, explicit key override, chat-completions path, missing-SDK error).
  • ingestion/README.md, ingestion/SETUP.md, ingestion/CHANGELOG.md — docs.

Verification

  • ruff check and ruff format --check: clean.
  • mypy src/: no issues.
  • pytest: 669 passed, 2 skipped.
  • Live test against the real gateway using OrcaRouterLLM (production path): https://api.orcarouter.ai/v1 returned ORCA-OK for orcarouter/auto.

Disclosure: I'm an engineer on the OrcaRouter team.

Add OrcaRouterLLM to zep-ingest, mirroring the existing OpenAILLM /
AnthropicLLM named-adapter pattern. It pre-fills the OpenAI-compatible
gateway base URL (https://api.orcarouter.ai/v1) and the adaptive
orcarouter/auto model, and reads the API key from ORCAROUTER_API_KEY
(prefix sk-orca-). Exported from zep_ingest.llm; documented in the
ingestion README, SETUP, and CHANGELOG; covered by new unit tests.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: jinhao.song <jinhao.song@myflashcloud.com>
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