Skip to content

Commit 13c257c

Browse files
oneillsp96xavidop
andauthored
feat: anthropic haiku fix
* feat(plugins/anthropic): add Claude 4.5 Haiku model * remove 'claude-haiku-4-5-latest' specifier * add test --------- Co-authored-by: Xavier Portilla Edo <xavi_tb@hotmail.com>
1 parent c332b08 commit 13c257c

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

plugins/anthropic/src/claude.test.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,40 @@ describe('toAnthropicRequestBody', () => {
837837
},
838838
},
839839
},
840+
{
841+
should: '(claude-4-5-haiku) handles request with text messages',
842+
modelName: 'claude-4-5-haiku',
843+
genkitRequest: {
844+
messages: [
845+
{ role: 'user', content: [{ text: 'Tell a joke about dogs.' }] },
846+
],
847+
output: { format: 'text' },
848+
config: {
849+
metadata: {
850+
user_id: 'exampleUser123',
851+
},
852+
},
853+
},
854+
expectedOutput: {
855+
max_tokens: 4096,
856+
messages: [
857+
{
858+
content: [
859+
{
860+
text: 'Tell a joke about dogs.',
861+
type: 'text',
862+
citations: null,
863+
},
864+
],
865+
role: 'user',
866+
},
867+
],
868+
model: 'claude-haiku-4-5-20251001',
869+
metadata: {
870+
user_id: 'exampleUser123',
871+
},
872+
},
873+
},
840874
];
841875
for (const test of testCases) {
842876
it(test.should, () => {

plugins/anthropic/src/claude.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export const claude45Haiku = modelRef({
240240
name: 'claude-4-5-haiku',
241241
namespace: 'anthropic',
242242
info: {
243-
versions: ['claude-haiku-4-5-20251001', 'claude-haiku-4-5-latest'],
243+
versions: ['claude-haiku-4-5-20251001'],
244244
label: 'Anthropic - Claude 4.5 Haiku',
245245
supports: {
246246
multiturn: true,
@@ -251,7 +251,7 @@ export const claude45Haiku = modelRef({
251251
},
252252
},
253253
configSchema: AnthropicConfigSchema,
254-
version: 'claude-haiku-4-5-latest',
254+
version: 'claude-haiku-4-5-20251001',
255255
});
256256

257257
export const SUPPORTED_CLAUDE_MODELS: Record<

0 commit comments

Comments
 (0)