Add OrcaRouter as an LLM provider option - #3796
Conversation
Mirrors the existing OpenRouter entry in the CLI LLM provider registry and the provider tables in the docs and skills. OrcaRouter is OpenAI-compatible, so it uses the existing golem-ai-llm-openai crate with an OPENAI_BASE_URL override. Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for golemcloud canceled.
|
|
Hi @martinzudergaming-a11y, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/golemcloud/golem/blob/main/CONTRIBUTING.md for more details. |
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement. Please read the CLA and post the comment below to sign. I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
|
@martinzudergaming-a11y thanks! could you sign the CLA? (Just write a comment with the given text) |
Add OrcaRouter as a named LLM provider option
Golem is a distributed WebAssembly runtime for building durable agents and services in Rust, TypeScript, Scala, and MoonBit. Its Rust agents get LLM and AI capabilities through the
golem-ailibrary collection, which exposes a unified provider-agnostic API backed by concrete provider crates (OpenAI, Anthropic, OpenRouter, Bedrock, Grok, Ollama, ...).This PR adds OrcaRouter as a named LLM provider option alongside the existing providers, mirroring the way OpenRouter is wired in. OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models, but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding it as a first-class provider entry means Golem users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. 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.
What changed
OrcaRouter is OpenAI-compatible (live-verified on
POST /v1/responses, the endpoint thegolem-ai-llm-openaiprovider uses), so it plugs into Golem's existing OpenAI provider crate, the same pattern asgolem-ai-llm-openaiwith a base-URL override. Every file below mirrors the existing OpenRouter/OpenAI entries:cli/golem-cli/src/app/template/snippet.rs, added anOrcaRouterentry to the LLM provider dependency registry (the sameDOC_DEPENDENCIESgroup that listsOpenRouter). The generatedgolem.yamlmanifest env-var hints for OrcaRouter set:OPENAI_API_KEY(OrcaRouter keys are issued assk-orca-...),OPENAI_BASE_URL=https://api.orcarouter.ai/v1,and point the crate download URL at
golem_llm_openai, since OrcaRouter speaks the OpenAI wire protocol.docs/src/content/next/develop/ai.mdxanddocs/src/content/v1.5/develop/ai.mdx, added OrcaRouter to the "list of supported LLM providers".docs/src/content/next/how-to-guides/rust/golem-add-llm-rust.mdxanddocs/src/content/v1.5/how-to-guides/rust/golem-add-llm-rust.mdx, added an OrcaRouter row to the LLM provider table (golem-ai-llm-openai+OPENAI_API_KEY,OPENAI_BASE_URL).golem-skills/skills/rust/golem-add-llm-rust/SKILL.mdandplugins/otlp-exporter/.agents/skills/golem-add-llm-rust/SKILL.md, same provider-table row in the skill copies.Usage
A Rust Golem agent uses OrcaRouter exactly like OpenAI, with two env vars:
With
OPENAI_BASE_URL=https://api.orcarouter.ai/v1andOPENAI_API_KEYset to an OrcaRouter key, requests go through OrcaRouter's gateway. Note OrcaRouter uses namespaced model IDs, so model names areopenai/gpt-4o/orcarouter/autorather than baregpt-4o.Verification
rustfmt --edition 2024clean oncli/golem-cli/src/app/template/snippet.rs.golem-ai-llm-openai(POST /v1/responses):openai/gpt-4o→ HTTP 200orcarouter/auto→ HTTP 200I'm an engineer on the OrcaRouter team.