Skip to main content
GET /v1/models lists every model the workspace can use: Matrices models first, then concrete models, in selection-precedence order. Pass query to filter by ID: every whitespace-separated keyword must appear in it, case-insensitively, so claude opus finds the Claude Opus models. GET /v1/agents/{agentId}/models narrows the list to what one agent’s profile allows and names its current defaultModelId. Both are cursor-paginated with limit up to 200.

Matrices models

Four IDs under matrices/ are picks Matrices maintains for you: matrices/auto (what new profiles default to), matrices/efficient, matrices/balanced, and matrices/frontier. Each one points at a concrete catalog model, and Matrices re-points it as better models ship, so name one when you want “a good model for this job” rather than a specific one. A Matrices row in the catalog has provider: "matrices" and carries its current target’s limits, capabilities, and cost under the Matrices ID. It leaves out apiFamily, providerModel, reasoningEffort, thinkingBudgetTokens, cacheRetention, and serviceTier; the turn snapshot shows those for the concrete model it ran.

Catalog fields

cost carries input and output, optional cacheRead, cacheWrite, and reasoning, plus tiers. Each tier restates those rates above a contextOverTokens prompt-size threshold. A fast model’s ID ends in -fast, and the catalog always has its standard sibling: the same ID without the suffix. Scheduled turns run the standard sibling instead, including when a Matrices model points at a fast one.

Selector grammar

A profile’s models is an ordered list of one to eight unique selectors, at most 512 characters each: Each selector authorizes all of its current matches and contributes one preferred target: its first match in precedence order that an earlier selector hasn’t already claimed. The first selector’s preferred target is the profile’s default. Matrices models sort first, so * and matrices/* prefer matrices/auto. Wildcards are dynamic: a new matching model becomes usable without a profile edit. Writing a profile rejects a selector that matches nothing in the catalog, and one that adds no preferred target because earlier selectors already claimed every match. If a profile’s selectors later match nothing at all, GET /v1/agents/{agentId}/models answers 400 with no_model_available. A thread’s or message’s optional model must be one exact ID, Matrices or concrete, that the profile’s selectors authorize. Wildcards are rejected there, and model is not accepted alongside mode: "steer". A new thread defaults to the profile’s preferred model; a later message defaults to the thread’s latest selection while the profile still allows it. A model hook takes one exact ID too; leave it empty for the platform default.

What a turn pins

The turn snapshot’s resolvedConfig.model is the concrete target the turn runs: id, provider, apiFamily, providerModel, the token limits, the modality and capability flags, imageInputFormats, and the reasoning, cache, and tier settings. A Matrices model is resolved here, so its provider is the upstream one, never matrices. Changing a profile’s models, or Matrices re-pointing an alias, moves the next admitted turn, never one in flight.

Usage accounting

Events and turn results carry usage: inputTokens, outputTokens, totalTokens, and, where they apply, cacheReadTokens, cacheWriteTokens, reasoningTokens, and estimatedCost in USD. A turn snapshot’s totalUsage adds context compaction on top of the turn’s own samples. Recorded spend covers every paid call an agent makes: model samples and compaction, model hooks, tool-search ranking, subscription triage, and priced tools such as web search, image generation, and the sandbox. That spend is what the two caps measure. A profile’s budget caps each agent’s own recorded spend in its window (24h, 7d, monthly, or total), and a thread’s maxCost caps that thread’s lifetime spend. Before each paid call the runtime checks recorded spend against both, so the call that crosses a cap still completes and the next one is refused: the turn fails with budget_exhausted and failureDetails.scope set to profile or thread. GET /v1/agents/{agentId}/budget returns the profile’s budget next to the agent’s spend in that window, as baseline; it is null when the profile has no budget.