From 39abff09e150c766377ea7afa103271fb334183d Mon Sep 17 00:00:00 2001 From: XiaoHuo888-hue Date: Sat, 22 Aug 2026 23:30:53 +0000 Subject: [PATCH] feat: add OrcaRouter to the default LLM egress allowlist Add api.orcarouter.ai to the client's default egress allowlist so VMs can reach the OrcaRouter gateway without extra network configuration, mirroring the existing openrouter.ai entry. Also document ORCAROUTER_API_KEY as a supported provider variable on the OpenCode and Pi agent pages. Co-Authored-By: Claude Signed-off-by: XiaoHuo888-hue --- crates/client/src/agent_os.rs | 3 +++ docs/content/docs/agents/opencode.mdx | 1 + docs/content/docs/agents/pi.mdx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/client/src/agent_os.rs b/crates/client/src/agent_os.rs index d3b6df02f0..fc191d7772 100644 --- a/crates/client/src/agent_os.rs +++ b/crates/client/src/agent_os.rs @@ -1250,6 +1250,7 @@ const DEFAULT_EGRESS_HOSTS: &[&str] = &[ "api.openai.com", "generativelanguage.googleapis.com", "openrouter.ai", + "api.orcarouter.ai", ]; /// Resource patterns for the default egress allowlist. Network permission @@ -3886,6 +3887,8 @@ mod tests { assert!(patterns.contains(&"dns://api.openai.com".to_string())); assert!(patterns.contains(&"dns://generativelanguage.googleapis.com".to_string())); assert!(patterns.contains(&"dns://openrouter.ai".to_string())); + assert!(patterns.contains(&"dns://api.orcarouter.ai".to_string())); + assert!(patterns.contains(&"tcp://api.orcarouter.ai:*".to_string())); } #[test] diff --git a/docs/content/docs/agents/opencode.mdx b/docs/content/docs/agents/opencode.mdx index 41297c1447..089fc0484b 100644 --- a/docs/content/docs/agents/opencode.mdx +++ b/docs/content/docs/agents/opencode.mdx @@ -21,6 +21,7 @@ OpenCode auto-detects a provider when its key is present on the session's `env`, - `ANTHROPIC_API_KEY` — Anthropic (Claude), the default. - `OPENAI_API_KEY` — OpenAI. - `OPENROUTER_API_KEY` — OpenRouter. +- `ORCAROUTER_API_KEY`. Set this to use [OrcaRouter](https://www.orcarouter.ai), an OpenAI-compatible gateway that routes requests to the best available model. - `GEMINI_API_KEY` — Google Gemini. - `GROQ_API_KEY` — Groq. - …plus Amazon Bedrock, Azure, Google Vertex, and 70+ providers via [models.dev](https://models.dev). diff --git a/docs/content/docs/agents/pi.mdx b/docs/content/docs/agents/pi.mdx index 674b433e50..5967a4b77f 100644 --- a/docs/content/docs/agents/pi.mdx +++ b/docs/content/docs/agents/pi.mdx @@ -19,7 +19,7 @@ Read [Sessions](/agentos/docs/sessions) first for session options, streaming eve Set the relevant variable on the session's `env`, sourced from your server's environment: - `ANTHROPIC_API_KEY` — Anthropic (Claude), the default. -- Other providers — use the provider-named key (e.g. `OPENAI_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY`). +- Other providers — use the provider-named key (e.g. `OPENAI_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY`, `ORCAROUTER_API_KEY`). See [Models & Credentials](/agentos/docs/models-and-credentials), and Pi's [providers docs](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/providers.md) for the full list.