Skip to documentation
Documentation navigation

Documentation navigation

Documentation / guides

Overview

Configure every implemented model provider, including API format, base URL, authentication, secrets, and supported capabilities.

developer

The llm module owns provider policy above the neutral inference request contract. Each constructor below validates the provider and API format before network I/O, resolves an empty model base URL when the package has a reviewed default, and binds the credential scheme used by its transport. The individual pages link directly to the provider package and its tests.

Choose a provider

The format names are the values in inference/model: openai is Chat Completions, openai-responses is Responses, anthropic is Messages, gemini is Google generateContent, and bedrock-converse is the native Bedrock Converse envelope. A row with more than one format selects its route and codec from model.Model.APIFormat.

PackageProvider identityFormatsAuthDefault endpoint or resolution
anthropicanthropicAnthropicAPI keyhttps://api.anthropic.com/v1
atomic-chatatomic-chatOpenAInonehttp://127.0.0.1:1337/v1
azureazureOpenAI ResponsesAPI keyresource name or explicit base
azure-cognitive-servicesazure-cognitive-servicesOpenAI, Responses, AnthropicAPI keyresource-specific Azure endpoint
basetenbasetenOpenAIAPI keyhttps://inference.baseten.co/v1
bedrockbedrockAnthropic, Bedrock ConverseAWS SigV4bedrock-runtime.{region}.amazonaws.com
cerebrascerebrasOpenAIAPI keyhttps://api.cerebras.ai/v1
chuteschutesOpenAIAPI key plus attestationAPI, LLM, NRAS, and JWKS defaults
cloudflare-ai-gatewaycloudflare-ai-gatewayOpenAI, Responses, AnthropicAPI tokenaccount and gateway headers
cloudflare-workers-aicloudflare-workers-aiOpenAIAPI keyaccount-scoped Workers AI route
cortecscortecsOpenAIAPI keyhttps://api.cortecs.ai/v1
deepinfradeepinfraOpenAI, AnthropicAPI keyformat-specific Deep Infra roots
deepseekdeepseekOpenAIAPI keyhttps://api.deepseek.com
digitaloceandigitaloceanOpenAIAPI keyhttps://inference.do-ai.run/v1
fireworksfireworks-aiOpenAIAPI keyhttps://api.fireworks.ai/inference/v1
frogbotfrogbotOpenAIAPI keyhttps://app.frogbot.ai/api/v1
geminigoogleGeminiAPI key headerhttps://generativelanguage.googleapis.com/v1beta
github-copilotgithub-copilotOpenAI, Responses, AnthropicOAuth-derived tokenhttps://api.githubcopilot.com
gitlabgitlabOpenAI, Responses, AnthropicOAuth/PAT exchangeGitLab AI Gateway proxy roots
gmicloudgmicloudOpenAIAPI keyhttps://api.gmi-serving.com/v1
google-vertexgoogle-vertex and google-vertex-anthropicGemini, AnthropicGCP bearerlocation and project routing
groqgroqOpenAIAPI keyhttps://api.groq.com/openai/v1
heliconeheliconeOpenAIAPI keyhttps://ai-gateway.helicone.ai/v1
huggingfacehuggingfaceOpenAIAPI keyhttps://router.huggingface.co/v1
ionetio-netOpenAIAPI keyhttps://api.intelligence.io.solutions/api/v1
llamallamaOpenAIAPI keyhttps://api.llama.com/compat/v1
llamacppllama.cppOpenAInonehttp://127.0.0.1:8080/v1
llmgatewayllmgatewayOpenAI, AnthropicAPI keyhttps://api.llmgateway.io/v1
minimaxminimaxAnthropicAPI key headerhttps://api.minimax.io/anthropic/v1
moonshotmoonshotaiOpenAIAPI keyhttps://api.moonshot.ai/v1
nebiusnebiusOpenAIAPI keyhttps://api.tokenfactory.nebius.com/v1
nvidianvidiaOpenAIAPI keyhttps://integrate.api.nvidia.com/v1
ollamaollamaOpenAInonehttp://localhost:11434/v1
ollamacloudollama-cloudOpenAIAPI keyhttps://ollama.com/v1
openaiopenaiOpenAI, ResponsesAPI keyhttps://api.openai.com/v1
opencodeopencodeOpenAI, Responses, AnthropicAPI keyhttps://opencode.ai/zen/v1
opencode-goopencode-goOpenAI, Responses, AnthropicAPI keyhttps://opencode.ai/zen/go/v1
openrouteropenrouterOpenAIAPI keyhttps://openrouter.ai/api/v1
ovhcloudovhcloudOpenAIAPI keyhttps://oai.endpoints.kepler.ai.cloud.ovh.net/v1
p302ai302aiOpenAIAPI keyhttps://api.302.ai/v1
phalaphalaOpenAIAPI key plus ACI policyhttps://inference.phala.com
sap-ai-coresap-ai-coreOpenAIservice key OAuthdeployment discovery or URL
scalewayscalewayOpenAIAPI keyhttps://api.scaleway.ai/v1
snowflake-cortexsnowflake-cortexOpenAIaccount tokenaccount or explicit base
stackitstackitOpenAIAPI keyhttps://api.openai-compat.model-serving.eu01.onstackit.cloud/v1
syntheticsyntheticsOpenAIAPI keyhttps://api.synthetic.new/openai/v1
togethertogetheraiOpenAIAPI keyhttps://api.together.ai/v1
veniceveniceOpenAI, ResponsesAPI keyhttps://api.venice.ai/api/v1
vercelvercelOpenAI, Responses, AnthropicAPI keyhttps://ai-gateway.vercel.sh/v1
xaixaiOpenAI, ResponsesAPI keyhttps://api.x.ai/v1
zaizaiOpenAIAPI keyhttps://api.z.ai/api/paas/v4
zenmuxzenmuxOpenAI, Responses, AnthropicAPI keyformat-specific ZenMux roots

Construction and routing

Every model-backed constructor takes a model.Model, validates Provider, APIFormat, model name, and endpoint shape through llm.ValidateModel, then binds a transport endpoint. Empty BaseURL is not a universal promise: dynamic providers require the resource, account, project, location, deployment, or region that their page names.

When a provider becomes a Loop’s selected model, continue with Harness runtime model selection. Bounded auxiliary model selection for Hustles is covered by Hustle model selection.

%%{init: {"theme":"base","themeVariables":{"background":"#0b1020","primaryColor":"#172554","primaryTextColor":"#f8fafc","primaryBorderColor":"#60a5fa","lineColor":"#94a3b8","secondaryColor":"#1e293b","tertiaryColor":"#111827","fontFamily":"ui-sans-serif,system-ui"}}}%%
flowchart LR
    M[model.Model] --> V[llm.ValidateModel]
    V --> F{APIFormat}
    F --> C[provider constructor]
    C --> E[bound endpoint]
    C --> A[auth.Authenticator]
    E --> T[inference transport or native client]
    A --> T
    T --> R[Invoke or Stream]
    classDef dark fill:#172554,stroke:#60a5fa,color:#f8fafc;
    class M,V,F,C,E,A,T,R dark;

For the compatibility-backed packages, internal/compat.NewProvider selects the bundled OpenAI Chat, OpenAI Responses, or Anthropic codec and the format-specific path. Bespoke packages retain their own route where the provider puts the model in the URL, signs a request, performs token exchange, or encrypts the body.

Wire and capability boundaries

Streaming, tools, structured output, images, thinking, and usage are request features, not marketing labels. A provider page claims a feature only when its source selects a codec that encodes it, adds a provider-specific patch, or has a focused test. Shared compatibility providers do not invent a capability mask: request validation and the selected codec remain authoritative. The provider registry rejects an unsupported format before I/O.

BoundarySource-backed rule
Streaminginference.Client.Stream returns a stream.StreamReader; compatibility clients use the codec’s SSE decoder, while Gemini and Bedrock use their native stream framing.
Structured output and toolsThe selected codec encodes inference.OutputSchema, Tools, and ToolChoice where that dialect defines them. Provider-specific normalization is documented only on pages that implement it.
Capability metadatamodel.Model.Caps is supplied by the caller and checked by inference request validation; provider metadata is not a capability guarantee.
Context countingA page lists NewCounter only when the package has one. The common unsupported-counter result is a typed llm.CounterSupportError, not an estimate.
CachingCache controls appear only for packages with source-level options such as OpenAI, Anthropic, Bedrock, Cloudflare AI Gateway, OpenRouter, or xAI.

Secret references and retries

Provider constructors receive already-resolved credential material such as auth.APIKey, bedrock.SigV4Credentials, an OAuth access token, or an SAP ServiceKey. They do not parse a generic secret reference. Applications can resolve a credentials.Descriptor and lease through credentials and secrets, then pass the resulting value to the constructor; labels and reference IDs must not be placed in model.Model.

The generic transport reports validation, network, HTTP, codec, and stream failures without a provider-local retry loop. Wrap idempotent calls in the inference retry package only after checking the provider page. GitLab retries once after invalidating its short-lived direct-access token, SAP refreshes OAuth during discovery, and Chutes re-attests when its cached session expires or nonces are exhausted. Those are authentication lifecycle behaviors, not a blanket retry guarantee.

Source and proof

← back to documentation