Skip to content

Add OrcaRouter as an LLM provider option - #3796

Open
martinzudergaming-a11y wants to merge 3 commits into
golemcloud:mainfrom
martinzudergaming-a11y:add-orcarouter-llm-provider
Open

Add OrcaRouter as an LLM provider option#3796
martinzudergaming-a11y wants to merge 3 commits into
golemcloud:mainfrom
martinzudergaming-a11y:add-orcarouter-llm-provider

Conversation

@martinzudergaming-a11y

Copy link
Copy Markdown

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-ai library 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 the golem-ai-llm-openai provider uses), so it plugs into Golem's existing OpenAI provider crate, the same pattern as golem-ai-llm-openai with a base-URL override. Every file below mirrors the existing OpenRouter/OpenAI entries:

  • cli/golem-cli/src/app/template/snippet.rs, added an OrcaRouter entry to the LLM provider dependency registry (the same DOC_DEPENDENCIES group that lists OpenRouter). The generated golem.yaml manifest env-var hints for OrcaRouter set:
    • OPENAI_API_KEY (OrcaRouter keys are issued as sk-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.mdx and docs/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.mdx and docs/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.md and plugins/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:

[dependencies]
golem-ai-llm = "0.5.1"
golem-ai-llm-openai = "0.5.1"
type Provider = golem_ai_llm_openai::DurableOpenAI;
// model: "openai/gpt-4o" or "orcarouter/auto"

With OPENAI_BASE_URL=https://api.orcarouter.ai/v1 and OPENAI_API_KEY set to an OrcaRouter key, requests go through OrcaRouter's gateway. Note OrcaRouter uses namespaced model IDs, so model names are openai/gpt-4o / orcarouter/auto rather than bare gpt-4o.

Verification

  • rustfmt --edition 2024 clean on cli/golem-cli/src/app/template/snippet.rs.
  • Live API check against OrcaRouter over the exact wire path used by golem-ai-llm-openai (POST /v1/responses):
    • openai/gpt-4o → HTTP 200
    • orcarouter/auto → HTTP 200

I'm an engineer on the OrcaRouter team.

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>
@martinzudergaming-a11y
martinzudergaming-a11y requested a review from a team August 31, 2026 12:18
@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit cdb7005
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a97eab39676f30008e2ab90

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot closed this Aug 31, 2026
@vigoo vigoo reopened this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

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.
✅ (vigoo)[https://github.com/vigoo]
@martinzudergaming-a11y
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@vigoo

vigoo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@martinzudergaming-a11y thanks! could you sign the CLA? (Just write a comment with the given text)

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.

2 participants