Skip to content

feat(provider): add named OrcaRouter embedding and people-sweep providers - #662

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

feat(provider): add named OrcaRouter embedding and people-sweep providers#662
JinhaoSong322 wants to merge 1 commit into
kenn-io:mainfrom
JinhaoSong322:add-orcarouter-provider

Conversation

@JinhaoSong322

Copy link
Copy Markdown

What changed

Add a named OrcaRouter provider to the two OpenAI-compatible surfaces in msgvault, so an operator can select the gateway by name instead of hand-filling a generic endpoint.

  • [vector.embeddings]: api_format = "orcarouter" fills in the gateway endpoint (https://api.orcarouter.ai/v1), model (openai/text-embedding-3-small), dimension (1536), and ORCAROUTER_API_KEY environment variable. The named format shares the existing OpenAI-compatible wire contract, so no transport changes are needed.
  • [people.sweep.provider]: kind = "orcarouter" fills in the gateway endpoint, default model (orcarouter/auto), and ORCAROUTER_API_KEY env, reusing the existing OpenAI-compatible transport.
  • Registered orcarouter in the settings catalog (Go internal/api + web web/src/lib/settings/catalog.ts), and documented both surfaces in README.md, docs/configuration.md, docs/usage/vector-search.md, and docs/changelog.md.

The gateway serves OpenAI-compatible embeddings and chat completions from the same 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

Selecting a named provider makes the supported gateway discoverable in the settings UI and gives a minimal config block for both the vector-search and people-sweep surfaces, matching how the existing openai / voyage-contextual formats are exposed.

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

…ders

Add an OrcaRouter gateway provider to the two OpenAI-compatible surfaces:

- [vector.embeddings] api_format = "orcarouter" fills in the gateway
  endpoint (https://api.orcarouter.ai/v1), model
  (openai/text-embedding-3-small), dimension (1536), and
  ORCAROUTER_API_KEY env so a minimal config block selects the gateway
  by name. The named format shares the existing OpenAI-compatible wire
  contract.
- [people.sweep.provider] kind = "orcarouter" fills in the gateway
  endpoint, default model (orcarouter/auto), and ORCAROUTER_API_KEY env,
  reusing the existing OpenAI-compatible transport.
- Register the orcarouter option in the settings catalog (Go + web) and
  document both surfaces in README, configuration, vector-search guide,
  and the changelog.

Tests cover config defaults, explicit overrides, TOML load, settings
catalog options, and the web catalog.

Signed-off-by: JinhaoSong322 <jinhao.song@myflashcloud.com>
@roborev-ci

roborev-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown

roborev: Combined Review (200f49a)

The OrcaRouter configuration is incomplete and alters explicit people-sweep configuration semantics.

Medium

  • cmd/msgvault/cmd/serve_vector.go:118orcarouter passes configuration validation, but newEmbeddingRuntime rejects it as an unsupported embedding API format. activateBuiltGeneration also treats every non-OpenAI format as contextual, incorrectly routing OrcaRouter through Voyage-only activation.

    • Fix: Handle APIFormatOrcaRouter alongside APIFormatOpenAI in runtime construction and all activation/hint branches.
  • internal/config/config.go:787 — Unconditionally reapplying people-sweep defaults overwrites explicitly configured zero values for existing providers. For example, api_key_env = "" with openai_compatible becomes OPENAI_API_KEY, potentially enabling a credential the user explicitly disabled.

    • Fix: Apply OrcaRouter defaults only within the OrcaRouter branch and only to fields omitted according to TOML metadata; preserve explicitly configured empty or zero values.

Reviewers: 2 done | Synthesis: codex, 9s | Total: 5m7s

@salmonumbrella

Copy link
Copy Markdown
Contributor

@wesm spam?

@wesm

wesm commented Aug 22, 2026

Copy link
Copy Markdown
Member

maybe, I'll do some research here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants