ModelRoutingFilter
ModelRoutingFilter defines metadata-based criteria for filtering model candidates. All filters are ANDed — a model must pass every specified filter. Unset/zero-value fields are ignored (no filtering on that dimension).
Unset or zero fields do not filter that dimension. Unknown maximum-output metadata currently passes a minimum-output filter, while an empty modality list fails a required-modality check. A passing metadata check is not proof the provider will honor the eventual request.
maxPromptCost and maxCompletionCost compare per-token catalog prices; unknown/unparseable prices currently pass. They do not cap total tokens, tool costs, retries or aggregate provider spend. Before sending paid traffic, confirm which spending limits are actually enforced for your account; comprehensive spending controls are upcoming. Metadata-based capability filters also do not prove that a provider will honor a parameter on the eventual request.
Usage profiles
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
| In webhook payloads | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
minContextLength | string (int64) | Optional | Minimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$. |
minMaxCompletionTokens | string (int64) | Optional | Minimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$. |
requiredInputModalities | Array of string | Optional | Required input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict). |
requiredOutputModalities | Array of string | Optional | Required output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict). |
maxPromptCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive). |
maxCompletionCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive). |
excludeModerated | boolean | Optional | Exclude models with content moderation enabled. |
requiredParameters | Array of string | Optional | Required supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed. |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
minContextLength | string (int64) | Optional | Minimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$. |
minMaxCompletionTokens | string (int64) | Optional | Minimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$. |
requiredInputModalities | Array of string | Optional | Required input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict). |
requiredOutputModalities | Array of string | Optional | Required output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict). |
maxPromptCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive). |
maxCompletionCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive). |
excludeModerated | boolean | Optional | Exclude models with content moderation enabled. |
requiredParameters | Array of string | Optional | Required supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed. |
In webhook payloads
Webhook JSON uses protobuf field names (snake_case).
| Field | Type | Presence | Meaning |
|---|---|---|---|
min_context_length | string (int64) | Optional | Minimum context window (tokens). Models below this are excluded. Pattern: ^-?\d+$. |
min_max_completion_tokens | string (int64) | Optional | Minimum max completion tokens. Models below this are excluded. Models reporting 0 (unknown) pass through (permissive). Pattern: ^-?\d+$. |
required_input_modalities | Array of string | Optional | Required input modalities (e.g., ["image", "audio"]). Model must support ALL listed. Models with empty input_modalities are filtered out (strict). |
required_output_modalities | Array of string | Optional | Required output modalities (e.g., ["image"]). Model must support ALL listed. Models with empty output_modalities are filtered out (strict). |
max_prompt_cost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per prompt token (e.g., 0.000003). 0 = no limit. Unparseable pricing strings pass through (permissive). |
max_completion_cost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Maximum cost per completion token. 0 = no limit. Unparseable pricing strings pass through (permissive). |
exclude_moderated | boolean | Optional | Exclude models with content moderation enabled. |
required_parameters | Array of string | Optional | Required supported parameters (e.g., ["tools", "response_format"]). Model must support ALL listed. |
Where used
| Reference | Relationship |
|---|---|
| Create an agent profile | POST /api/v1/agent-profiles/create |
| Import a prompt library | POST /api/v1/agent-profiles/import |
| Update an agent profile | POST /api/v1/agent-profiles/update |
| Append a message without generating | POST /api/v1/llm/append-message |
| Create a new conversation thread | POST /api/v1/llm/create-thread |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Update context management settings | POST /api/v1/llm/update-context-management-settings |
| Update default generation config | POST /api/v1/llm/update-default-generation-config |
| Update the caller's default generation config | POST /api/v1/enduser/update-generation-config |
| Get an agent profile | POST /api/v1/agent-profiles/get |
| List agent profiles | POST /api/v1/agent-profiles/list |
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Get the caller's end-user profile | POST /api/v1/enduser/get |
| Generation configuration | API JSON uses JSON field names (camelCase). |
| llm.generation_started | Webhook JSON uses protobuf field names (snake_case). |
| llm.message_published | Webhook JSON uses protobuf field names (snake_case). |
| GenerationConfig | Nested in model |
| GenerationConfig | Nested in model |
| GenerationConfig | Nested in model |
Download the public reference contract.
Document: DOC-API-MODEL-model-routing-filter.