@co-browse/proxy
v0.1.0
Published
Fastify LLM proxy for Co-Browse AI. Streams SSE, keeps provider keys off the client, and speaks a neutral wire format across Anthropic, OpenAI, Groq, and other providers.
Maintainers
Readme
@co-browse/proxy
A small Fastify server that sits between @co-browse/react
and your LLM provider. It streams responses over SSE and keeps provider API keys
off the client. It speaks a neutral message + tool-call format and translates it
per provider, so the same client works across Anthropic (Claude), OpenAI,
Groq, Together, Fireworks, OpenRouter, DeepSeek, xAI, Mistral, Ollama, or any
OpenAI-compatible endpoint.
Run as a server
npx @co-browse/proxyConfigure via env (see the repo's .env.example):
PROVIDER=anthropic # or openai | groq | together | … | openai-compatible
MODEL=claude-opus-4-8 # provider default used when omitted
ANTHROPIC_API_KEY=... # the key env matching PROVIDER
ALLOWED_ORIGINS=http://localhost:5173
# Optional hardening: AUTH_TOKEN, RATE_LIMIT, MAX_BODY_BYTESEmbed in your own Fastify app
import { buildServer } from "@co-browse/proxy";
const app = await buildServer({
config: { provider: "anthropic", apiKey: process.env.ANTHROPIC_API_KEY!, model: "claude-opus-4-8" },
allowedOrigins: ["https://your-app.com"],
});
await app.listen({ port: 8787 });Full env/provider reference: https://github.com/originalkamaal/co-browser-ai#readme
License
MIT © Kamaal Khan
