Skip to content

Conversation

@ksylvan
Copy link
Collaborator

@ksylvan ksylvan commented Dec 8, 2025

Add support for new ClaudeHaiku 4.5 models

Summary

This PR adds support for two new Claude Haiku 4.5 model variants to the Anthropic plugin's available model list. The changes enable users to access the latest Haiku models when interacting with the AI plugin.

Related issues

closes #1854

Files Changed

internal/plugins/ai/anthropic/anthropic.go

  • Added two new Claude Haiku model variants to the model list initialization in the NewClient() function.

Code Changes

The following lines were added to the NewClient() function's model list (after the existing Opus 4.5 model entry):

string(anthropic.ModelClaudeHaiku4_5),
string(anthropic.ModelClaudeHaiku4_5_20251001),

These additions extend the existing model slice that previously included Claude Sonnet and Opus variants, now making the lightweight Haiku models available for selection.

Reason for Changes

The Anthropic API has introduced new Claude Haiku 4.5 model variants with improved capabilities. By adding these models to the available options, users of this plugin can now:

  • Access more model choices suited to different use cases
  • Leverage the Haiku model's efficiency and cost-effectiveness for appropriate workloads
  • Benefit from the latest model versions released by Anthropic

Impact of Changes

  • Functionality: Expands the range of available AI models without breaking existing functionality. Users previously using other models will see no changes, while new users can now select Haiku variants.
  • Performance: No performance impact on the plugin itself. Model selection happens at runtime, and these additions are simple string constants.
  • Backward Compatibility: Fully backward compatible. Existing code referencing other models will continue to work without modification.

Test Plan

  1. Verify that the new models appear in the available model list when calling NewClient().
  2. Test that model selection works correctly when explicitly choosing either Haiku 4.5 variant.
  3. Ensure existing model selections (Sonnet, Opus) continue to function as before.
  4. Validate that the model identifiers correctly map to Anthropic API endpoints.

Additional Notes

  • The addition follows the existing naming convention and pattern established in the codebase.
  • Both Haiku variant models are added together, suggesting they were released as a pair (generic version and dated version for pinning).
  • No changes to model configuration, beta features, or other plugin logic are required for basic support of these models.

ksylvan and others added 2 commits December 8, 2025 08:21
### CHANGES

- Add `ModelClaudeHaiku4_5` to supported models
- Add `ModelClaudeHaiku4_5_20251001` to supported models
@ksylvan ksylvan merged commit 4d91bf8 into danielmiessler:main Dec 8, 2025
1 check passed
@ksylvan ksylvan deleted the kayvan/claude-haiku-4-5 branch December 8, 2025 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request]: Add Claude Haiku 4.5 model

1 participant