Currently, the AI Provider Anthropic module hardcodes available models in the getConfiguredModels()
method. This approach has several limitations:
claude-opus-4-20250514
, claude-sonnet-4-20250514
), new models are not immediately availableAnthropic provides a /v1/models
endpoint that returns a list of all available models, but this capability is not being utilized.
claude-opus-4-20250514
, claude-sonnet-4-20250514
) are not listed despite being available in Anthropic's APIImplement dynamic model detection by:
/v1/models
endpointThe implementation would query GET https://api.anthropic.com/v1/models
with appropriate headers and cache the results.
fetchAvailableModels()
methodgetConfiguredModels()
to use dynamic fetchingNo UI changes required. Models will automatically appear in existing model selection dropdowns.
Optional: Add a "Refresh models" button in the AI Provider configuration page to clear the cache and fetch updated models.
fetchAvailableModels()
getHardcodedModels()
(refactored from current implementation)ai_provider_anthropic.models
Active
1.1
Code