Lightpanda: the headless browser designed for AI and automation
agent: document the OpenRouter and OrcaRouter providers
Adrià Arrufatfc13928672cd
diff --git a/README.md b/README.mdindex 71fbd6451..102637744 100644--- a/README.md+++ b/README.md@@ -181,8 +181,9 @@ you can prototype with the LLM and ship the output to production without amodel at runtime.It supports Anthropic, OpenAI, Gemini, Google Vertex AI, Mistral, Hugging-Face, the [Vercel AI Gateway](https://vercel.com/ai-gateway) (one key for-hundreds of models from every major lab), any OpenAI-compatible endpoint via+Face, the multi-lab gateways [Vercel AI Gateway](https://vercel.com/ai-gateway),+[OpenRouter](https://openrouter.ai) and [OrcaRouter](https://orcarouter.ai)+(one key for hundreds of models), any OpenAI-compatible endpoint via`OPENAI_BASE_URL`, and local models via Ollama or llama.cpp. You can also runwithout an LLM using `--no-llm`, which drops you into the REPL. See the[agent documentation](https://lightpanda.io/docs/usage/agent) for the full@@ -199,6 +200,7 @@ cat session.js | ./lightpanda run - # ...or pipe one in via stVERTEX_API_KEY=... ./lightpanda agent --provider vertex # Vertex AI, express modeGOOGLE_CLOUD_PROJECT=my-proj ./lightpanda agent --provider vertex # Vertex AI, token via gcloud authAI_GATEWAY_API_KEY=... ./lightpanda agent --provider vercel --model moonshotai/kimi-k2 # any model behind Vercel AI Gateway+OPENROUTER_API_KEY=... ./lightpanda agent --provider openrouter --model anthropic/claude-sonnet-5 # any model behind OpenRouterOPENAI_BASE_URL=https://my-gateway/v1 OPENAI_API_KEY=... ./lightpanda agent # any OpenAI-compatible server```diff --git a/src/agent/settings.zig b/src/agent/settings.zigindex 4962ef9cb..031335ed1 100644--- a/src/agent/settings.zig+++ b/src/agent/settings.zig@@ -31,7 +31,7 @@ const string = @import("../string.zig");const auth = @import("auth/auth.zig");const Candidate = zenai.provider.Candidate;-pub const api_keys_hint = "ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, HF_TOKEN, AI_GATEWAY_API_KEY, or MISTRAL_API_KEY (Vertex AI: VERTEX_API_KEY, or GOOGLE_CLOUD_PROJECT via gcloud; Codex: a ChatGPT subscription via /provider codex)";+pub const api_keys_hint = "ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, HF_TOKEN, AI_GATEWAY_API_KEY, MISTRAL_API_KEY, OPENROUTER_API_KEY, or ORCAROUTER_API_KEY (Vertex AI: VERTEX_API_KEY, or GOOGLE_CLOUD_PROJECT via gcloud; Codex: a ChatGPT subscription via /provider codex)";/// Determine which provider to use and read its env key. Returns null/// only when no `--provider` was given AND no env key exists (the callerdiff --git a/src/help.zon b/src/help.zonindex d0d361ab4..c6aba3f2a 100644--- a/src/help.zon+++ b/src/help.zon@@ -202,6 +202,7 @@\\ {0s} agent (auto-detects API key from env)\\ {0s} agent --provider anthropic --model claude-sonnet-4-6\\ {0s} agent --provider huggingface (HF serverless router, HF_TOKEN)+ \\ {0s} agent --provider openrouter --model anthropic/claude-sonnet-5\\ {0s} agent --provider ollama --model qwen3.5:latest\\ {0s} agent --no-llm (basic slash-command-only REPL)\\ {0s} run script.js (replay a saved script; see `run`)@@ -255,7 +256,8 @@\\ The AI provider. When omitted, lightpanda auto-detects an API\\ key from your environment (ANTHROPIC_API_KEY, OPENAI_API_KEY,\\ GOOGLE_API_KEY/GEMINI_API_KEY, HF_TOKEN, AI_GATEWAY_API_KEY,- \\ MISTRAL_API_KEY, VERTEX_API_KEY). With exactly one key set:+ \\ MISTRAL_API_KEY, OPENROUTER_API_KEY, ORCAROUTER_API_KEY,+ \\ VERTEX_API_KEY). With exactly one key set:\\ that provider is used. With multiple keys on a TTY: you'll be\\ prompted to pick; in non-interactive contexts, pass --provider\\ explicitly. With no keys set: falls back to the basic REPL@@ -272,11 +274,13 @@\\\\ Local servers (ollama, llama_cpp) are never auto-detected (they\\ need no key); select them explicitly with --provider ollama /- \\ --provider llama_cpp.+ \\ --provider llama_cpp. Same for codex, which uses a ChatGPT+ \\ subscription (OAuth) instead of an API key.\\\\ Allowed values: "anthropic", "openai", "gemini", "huggingface",- \\ "vercel", "mistral", "ollama", "llama_cpp",- \\ "vertex", "codex", "openai_compatible".+ \\ "vercel", "mistral", "openrouter", "orcarouter",+ \\ "ollama", "llama_cpp", "vertex", "codex",+ \\ "openai_compatible".\\ In the REPL, use /provider to list and change providers.\\ --save <PATH>\\ Synthesize a replayable .js script from the --task run and write