feat: add OrcaRouter as a named AI show notes provider - #2262
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
feat: add OrcaRouter as a named AI show notes provider#2262XiaoHuo888-hue wants to merge 1 commit into
XiaoHuo888-hue wants to merge 1 commit into
Conversation
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>
|
Someone is attempting to deploy a commit to the Syntax Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OrcaRouter as a named AI show notes provider, mirroring the existing
openaiandanthropicproviders. 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
openaiSDK pointed athttps://api.orcarouter.ai/v1via the newORCAROUTER_API_KEYenv var.Changes
src/server/ai/orcarouter.ts(new): OpenAI-compatible client for OrcaRouter (basePath: https://api.orcarouter.ai/v1, modelorcarouter/auto)src/server/ai/openai.ts:generate_ai_notesprovider union now includes'orcarouter'; the OrcaRouter branch skips transcript condensing (like Anthropic) and returnsprovider: '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: documentORCAROUTER_API_KEYTesting
pnpm checkpasses (svelte-check)pnpm test:unitpasses (8 tests, including 2 new OrcaRouter tests)pnpm prettier --checkpasses on changed filesORCAROUTER_API_KEY:POST https://api.orcarouter.ai/v1/chat/completionswith modelorcarouter/autoreturned 200 with the expected JSON responseDisclosure: I'm an engineer on the OrcaRouter team.