Skip to main content

Provider and Model Reference

This page is the complete static lookup for every provider and model in the go-code catalog. Use it to find a provider's base URL and API key variable, compare model capabilities side by side, decode short alias names, and check the catalog pricing rates before you set a cost ceiling.

The catalog lives in catalog/models.json. At startup, harnessd loads it into a ProviderRegistry and routes every run to the right backend based on the model name the caller requested. Everything on this page is derived from that file — if you need to check the raw source, that is the place.

For an explanation of how routing, alias resolution, and OpenRouter dynamic discovery work, see Providers, Models, and Routing. This page is a lookup companion; that page explains the mechanics.


Providers

go-code ships with ten providers pre-wired in the catalog. Each entry specifies the base URL the client calls, the environment variable that must be set for the provider to be considered configured, and the wire protocol.

Provider keyDisplay nameProtocolAPI key env varBase URL
openaiOpenAIopenai_compatOPENAI_API_KEYhttps://api.openai.com/v1
anthropicAnthropicanthropicANTHROPIC_API_KEYhttps://api.anthropic.com/v1
deepseekDeepSeekopenai_compatDEEPSEEK_API_KEYhttps://api.deepseek.com/v1
groqGroqopenai_compatGROQ_API_KEYhttps://api.groq.com/openai/v1
xaixAI (Grok)openai_compatXAI_API_KEYhttps://api.x.ai/v1
kimiKimi (Moonshot)openai_compatMOONSHOT_API_KEYhttps://api.moonshot.ai/v1
qwenQwen (DashScope)openai_compatDASHSCOPE_API_KEYhttps://dashscope-intl.aliyuncs.com/compatible-mode/v1
togetherTogether AIopenai_compatTOGETHER_API_KEYhttps://api.together.xyz/v1
openrouterOpenRouteropenai_compatOPENROUTER_API_KEYhttps://openrouter.ai/api/v1
geminiGoogle Geminiopenai_compatGOOGLE_API_KEYhttps://generativelanguage.googleapis.com/v1beta/openai

Protocol valuesanthropic means the server uses the native Anthropic messages client (internal/provider/anthropic). openai_compat means the OpenAI-compatible client (internal/provider/openai) is used, even when the upstream API is not from OpenAI.

The gemini provider has protocol: "openai" in the raw catalog JSON (not openai_compat like the other non-Anthropic providers). Both values are handled identically at runtime — the protocol field is informational and not parsed by the Go client factory. Gemini is served by the same OpenAI-compatible client as all other non-Anthropic providers.

Discovery endpoints

A provider is configured when its API key env var is present in the process environment. You can check configured status at runtime without restarting the server:

# See all providers and whether each is configured
curl http://localhost:8080/v1/providers

# Set a provider API key at runtime (no restart required)
curl -X PUT http://localhost:8080/v1/providers/anthropic/key \
-H "Content-Type: application/json" \
-d '{"key": "sk-ant-..."}'

Models per provider

Several model IDs in the catalog (especially the OpenAI Codex variants) may not be available on all accounts. Verify model availability with your provider before relying on them in production.

Model IDContextMax outputTool callingEndpointSpeedCost
gpt-4.1-mini1,000,00016,384yes (parallel)chat/completionsfastbudget
gpt-4.11,000,00032,768yes (parallel)chat/completionsfaststandard
gpt-5.1-codex128,00032,768yesresponsesmediumstandard
gpt-5.1-codex-mini128,00032,768yesresponsesfastbudget
gpt-5.1-codex-max128,00032,768yesresponsesmediumpremium
gpt-5.2-codex128,00032,768yesresponsesmediumstandard
gpt-5.3-codex128,00032,768yesresponsesmediumstandard
computer-use-preview128,0008,192yesresponsesmediumstandard

The models listed as responses endpoint route to POST /v1/responses (OpenAI Responses API) rather than the default POST /v1/chat/completions. This is controlled by the api: "responses" field in the catalog entry.

Browse the full live catalog:

curl http://localhost:8080/v1/models

Aliases and routing

Alias maps

Aliases are short names that resolve to full model IDs. They are defined per-provider in the catalog. The resolver follows chains up to 8 hops to prevent cycles.

AliasResolves to
gpt4-minigpt-4.1-mini
gpt4gpt-4.1
codexgpt-5.1-codex-mini
codex-minigpt-5.1-codex-mini

Kimi and Gemini define no aliases in the current catalog.

OpenRouter dynamic discovery and the / heuristic

OpenRouter hosts thousands of models not listed in the static catalog. When OPENROUTER_API_KEY is set, go-code fetches https://openrouter.ai/api/v1/models with a 5-minute TTL cache. Live results are merged additively into the static catalog — static metadata wins on conflicts.

The / heuristic: any model ID containing a / character is automatically routed to the openrouter provider whenever the openrouter provider entry is present in the loaded catalog — key configuration is not required for routing. A missing key surfaces as an error at client creation. This means you can write "model": "openai/gpt-4.1" directly in a RunRequest without setting provider_name, and the harness will route it to OpenRouter.

To use a /-namespaced model on a provider other than OpenRouter, set provider_name explicitly in the RunRequest to bypass the heuristic.


Pricing

How pricing is resolved

go-code uses a two-layer pricing system:

  1. External pricing file — if HARNESS_PRICING_CATALOG_PATH is set, a FileResolver reads rates from that JSON file. The repository ships catalog/pricing.json (version "2026-04-28") as an optional override.
  2. Inline catalog pricing (default) — when HARNESS_PRICING_CATALOG_PATH is not set, rates come from the pricing block embedded in each model entry in catalog/models.json.

Pricing is computed per turn: (tokens / 1,000,000) * rate_usd. Cache-read tokens are billed at the lower cache_read_per_1m_tokens_usd rate when the model supports prompt caching.

The rates below come from the embedded pricing blocks in catalog/models.json and reflect what the default resolver uses. They are catalog data — not a billing source of truth. Actual charges depend on your provider's current pricing. Always verify against your provider's invoices before making cost decisions.

A known discrepancy exists between the two catalog files: catalog/pricing.json shows deepseek-chat at $0.27 input / $1.10 output per 1M tokens, while the inline block in catalog/models.json shows $0.28 / $0.42. The inline value is what the default resolver uses. The two files are not synchronized.

Catalog rates (USD per 1M tokens)

ProviderModelInputOutputCache read
openaigpt-4.1-mini$0.40$1.60
openaigpt-4.1$2.00$8.00
anthropicclaude-opus-4-6$15.00$75.00
anthropicclaude-sonnet-4-6$3.00$15.00
anthropicclaude-haiku-4-5-20251001$0.80$4.00
deepseekdeepseek-chat$0.28$0.42$0.014
deepseekdeepseek-reasoner$0.55$2.19$0.014
deepseekdeepseek-v4-flash$0.14$0.28
deepseekdeepseek-v4-pro$0.435$0.87
groqllama-3.3-70b-versatile$0.59$0.79
groqqwen-qwq-32b$0.20$0.20
xaigrok-3-mini$0.30$0.50
xaigrok-4-1-fast-reasoning$5.00$25.00
kimikimi-k2.5$0.35$1.40
qwenqwen-plus$0.80$2.00
qwenqwen-turbo$0.20$0.60
togethermeta-llama/Llama-4-Maverick-17B-128E$0.27$0.35
openrouteropenai/gpt-4.1-mini$0.44$1.76
openrouterdeepseek/deepseek-v4-pro$0.435$0.87$0.003625
openrouterdeepseek/deepseek-v4-flash$0.14$0.28$0.0028
geminigemini-2.0-flash$0.10$0.40
geminigemini-2.5-flash$0.15$0.60
geminigemini-2.5-flash-preview-04-17$0.15$0.60

Provider quirks

Quirks are string tags in the catalog entry that instruct the client to apply special handling automatically. You do not configure quirks directly — they are read at client-factory time and applied for every request to that provider.

Quirk tagProvidersWhat the client does
reasoning_content_passbackDeepSeek (all models, provider-level), xAI (provider-level), OpenRouter/DeepSeek routesReplays prior assistant reasoning content back to the API on multi-turn tool-use calls. Required for correct tool-use behavior with these models. Applied at the provider level; model-level quirk tags in the catalog are not consumed by the client factory.
speed_optimizedGroqInformational only; flags LPU-based inference. No behavioral change in the client.
no_parallel_tool_callsGeminiForces parallel_tool_calls: false on every request. Gemini does not support parallel tool calls and returns an error if they are requested.

Environment variable quick reference

The env vars that directly affect provider and model behavior:

VariableDefaultPurpose
HARNESS_MODEL"gpt-4.1-mini"Server-wide default model (layer 5 in the config cascade)
HARNESS_PROVIDERSet to "fake" for key-free deterministic smoke testing
HARNESS_FAKE_TURNSPath to turns JSON file; required when HARNESS_PROVIDER=fake
HARNESS_MODEL_CATALOG_PATHauto-detectedPath to catalog/models.json
HARNESS_PRICING_CATALOG_PATHPath to external pricing JSON; when unset, inline catalog pricing is used
HARNESS_OPENROUTER_REFERER"https://github.com/dennisonbertram/go-agent-harness"HTTP-Referer header sent to OpenRouter
HARNESS_OPENROUTER_TITLE"go-agent-harness"X-Title header sent to OpenRouter
OPENAI_API_KEYOpenAI key; also the legacy fallback bootstrap path
ANTHROPIC_API_KEYAnthropic key
DEEPSEEK_API_KEYDeepSeek key
GROQ_API_KEYGroq key
XAI_API_KEYxAI key
MOONSHOT_API_KEYKimi / Moonshot key
DASHSCOPE_API_KEYQwen / DashScope key
TOGETHER_API_KEYTogether AI key
OPENROUTER_API_KEYOpenRouter key
GOOGLE_API_KEYGoogle Gemini key

Next steps

  • Providers, Models, and Routing — the conceptual page explaining how routing, fallback, and cost accounting work end-to-end.
  • Configuration — the full 6-layer cascade for setting a default model in TOML config files.
  • HTTP Route Reference — full route inventory and RunRequest schema including provider_name, allow_fallback, fallback_providers, and max_cost_usd.
  • Events Reference — every event emitted during a run, including provider.resolved, usage.delta, and run.cost_limit_reached.