Tin
Reference · Model providers

On this page

Model providers

Every model an agent can use: Anthropic, OpenAI and any OpenAI-compatible server, Gemini, Mistral, local Ollama and llama.cpp, and more, plus fallback and routing.

Naming a model

An agent's model is "provider:model". The provider is the text before the first colon when it is one of the names below; the rest is that provider's own model id, colons included ("ollama:llama3.2:3b"). Bare Claude names ("claude-opus-5-5") and "mock" need no prefix. Keys, base URLs and headers come from the environment, never from the source, so the same program runs against another server by changing the environment only.

Every provider

ProviderExampleSpeaksEnvironmentBrowser
offline stand-in"mock"nothingnothingyes
Anthropic "claude-opus-5-5" Messages (SDK in the CLI, fetch in the browser) ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL yes (sends the direct-browser-access header)
OpenAI, or any OpenAI-compatible server "openai:gpt-5.1" Chat Completions OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_HEADERS depends on the endpoint's CORS policy
OpenAI Responses API "openai-responses:gpt-5.1" Responses (stateless, store: false) OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_HEADERS depends on the endpoint's CORS policy
Google Gemini "gemini:gemini-3-pro" generateContent (streamed) GEMINI_API_KEY, GOOGLE_API_KEY, GEMINI_BASE_URL depends on the API's CORS policy
Mistral "mistral:mistral-large-latest" Chat Completions (Mistral dialect) MISTRAL_API_KEY, MISTRAL_BASE_URL depends on the API's CORS policy
Ollama "ollama:llama3.2" native /api/chat runs locally; OLLAMA_HOST, OLLAMA_API_KEY if OLLAMA_ORIGINS allows the page
llama.cpp server "llamacpp:default" llama-server /v1/chat/completions runs locally; LLAMACPP_BASE_URL, LLAMACPP_API_KEY if the server allows the page
Llama API "llamaapi:Llama-4-Maverick-17B-128E-Instruct-FP8" native event stream LLAMA_API_KEY, LLAMA_API_BASE_URL depends on the API's CORS policy
LiteLLM proxy "litellm:anthropic/claude-opus-5-5" Chat Completions, routed by the proxy runs locally; LITELLM_BASE_URL, LITELLM_API_KEY if the proxy's CORS settings allow the page
Writer "writer:palmyra-x5" Chat Completions WRITER_API_KEY, WRITER_BASE_URL depends on the API's CORS policy
Vercel AI Gateway "vercel:anthropic/claude-opus-5-5" Chat Completions via the gateway AI_GATEWAY_API_KEY, VERCEL_OIDC_TOKEN, AI_GATEWAY_BASE_URL depends on the gateway's CORS policy
Amazon Bedrock "bedrock:us.anthropic.claude-haiku-4-5-20251001-v1:0" ConverseStream (binary event stream), Bearer API key or SigV4 AWS_BEARER_TOKEN_BEDROCK, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION, AWS_DEFAULT_REGION, BEDROCK_BASE_URL yes with a Bedrock API key (the runtime endpoint allows any origin, checked 2026-11-16); access keys work too, but keep long-lived keys out of web pages
Claude on Bedrock (Messages API) "bedrock-anthropic:us.anthropic.claude-haiku-4-5-20251001-v1:0" Anthropic Messages API over InvokeModelWithResponseStream (anthropic_version bedrock-2023-05-31, betas in the body): every agent option, thinking blocks + signatures as the Messages API returns them AWS_BEARER_TOKEN_BEDROCK, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION, AWS_DEFAULT_REGION, BEDROCK_BASE_URL as bedrock:

Every provider streams reply text to on text, passes tool calls and results, and reports token usage and the stop reason (finished, tool call, cut off, refused) the same way, so maxTokens, typed replies and A.try behave alike everywhere. Every one is plain fetch; only Claude in the CLI uses an SDK (skip it with TIN_PROVIDER=fetch). Each is tested against recorded or scripted HTTP, and the local ones against a small mock server; none of the tests calls a live model.

Claude gets two extras, in the CLI and the browser alike. Prompt caching is on: the system prompt, the tools and each turn's conversation are marked for the cache, so a long agent run pays full price only for what is new (TIN_PROMPT_CACHE=off turns it off). Extended thinking is off until TIN_THINKING=adaptive or a budget such as TIN_THINKING=8000; thinking is sent back unchanged on the next turn and never reaches on text. Gemini, the Responses API and Mistral's reasoning models also keep their thinking out of the reply and pass it back as the provider requires.

OpenAI-compatible servers

openai: reaches anything that speaks Chat Completions. Point OPENAI_BASE_URL at it, up to and including the version segment:

OPENAI_BASE_URL=http://localhost:8000/v1 tin run main.tin             # vLLM, with model: "openai:Qwen/Qwen3-8B"
OPENAI_BASE_URL=https://api.groq.com/openai/v1 OPENAI_API_KEY=… tin run main.tin
OPENAI_BASE_URL=https://openrouter.ai/api/v1 OPENAI_API_KEY=… tin run main.tin
OPENAI_HEADERS='{"api-key":"…"}' OPENAI_BASE_URL=https://my-gateway/v1 tin run main.tin   # a key in another header

Away from OpenAI's own API the key is optional and the output limit is sent as max_tokens.

Local models

  • Ollama: ollama pull llama3.2, then model: "ollama:llama3.2". OLLAMA_HOST takes Ollama's own forms (gpu-box, 0.0.0.0:11434).
  • llama.cpp: llama-server -m model.gguf --jinja, then model: "llamacpp:default". Tool calls need --jinja; the error says so if it is missing.
  • LiteLLM: litellm --config config.yaml, then model: "litellm:<a model in its config>".

Amazon Bedrock

bedrock: speaks the ConverseStream API over fetch, with no SDK. Its binary event stream is decoded in src/event-stream.ts, and both of each frame's checksums are checked, so a cut stream fails instead of losing text. Name a model id or an inference profile id; most current models need the profile (us., eu., global. …):

AWS_BEARER_TOKEN_BEDROCK=… AWS_REGION=us-west-2 tin run main.tin   # model: "bedrock:us.anthropic.claude-haiku-4-5-20251001-v1:0"
AWS_ACCESS_KEY_ID=… AWS_SECRET_ACCESS_KEY=… AWS_SESSION_TOKEN=… tin run main.tin
eval "$(aws configure export-credentials --format env)" && tin run main.tin   # an SSO or profile login
  • Keys: a Bedrock API key (AWS_BEARER_TOKEN_BEDROCK) is used first. Otherwise access keys are signed with SigV4 (src/aws-sign.ts, WebCrypto). Tin reads only these variables, not ~/.aws profiles; export a profile's keys as above.
  • Region: AWS_REGION, then AWS_DEFAULT_REGION, then the region in an ARN model id, then us-west-2. BEDROCK_BASE_URL replaces the endpoint (a VPC endpoint or a proxy).
  • Prompt caching: Claude models get cache points on the system prompt, the tools and the latest user turn. Nova Pro, Lite, Micro and 2 Lite get them only after text, which is the only place Nova accepts them. Other models get none. TIN_PROMPT_CACHE=off turns it off. TIN_THINKING works for Claude models.
  • Output limit: if a model says the requested maxTokens is over its limit (Nova Lite allows 10000), the call is sent once more at that limit, and later calls use it straight away.
  • Errors say what to do: an unknown model id, a model that needs an inference profile, a model your account has not enabled, a refused key, and throttling (retried three times first).

Checked live on 2026-11-16 with a Bedrock API key in us-west-2: the tool-using agent program on Claude Haiku 4.5 and Nova Lite, a cache write then a cache read on both, and the error text for an unknown id and for a model called without its profile.

Claude on Bedrock with the Messages API

bedrock-anthropic: sends a Claude model on Bedrock the Anthropic Messages API instead of Converse (InvokeModelWithResponseStream, anthropic_version: "bedrock-2023-05-31"). The request is the one anthropic: builds, so every agent option (thinking, effort, stop, toolChoice, cache, betas, body) means the same thing; betas go in the body as anthropic_beta, other headers: are sent. Same keys and region as bedrock:.

agent A {
  model: "bedrock-anthropic:us.anthropic.claude-haiku-4-5-20251001-v1:0"
  thinking: budget(1024)
  interleaved: true
  tools: [mul]
}

Fallback and routing

agent Helper { model: "openai:gpt-5.1 | anthropic:claude-opus-5-5 | ollama:llama3.2" }
agent Triage { model: "route(by: openai:gpt-5.1-mini; quick: ollama:llama3.2; deep: claude-opus-5-5)" }

a | b moves to the next model when one fails (no key, rejected key, missing model, rate limited after retries, unreachable), starting each call with the model that has failed least recently. Refusals and cut-off replies are answers, not failures. route(…) asks the by model, once per question, which labelled candidate should answer; if it fails or is unclear, the first candidate answers. "openai:gpt-5.1 | mock" runs offline when there is no key.

When a call fails

A failed call is a panic that names the agent, or Err(AgentError) from A.try. The message names the provider and the case, and says what to do:

Calc: no model key: set GEMINI_API_KEY (or GOOGLE_API_KEY), or run offline with `model: "mock"`
Calc: model call failed: openai did not accept the key for gpt-5.1 (401): Incorrect API key provided — check your API key
Calc: model call failed: ollama has no model 'llama3.2' — pull it with `ollama pull llama3.2`
Calc: model call failed: could not reach llama.cpp at http://localhost:8080/v1/chat/completions (fetch failed) — is llama-server running? …

429 and 5xx answers and network errors are retried twice, with a growing delay, before the call fails.

In the browser

The playground lets you pick any provider, paste a key and set a base URL. They stay in the tab (in localStorage only if you tick "remember") and go only to that provider. A provider that does not allow calls from web pages fails with "could not reach"; the CLI has no such limit. Bedrock's runtime endpoint allows any origin, so a Bedrock API key works from the playground; pick another region with its endpoint as the base URL.

From JavaScript

envModels(env) from src/env-models.ts gives a host every provider, configured from the variable names above, with routing; languageModels({ name: model }) from src/vercel-provider.ts takes any AI SDK model. Each provider's options are in docs/HOST-API.md.

Anthropic API parity

docs/parity/anthropic.json lists every request parameter, content block, stream event, delta, stop reason, usage field, beta header, endpoint and error of @anthropic-ai/sdk 1.9.0, read from its types by npm run parity:anthropic. npm test fails when an item is missing or when the SDK has one the matrix does not list. Agent-side (this page and agent options): 203 supported, 368 not applicable, 0 missing; 106 of the supported ones were checked live (Claude Haiku 4.5 through Bedrock), the rest against requests and streams built from the API reference. Server tools, Files, Batches and the rest are on the Anthropic page.

KindSupportedLiven/aMissing
beta331100
block.in12700
block.out6300
cache_control2200
citation5500
delta6500
document.field4400
document.source5500
endpoint223500
error37020
event6600
image.source3300
message10620
metadata1100
output_config3200
param241510
removed0030
stop_reason7400
thinking4400
thinking.field3300
tool_choice4400
tool_choice.field4300
tool10900
usage121200

Not applicable, and why:

  • platform/admin beta for a non-Messages API; any beta string can still be sent with `betas: [...]`
  • organization/admin/managed-platform API, not part of a model call or the agent primitive; reachable with fetch() and a header
  • aborting is task.stop() / within(...) in Tin: the call is dropped and the task stops (Stopped), no error value
  • an SDK-internal marker class for its own retry loop, not an API response
  • always "assistant"
  • always "message"
  • the beta spelling of output_config.format (structured-outputs-2025-11-13); Tin sends the GA output_config.format, which every model with structured outputs takes
  • removed from the Messages API (SDK 1.8.0 has no such param; 400 since API version 2026-10-21). On anthropic:/claude-* models temperature:/topP:/topK: are a compile error whose note points to effort:; other providers still take them
Every item except endpoints and beta names (176)
ItemStateIn Tin
block.in:compactionsupportedthe compaction block goes back as the API sent it
block.in:documentsupported (live)A.ask([pdf(bytes) | pdfUrl(url) | document(text) | documentChunks([...]) | documentFile(id), ...])
block.in:fallbacksupportedsent back as the API produced it (raw)
block.in:imagesupported (live)A.ask([text(...), image(bytes, mediaType) | imageUrl(url) | imageFile(id)])
block.in:redacted_thinkingsupportedraw blocks round-trip, data included
block.in:search_resultsupported (live)A.ask([searchResult(source, title, texts), ...])
block.in:textsupported (live)user/assistant text
block.in:thinkingsupported (live)assistant turns go back as the raw blocks, signature included
block.in:tool_additionsupportedA.ask([toolAddition(def), ...]) (beta mid-conversation tool changes)
block.in:tool_removalsupportedA.ask([toolRemoval(def), ...])
block.in:tool_resultsupported (live)tool fn results, is_error on failure
block.in:tool_usesupported (live)assistant tool calls sent back
block.out:compactionsupportedassembled from compaction_delta; goes back unchanged (raw)
block.out:fallbacksupportedkept in raw and sent back unchanged
block.out:redacted_thinkingsupportedkept in raw
block.out:textsupported (live)reply text
block.out:thinkingsupported (live)kept in raw with its signature
block.out:tool_usesupported (live)tool calls
cache_control:ttlsupported (live)cache: { ttl: 5min | 1h } on every automatic breakpoint
cache_control:typesupported (live)automatic ephemeral breakpoints on system, tools, last user turn
citation:char_locationsupported (live)A.lastReply().citations (as sent); text blocks keep them in the conversation
citation:content_block_locationsupported (live)A.lastReply().citations (as sent); text blocks keep them in the conversation
citation:page_locationsupported (live)A.lastReply().citations (as sent); text blocks keep them in the conversation
citation:search_result_locationsupported (live)A.lastReply().citations (as sent); text blocks keep them in the conversation
citation:web_search_result_locationsupported (live)A.lastReply().citations (as sent); text blocks keep them in the conversation
delta:citations_deltasupported (live)assembled into the text block and A.lastReply().citations
delta:compaction_deltasupportedcontent + encrypted_content assembled into the compaction block
delta:input_json_deltasupported (live)tool input assembled
delta:signature_deltasupported (live)assembled into the signature
delta:text_deltasupported (live)streamed to onText
delta:thinking_deltasupported (live)assembled into the thinking block
document.field:cache_controlsupported (live).cached("5m" | "1h")
document.field:citationssupported (live).cited()
document.field:contextsupported (live).context(c)
document.field:titlesupported (live).titled(t)
document.source:base64supported (live)pdf(bytes)
document.source:contentsupported (live)documentChunks(chunks)
document.source:filesupported (live)documentFile(fileId)
document.source:textsupported (live)document(text)
document.source:urlsupported (live)pdfUrl(url)
error:AnthropicErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:APIConnectionErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:APIConnectionTimeoutErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:APIUserAbortErrorn/aaborting is task.stop() / within(...) in Tin: the call is dropped and the task stops (Stopped), no error value
error:AuthenticationErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:AvailableToolsLimitExceededErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:BadRequestErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ClientClosedRequestErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionBlockAmbiguousErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionBlockMisplacedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionContentMismatchErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionIncompleteTurnErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionNothingToSummarizeErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionSignatureInvalidErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionToolChangesMismatchErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionTooManyToolReferencesErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:CompactionUnavailableErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ConflictErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ContentTooLargeErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:GatewayTimeoutErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:InternalServerErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:NotFoundErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:NotImplementedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:OverloadedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:PermissionDeniedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:PreconditionFailedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:RateLimitErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:RequestHeaderFieldsTooLargeErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:RequestTimeoutErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:RetryableErrorn/aan SDK-internal marker class for its own retry loop, not an API response
error:ServiceUnavailableErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ThreadAlreadyContinuedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ThreadContinueInFlightErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ThreadFingerprintMismatchErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ThreadNotFoundErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ThreadUnsupportedRequestErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ToolNameConflictErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:ToolReferenceUnresolvedErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
error:UnprocessableEntityErrorsupportedA.try → Err(Failed(message)): the message names the status and the API error text, plus "(request <id>)"; A.lastReply().status/.error; 429/5xx/529 retried with backoff, retry-after(-ms) honoured
event:content_block_deltasupported (live)std/models/anthropic.tin reads every stream event
event:content_block_startsupported (live)std/models/anthropic.tin reads every stream event
event:content_block_stopsupported (live)std/models/anthropic.tin reads every stream event
event:message_deltasupported (live)std/models/anthropic.tin reads every stream event
event:message_startsupported (live)std/models/anthropic.tin reads every stream event
event:message_stopsupported (live)std/models/anthropic.tin reads every stream event
image.source:base64supported (live)image(bytes, mediaType)
image.source:filesupported (live)imageFile(fileId)
image.source:urlsupported (live)imageUrl(url)
message:contentsupported (live)reply blocks
message:context_managementsupportedA.lastReply().extra.field("context_management")
message:diagnosticssupportedA.lastReply().extra.field("diagnostics")
message:idsupported (live)A.lastReply().id
message:input_transformationssupportedA.lastReply().extra.field("input_transformations")
message:modelsupported (live)A.lastReply().model
message:rolen/aalways "assistant"
message:stop_detailssupportedrefusal: AgentError Refused(explanation or category)
message:stop_reasonsupported (live)stop
message:stop_sequencesupported (live)A.lastReply().stopSequence
message:typen/aalways "message"
message:usagesupported (live)tokens
metadata:user_idsupported (live)metadata: { userId: ... }
output_config:effortsupported (live)effort: low | medium | high | xhigh | max
output_config:formatsupported (live)output: json — typed replies (let x: T = A.ask(q)) through structured outputs, schema from the Tin type; output: tool (default) keeps the answer tool
output_config:task_budgetsupportedtaskBudget: { ... } (beta task-budgets; add betas:)
param:betassupported (live)betas: ["..."] → anthropic-beta (merged with headers: and implied betas)
param:cache_controlsupported (live)cache: server (or { ttl: 1h, server: true }): top-level cache_control, the API places the breakpoint
param:compactionsupportedcompaction: { type: "summarize", ... } (beta; add betas:)
param:context_managementsupportedcontextManagement: { edits: [...] } (beta; add betas:)
param:diagnosticssupporteddiagnostics: { previous_message_id: ... }
param:fallback_credit_tokensupportedfallbackCreditToken: "..." (beta)
param:fallbackssupportedfallbacks: { ... } (beta)
param:inference_geosupported (live)inferenceGeo: "us"
param:max_tokenssupported (live)agent `maxTokens:`
param:messagessupported (live)the agent loop builds the conversation
param:metadatasupported (live)metadata: { userId: ... }
param:modelsupported (live)agent `model:`
param:output_configsupported (live)effort: (format: see output_config:format)
param:output_formatn/athe beta spelling of output_config.format (structured-outputs-2025-11-13); Tin sends the GA output_config.format, which every model with structured outputs takes
param:service_tiersupported (live)serviceTier: auto | standardOnly
param:speedsupportedspeed: standard | fast
param:stop_sequencessupported (live)stop: ["..."]
param:streamsupported (live)always streamed; text deltas reach onText
param:systemsupported (live)agent `system:`
param:thinkingsupported (live)thinking: adaptive | budget(n) | betweenTools | off
param:threadsupportedthread: { ... } (beta message threads)
param:tool_choicesupported (live)toolChoice: auto | any | none | <tool name>
param:toolssupported (live)agent `tools:` (tool fn → custom tool with input_schema from the type)
param:user_profile_idsupportedheader param: headers: { "anthropic-user-profile-id": ... }
param:workspace_idsupportedheader param: headers: { "anthropic-workspace-id": ... }
removed:temperaturen/aremoved from the Messages API (SDK 1.8.0 has no such param; 400 since API version 2026-10-21). On anthropic:/claude-* models temperature:/topP:/topK: are a compile error whose note points to effort:; other providers still take them
removed:top_kn/aremoved from the Messages API (SDK 1.8.0 has no such param; 400 since API version 2026-10-21). On anthropic:/claude-* models temperature:/topP:/topK: are a compile error whose note points to effort:; other providers still take them
removed:top_pn/aremoved from the Messages API (SDK 1.8.0 has no such param; 400 since API version 2026-10-21). On anthropic:/claude-* models temperature:/topP:/topK: are a compile error whose note points to effort:; other providers still take them
stop_reason:compactionsupportedcontinued like pause_turn: the reply goes back unchanged and the model carries on
stop_reason:end_turnsupported (live)stop "end"
stop_reason:max_tokenssupported (live)stop "max_tokens"
stop_reason:model_context_window_exceededsupportedA.try → Err(Cut), message says the context window is full; lastReply().stopReason
stop_reason:refusalsupportedstop "refusal" + stop_details
stop_reason:stop_sequencesupported (live)the answer ends there; A.lastReply().stopReason + stopSequence
stop_reason:tool_usesupported (live)runs the tools
thinking:adaptivesupported (live)thinking: adaptive
thinking:between_toolssupported (live)thinking: betweenTools
thinking:disabledsupported (live)thinking: off
thinking:enabledsupported (live)thinking: budget(8000)
thinking.field:adaptive.displaysupported (live)thinkingDisplay: summarized | omitted
thinking.field:enabled.budget_tokenssupported (live)budget(n), n >= 1024 checked at compile time
thinking.field:enabled.displaysupported (live)thinkingDisplay: summarized | omitted
tool_choice:anysupported (live)toolChoice: any
tool_choice:autosupported (live)toolChoice: auto
tool_choice:nonesupported (live)toolChoice: none
tool_choice:toolsupported (live)toolChoice: <one of the agent tools>
tool_choice.field:any.disable_parallel_tool_usesupportedparallelTools: false
tool_choice.field:auto.disable_parallel_tool_usesupported (live)parallelTools: false
tool_choice.field:tool.disable_parallel_tool_usesupported (live)parallelTools: false
tool_choice.field:tool.namesupported (live)the tool name, checked against tools: [...]
tool:allowed_callerssupportedtoolFields: { name: { allowed_callers: [...] } }
tool:cache_controlsupported (live)toolFields: { name: { cache_control: {...} } } (the automatic breakpoint goes on the last tool)
tool:defer_loadingsupported (live)toolFields: { name: { defer_loading: true } }
tool:descriptionsupported (live)/// doc comment
tool:eager_input_streamingsupported (live)toolFields: { name: { eager_input_streaming: true } }
tool:input_examplessupported (live)toolFields: { name: { input_examples: [...] } }
tool:input_schemasupported (live)from the parameter types
tool:namesupported (live)tool fn name
tool:strictsupported (live)strictTools: true, or toolFields: { name: { strict: true } }
tool:typesupported (live)custom tools are sent without type (the API default "custom"); toolFields: { name: { type: "custom" } } sets it
usage:cache_creationsupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:cache_creation_input_tokenssupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:cache_read_input_tokenssupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:fallback_creditsupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:inference_geosupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:input_tokenssupported (live)inputTokens
usage:iterationssupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:output_tokenssupported (live)outputTokens
usage:output_tokens_detailssupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:server_tool_usesupported (live)A.lastReply().raw.field("server_tool_use") (web_search_requests, web_fetch_requests)
usage:service_tiersupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)
usage:speedsupported (live)A.lastReply().usage (input, output, cacheRead, cacheWrite, thinking) and .raw (the usage object as sent: cache_creation by TTL, server_tool_use, service_tier, speed, inference_geo, iterations, fallback_credit)

Trying them live

npm run smoke:bedrock runs the Bedrock checks above with your key (at most 20 calls, on Haiku and Nova Lite). npm run smoke:providers runs one small agent program against every provider whose key (or local server) is set in your environment, and skips the rest. It is not part of npm test, and it costs a few tokens per provider.