matrixorigin / matrixorigin/matrixone
feat: add OrcaRouter as a named LLM provider for llm_chat
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
## What
Add `orcarouter` as a named server option for MatrixOne's built-in `llm_chat` function, mirroring the existing `ollama` wiring.
[OrcaRouter](https://www.orcarouter.ai) is an OpenAI-compatible model gateway that routes chat requests to the best available model through a single 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.
## Why
MatrixOne is AI-native and ships a built-in `llm_chat` function backed by a named-provider registry (`mock`, `ollama`). A named `orcarouter` entry lets users route chat through the gateway directly (`ORCAROUTER_API_KEY` + default model `orcarouter/auto`), instead of configuring a generic OpenAI-compatible endpoint manually.
## Scope
- New `OrcaRouterClient` in `pkg/monlp/llm/orcarouter.go` (langchaingo openai transport, base URL `https://api.orcarouter.ai/v1`).
- Dispatch `orcarouter` in `NewLLMClient`.
- Unit tests + a BVT case for the missing-key error path.
- README / README_CN usage example.
Disclosure: I'm an engineer on the OrcaRouter team.
Contributor guide
Assessment
This issue has not been assessed yet.