Skip to content

Commit bc62b39

Browse files
committed
docs(gateway): document model runtime metadata
1 parent 93c00a0 commit bc62b39

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/gateway/protocol.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,18 @@ terminal summary, and sanitized error text.
631631
- `"configured"`: picker-sized behavior. If `agents.defaults.models` is configured, it still wins, including provider-scoped discovery for `provider/*` entries. Without an allowlist, the response uses explicit `models.providers.*.models` entries, falling back to the full catalog only when no configured model rows exist.
632632
- `"all"`: full Gateway catalog, bypassing `agents.defaults.models`. Use this for diagnostics and discovery UIs, not normal model pickers.
633633

634+
Each returned model choice includes stable selector fields such as `id`, `name`, `provider`, and optional metadata including `alias`, `available`, `contextWindow`, and `reasoning`. When a model is resolved through a non-default agent runtime backend, the response may also include optional `agentRuntime` metadata:
635+
636+
- `agentRuntime.id`: runtime backend id used for the model choice, such as `codex`.
637+
- `agentRuntime.label`: human-readable runtime label for picker display.
638+
- `agentRuntime.source`: where the runtime assignment came from:
639+
- `"implicit"`: default runtime implied by provider/model routing.
640+
- `"model"`: explicit runtime metadata on the configured model row.
641+
- `"provider"`: explicit runtime metadata inherited from the configured provider.
642+
- `"session-key"`: runtime selected from session-key model/routing metadata.
643+
644+
Clients should treat `agentRuntime` as optional and preserve `id` as the canonical model value for requests; `label` is display metadata only.
645+
634646
## Exec approvals
635647

636648
- When an exec request needs approval, the gateway broadcasts `exec.approval.requested`.

0 commit comments

Comments
 (0)