Problem/Motivation
Claude Haiku 4.5 models do not appear when filtering by ChatJsonOutput capability. The regex in getConfiguredModels() excludes Haiku:
'/claude-3\.[57]|claude-3-[57]|claude-4|claude-(opus|sonnet)-4/i'
This matches claude-opus-4 and claude-sonnet-4 but not claude-haiku-4.
Steps to reproduce
- Call
getConfiguredModels('chat', [AiModelCapability::ChatJsonOutput])
- Claude Haiku 4.5 models are not returned
Proposed resolution
Add haiku to the regex pattern:
'/claude-3\.[57]|claude-3-[57]|claude-4|claude-(opus|sonnet|haiku)-4/i'
Remaining tasks
- Update regex in
getConfiguredModels()
User interface changes
Haiku 4.5 models will appear in model selection when JSON output capability is required.
API changes
None.
Data model changes
None.
Comments
Comment #3
camoa commentedAdded haiku to the regex pattern on line 49 of AnthropicProvider.php:
-claude-(opus|sonnet)-4
+claude-(opus|sonnet|haiku)-4
Haiku 4.5 supports JSON output via prompt engineering and tool/function calling, which aligns with the current ChatJsonOutput capability definition. The Anthropic /v1/models API doesn't provide capability
metadata, so the regex-based approach is the only option for now.
MR ready for review.