Parent: #5617 (Phase B, P1: item 19)
Why
Model discovery is static: listing only returns the hard-coded set. New or access-gated models (including ones intentionally kept out of the static set, like claude-fable-5 and claude-mythos-5; see item 18, #5626) never appear in reflection until someone edits the registry by hand. JS lists models from the API to capture both stable and beta; Go does the same with a short cache.
This keeps the plugin current without code changes and lets approved accounts see the models they actually have access to. It pairs with the registry refresh (item 18, #5626).
What needs to be done
- Discover available models from the Anthropic API (the listing that includes both stable and beta) and surface them, resolving each through the existing model-info / generic fallback so access-gated IDs appear for approved accounts.
- Fall back to the static set when the API is unreachable. A short cache (Go uses ~1h) is reasonable.
Acceptance
- Listing returns API-discovered models (stable + beta) when reachable, and falls back to the static set on error.
- Tests cover the dynamic path (mocked) and the static fallback.
Reference
- Current static listing:
py/plugins/anthropic/src/genkit/plugins/anthropic/plugin.py:131-146.
- JS target:
js/plugins/anthropic/src/list.ts:37 (beta.models.list()).
Parent: #5617 (Phase B, P1: item 19)
Why
Model discovery is static: listing only returns the hard-coded set. New or access-gated models (including ones intentionally kept out of the static set, like
claude-fable-5andclaude-mythos-5; see item 18, #5626) never appear in reflection until someone edits the registry by hand. JS lists models from the API to capture both stable and beta; Go does the same with a short cache.This keeps the plugin current without code changes and lets approved accounts see the models they actually have access to. It pairs with the registry refresh (item 18, #5626).
What needs to be done
Acceptance
Reference
py/plugins/anthropic/src/genkit/plugins/anthropic/plugin.py:131-146.js/plugins/anthropic/src/list.ts:37(beta.models.list()).