Skip to content

feat(supabase-chat): add OrcaRouter as a named gateway option - #998

Open
Marc-oss-hub wants to merge 1 commit into
thesysdev:mainfrom
Marc-oss-hub:feat/orcarouter-gateway
Open

feat(supabase-chat): add OrcaRouter as a named gateway option#998
Marc-oss-hub wants to merge 1 commit into
thesysdev:mainfrom
Marc-oss-hub:feat/orcarouter-gateway

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

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 now ORCAROUTER_API_KEY-gated. When set, the example's OpenAI-compatible client is pointed at https://api.orcarouter.ai/v1 with OrcaRouter's namespaced Claude model ids (anthropic/claude-haiku-4.5 default via ORCAROUTER_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 the ORCAROUTER_API_KEY / ORCAROUTER_MODEL override 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 openai SDK 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.completions request to https://api.orcarouter.ai/v1 with anthropic/claude-haiku-4.5 (the exact config the README documents) returned HTTP 200 with content ORCA-OK.

I'm an engineer on the OrcaRouter team.

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>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

@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.

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