feat(supabase-chat): add OrcaRouter as a named gateway option - #998
Open
Marc-oss-hub wants to merge 1 commit into
Open
feat(supabase-chat): add OrcaRouter as a named gateway option#998Marc-oss-hub wants to merge 1 commit into
Marc-oss-hub wants to merge 1 commit into
Conversation
Mirror the existing OpenRouter wiring in the supabase-chat example: when ORCAROUTER_API_KEY is set, the OpenAI-compatible client is pointed at https://api.orcarouter.ai/v1 with OrcaRouter's namespaced Claude model ids. OpenRouter stays the default when unset. Co-Authored-By: Claude <noreply@anthropic.com>
|
@Marc-oss-hub is attempting to deploy a commit to the thesys-devs 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.
Add OrcaRouter as a named gateway option in the supabase-chat example
This PR adds OrcaRouter as a named, switchable gateway in
examples/supabase-chat, mirroring the existing OpenRouter wiring.What changed
examples/supabase-chat/src/app/api/chat/route.ts: gateway selection is nowORCAROUTER_API_KEY-gated. When set, the example's OpenAI-compatible client is pointed athttps://api.orcarouter.ai/v1with OrcaRouter's namespaced Claude model ids (anthropic/claude-haiku-4.5default viaORCAROUTER_MODEL). When unset, behavior is identical to before — OpenRouter remains the default (https://openrouter.ai/api/v1,openai/gpt-5.5).examples/supabase-chat/.env.local.example: documents theORCAROUTER_API_KEY/ORCAROUTER_MODELoverride next to the existing OpenRouter vars.examples/supabase-chat/README.md: adds the two new env rows to the config table plus a one-line note.No new dependencies — it reuses the example's existing
openaiSDK client.Why OrcaRouter
OrcaRouter is an Anthropic-compatible AI gateway that serves Claude and OpenAI models through a single OpenAI-compatible endpoint (
https://api.orcarouter.ai/v1). 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.Verified end-to-end: a live
chat.completionsrequest tohttps://api.orcarouter.ai/v1withanthropic/claude-haiku-4.5(the exact config the README documents) returned HTTP 200 with contentORCA-OK.I'm an engineer on the OrcaRouter team.