Verdict: Accept
Type: Feature request
Duplicate: No
Already implemented: No
Confidence: High
Suggested labels: enhancement, accepted
Scope: Medium. The Claude status probe already starts an SDK session and reads initializationResult(). It has to keep that model list and merge unknown ids into the provider snapshot as built-in rows. Known catalog entries should keep T3's effort, fast-mode, and context-window descriptors. The web picker drops any row marked custom, so gateway ids cannot be stored that way.
What was asked
When Claude Code is pointed at an Anthropic-compatible gateway (ANTHROPIC_BASE_URL) and CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 is set, /model in Claude Code lists the gateway's models. T3's Claude picker does not. The ask is to use the model inventory the running Claude Code process already reports, the same way Codex does, and to keep the bundled catalog plus manual custom models when that inventory is missing. Not a CLIProxyAPI-specific client.
What the code does today
Confirmed on current main (d110f98670). The reported commit 75d63d64 is an ancestor, and nothing since then has changed this path. This is a missing capability, not a regression. The picker is doing what it was built to do.
checkClaudeProviderStatus builds the picker from the version-filtered bundled catalog plus customModels:
const models = providerModelsFromSettings(
resolveClaudeModelsForVersion(modelCatalog, parsedVersion),
claudeSettings.customModels,
DEFAULT_CLAUDE_MODEL_CAPABILITIES,
);
resolveClaudeModelsForVersion only drops catalog rows whose minVersion / maxVersionExclusive do not match claude --version. It never asks Claude Code which models exist.
The capability probe does call initializationResult(), and the instance environment is the env that probe uses (mergeProviderInstanceEnvironment in ClaudeDriver, then makeClaudeEnvironment). ANTHROPIC_BASE_URL and CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY set on the provider instance are therefore already in the subprocess. The probe then keeps account, slash commands, and usage, and drops models:
return {
email: account?.email,
subscriptionType: account?.subscriptionType,
tokenSource: account?.tokenSource,
apiProvider: account?.apiProvider,
slashCommands: parseClaudeInitializationCommands(init.commands),
...(usage ? { usage } : {}),
} satisfies ClaudeCapabilitiesProbe;
The Agent SDK's SDKControlInitializeResponse includes models: ModelInfo[] (value, displayName, description, and optional resolvedModel, supportsEffort, supportedEffortLevels, supportsFastMode, supportsAdaptiveThinking). supportedModels() is that same init snapshot. T3 does not read either.
Codex is the contrast the report describes. requestAllCodexModels pages model/list and publishes those rows with isCustom: false. Custom slugs are appended afterward.
The web picker will not show a Claude row that is marked custom. getAppModelOptions and getAppModelOptionsForInstance take only !model.isCustom from the snapshot, then rebuild custom rows from settings. Gateway ids have to be non-custom snapshot rows or they never appear unless they are also typed into custom models.
The manual-custom-model workaround in the report is the path that exists today. It goes stale when the gateway's /v1/models list changes.
Not a duplicate
No open issue asks T3 to follow Claude Code's model inventory or gateway discovery. Nearby closed work is different: #9383 maps a gateway-prefixed slug onto an existing catalog entry, #8964 and #4194 are effort controls on custom Claude models, #11369 is OpenRouter docs. #8652 (closed, not merged) would hide org-restricted catalog models. It would not add models the catalog does not already contain.
Implementation notes
On a successful probe, merge init.models into the snapshot:
- Match
value and resolvedModel to catalog slugs and aliases. Keep T3's descriptors for those rows (effort map, context-window tokens, model suffixes). The SDK flags can fill effort and fast mode only where the catalog row has none.
- Append ids that are not in the catalog as
isCustom: false, with capabilities taken from ModelInfo when present. Runtime resolution already passes unknown slugs through to Claude Code verbatim, which is what custom models do.
- If the probe fails or
models is empty, keep the current version-filtered catalog plus customModels.
- Leave the user's custom models as the settings-owned list. Do not write discovered ids back into settings.
Check a cold CLAUDE_CONFIG_DIR. The probe aborts the subprocess as soon as initializationResult() resolves, and Claude Code has not always finished gateway /v1/models discovery before that handshake. A cache warmed by an interactive claude session can hide that race. The capabilities cache also lives for 5 minutes, so a list that arrives late will not show up until the next probe.
Discovery stays Claude Code's job. T3 should not call the gateway's /v1/models itself.