Skip to main content
When a request uses “model”: “auto”, MKA1 applies the organization’s auto policy for that endpoint. By default, auto is a direct alias to a model in the model registry. Organizations can also configure an LLM judge to select from an approved set of models. The judge is given signals about the request, the available models, and the existing conversation so it can choose the model best suited to the work.

Supported endpoints

Judge-based selection is available for several types of AI request. Only models suited to the request type are considered. For example, a TTS model cannot be selected for a Responses request.

How model selection works

The organization defines the models that may be selected. For each request, MKA1 excludes candidates that are no longer active in the organization’s registry or that cannot handle the request, such as a model without image input for a request that contains an image. If only one suitable model remains, MKA1 selects it directly; when several are available, the configured judge chooses among them. Each judged request makes one extra model call to the judge. The call is billed at the judge model’s price and counts toward your budgets, but it is not included in the response’s usage. It also adds a full judge round trip before the selected model starts, and a streamed response opens only after the judge has chosen. A judge policy does not fail over. If the selected model fails, the request fails: MKA1 does not try another candidate, and the candidates’ reroute rules do not apply. Provider health is not a selection signal, so a selected model whose provider is unavailable also fails the request. If no suitable model remains, or if the configured judge is unavailable or fails, MKA1 returns a transparent error instead of silently changing the policy. See Errors.

Signals used for model selection

MKA1 gives the judge a consistent view of the factors that matter for the current request:
  • Request and tools: the nature of the task, available tools, requested output, and whether images, audio, or files are present. Models that can work with the original input directly are preferred.
  • Model capabilities: supported modalities and file types, available context, and other requirements needed to complete the request.
  • Price: each candidate’s per-unit rates at your organization’s effective price. A model without a price counts as free.
  • Latency: rolling latency and failure-rate estimates that the gateway measures on live traffic.
  • Evals: the most recent completed eval runs from your own team that score two or more of the candidates. Platform benchmarks are not used.
  • Conversation continuity: for a Responses request that continues a conversation, which candidate served the previous response and how many tokens it processed, so the judge can weigh staying on that model to keep cost and latency down.
The selected policy tells the judge which of these signals matters most:
  • balanced considers quality, price, speed, capabilities, and conversation continuity together.
  • price prioritizes the lowest expected cost among models suited to the request.
  • quality prioritizes task fit and evaluation results, and ignores conversation continuity.
  • speed prioritizes responsiveness using rolling latency and reliability signals.
Capability requirements always apply, regardless of policy. The best choice can change as the request, model availability, performance, or conversation evolves.

Privacy and safety

The judge receives a bounded, sanitized summary of the request and its tool requirements. Credentials and raw binary content are not forwarded. The organization’s normal safety policies still apply, and the judge can select only from models the organization has approved for the policy.

Inspect the current policy

The auto endpoints are organization admin operations: the API key needs the read:registry scope to list overrides and write:registry to change them. Each override’s mode is either direct or the judge policy name, so read that field first to know which other fields are present.
A direct override resembles:

Configure an LLM judge

The following example enables judge-based model selection for LLM requests using the balanced policy. Set policy to price, quality, or speed to emphasize a different goal. The judge and every candidate must be valid LLM model identifiers available to the organization. Choose a fast, non-reasoning judge that supports structured outputs, such as openai:gpt-4.1-nano: the judge runs before every judged request and must return its choice as structured JSON. Model availability is organization-specific; replace the example IDs with IDs returned by GET /models for your organization.
The stored override reports the policy as its mode, plus which of the configured models currently resolve:
This candidate set pairs a Portuguese-tuned model with a general one: a request in Portuguese can route to meetkai:functionary-pt, while other requests can route to openai:gpt-4.1-mini. You can configure responses, completions, transcriptions, and tts independently. Endpoints without an organization override retain direct model-registry alias routing.

Validate the selected model

Make a normal request using “model”: “auto”:
The response echoes the alias you sent in its model field and names the model that actually served the request in resolved_model. With a direct policy, that is the registry alias target, or the model a reroute rule sent the request to. With an LLM judge configured, it is the approved candidate selected for the request. resolved_model is a Responses API field. Chat Completions returns only the requested name in model and does not report the model that served the request. When you stream a response, read resolved_model from the final event, such as response.completed. The response.created event carries only the first resolution, which a reroute can change later in the request. A background request with a judge policy reports no resolved_model until the final event.

Errors

When auto routing cannot select a model, the request fails with HTTP 503 and one of these codes in error.code: A streamed request receives the error as a normal HTTP response, before the stream opens. A background request that fails selection after it was queued ends with status: “failed” and the same code in error.code. In GET /models/auto, judge_resolvable: false points to auto_judge_unavailable, and an empty resolvable_candidate_model_ids to auto_no_eligible_models.

Restore direct routing

Set a direct policy explicitly:
Or, clear your org’s override so “model”: “auto” falls through to the cluster default again: