#272
feat: add OrcaRouter as a named AI channel provider
Summary
Add OrcaRouter as a first-class named AI-channel provider. OrcaRouter is an OpenAI-compatible gateway at https://api.orcarouter.ai/v1 whose model IDs such as orcarouter/auto are routed by the gateway to the best available backend model. 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.
Since OrcaRouter is OpenAI-compatible, channels pointing at it route through the existing OpenAI-compatible runtime path; this PR makes it a named, selectable provider instead of requiring a manually-entered base URL.
What changed
internal/config: addOrcaRouterBaseURLconst andIsOrcaRouterProvider/IsOrcaRouterProviderName/OrcaRouterBaseURLForhelpers, plus unit tests.internal/handler: default the OpenAI-compatible base URL tohttps://api.orcarouter.ai/v1whenproviderisorcarouterinTestOpenAI,ListModels, andTestVision; update the OpenAPI spec provider description.web: addOrcaRouterto the AI-channel, vision, and HITL-audit provider dropdowns; channel label display; i18n keys (en-US,zh-CN).- docs: document the
orcarouterprovider and a sample channel inconfig.example.yaml,README.md,README_CN.md, and the EN/CN configuration references.
How it was verified
go build ./...andgo vetpass.go test ./internal/config/...passes (including the new OrcaRouter helper tests). Handler-package tests can't run in this container becausego-sqlite3requires cgo and there is nogcc; the failures are pre-existing environment issues unrelated to this change.gofmtclean; frontend JSON validated andsettings.jspassesnode --check.- Live check against the gateway with the provider path (
provider=orcarouter, empty base URL →https://api.orcarouter.ai/v1):POST /chat/completionswithorcarouter/auto→ HTTP 200, assistant replyORCA-OK.GET /models→ HTTP 200, 205 models.
Disclosure: I'm an engineer on the OrcaRouter team.