{"version":"2.1.124","anchor":"gateway-model-discovery-for-anthropic-base-url","canonical_anchor":"gateway-model-discovery-for-anthropic-base-url","heading":"Gateway model discovery for ANTHROPIC_BASE_URL","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.124\/e\/gateway-model-discovery-for-anthropic-base-url","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.124","markdown":"### Gateway model discovery for `ANTHROPIC_BASE_URL`\n\n**What**\n\nWhen `ANTHROPIC_BASE_URL` is set against a first-party gateway, Claude Code now discovers the gateway's available Claude\/Anthropic models on startup and lists them in the model picker labelled `From gateway`.\n\n**Details**\n\n- On startup it issues `GET <baseUrl>\/v1\/models?limit=1000` (using whichever of `ANTHROPIC_AUTH_TOKEN` \/ API key is configured plus any `ANTHROPIC_CUSTOM_HEADERS`), filters to entries whose `id` starts with `claude` or `anthropic`, and caches them in `<config-dir>\/cache\/gateway-models.json` keyed by base URL.\n- Empty \/ non-OK responses are dropped with debug logs: `[gatewayDiscovery] non-OK status \u2026`, `[gatewayDiscovery] response body failed validation`, `[gatewayDiscovery] 0 usable models after filter`, `[gatewayDiscovery] cached N models`.\n- Discovery is skipped when the host manages the provider (`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`) or when not in first-party mode.\n- The `\/model` picker merges these into the available list so Bedrock\/Vertex-only models get inline labels and descriptions instead of being hidden.\n\n**Evidence**\n\nGateway discovery (search for `\"gateway-models.json\"`, `\"\/v1\/models?limit=1000\"`, and `\"From gateway\"`)."}