Skip to content

feat: add OrcaRouter as a named AI show notes provider - #2262

Open
XiaoHuo888-hue wants to merge 1 commit into
syntaxfm:mainfrom
XiaoHuo888-hue:add-orcarouter-provider
Open

feat: add OrcaRouter as a named AI show notes provider#2262
XiaoHuo888-hue wants to merge 1 commit into
syntaxfm:mainfrom
XiaoHuo888-hue:add-orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Summary

Adds OrcaRouter as a named AI show notes provider, mirroring the existing openai and anthropic providers. 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.

OrcaRouter is an OpenAI-compatible gateway, so this uses the existing openai SDK pointed at https://api.orcarouter.ai/v1 via the new ORCAROUTER_API_KEY env var.

Changes

  • src/server/ai/orcarouter.ts (new): OpenAI-compatible client for OrcaRouter (basePath: https://api.orcarouter.ai/v1, model orcarouter/auto)
  • src/server/ai/openai.ts: generate_ai_notes provider union now includes 'orcarouter'; the OrcaRouter branch skips transcript condensing (like Anthropic) and returns provider: 'orcarouter'
  • src/server/ai/db.ts: store the actual provider returned instead of hardcoding 'anthropic'
  • src/server/ai/orcarouter.test.ts (new): unit tests for the provider constants
  • .env.example / README.md: document ORCAROUTER_API_KEY

Testing

  • pnpm check passes (svelte-check)
  • pnpm test:unit passes (8 tests, including 2 new OrcaRouter tests)
  • pnpm prettier --check passes on changed files
  • Live-tested against the real OrcaRouter API with ORCAROUTER_API_KEY: POST https://api.orcarouter.ai/v1/chat/completions with model orcarouter/auto returned 200 with the expected JSON response

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

Adds a named 'orcarouter' provider option to generate_ai_notes, mirroring
the existing openai and anthropic providers. It uses the OpenAI SDK pointed
at https://api.orcarouter.ai/v1 with the ORCAROUTER_API_KEY env var.

- src/server/ai/orcarouter.ts: OpenAI-compatible client for OrcaRouter
- generate_ai_notes provider union now includes 'orcarouter'
- save_ai_notes_to_db stores the actual provider returned
- document ORCAROUTER_API_KEY in .env.example and README

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Syntax Team on Vercel.

A member of the Team first needs to authorize it.

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