Skip to content

Commit 480661f

Browse files
remote-swe-userremote-swe-app[bot]tmokmss
authored
Add support for Claude 4.5 Sonnet and Claude 4.5 Haiku models (#331)
## Summary This PR adds support for the newly released Claude 4.5 Sonnet and Claude 4.5 Haiku models from Anthropic. ## Changes - **Added new model types**: `sonnet4.5` and `haiku4.5` to the `modelTypeList` - **Added model configurations** with the following specifications: - **Claude 4.5 Sonnet**: `anthropic.claude-sonnet-4-5-20250929-v1:0` - Input: $0.003 per 1K tokens - Output: $0.015 per 1K tokens - Cache read: $0.0003 per 1K tokens - Cache write: $0.00375 per 1K tokens - **Claude 4.5 Haiku**: `anthropic.claude-haiku-4-5-20251001-v1:0` - Input: $0.001 per 1K tokens - Output: $0.005 per 1K tokens - Cache read: $0.0001 per 1K tokens - Cache write: $0.00125 per 1K tokens ## Model Features Both models are configured with: - ✅ Reasoning support - ✅ Interleaved thinking support - ✅ Full cache support (system, message, tool) - ✅ Complete tool choice support (any, auto, tool) - Token limits consistent with Claude 4 generation (200K input, 64K/4K output) ## Testing - ✅ Build passes without errors - ✅ All existing tests continue to pass - ✅ No breaking changes to existing functionality The pricing information is based on the official Anthropic pricing documentation. <!-- DO NOT EDIT: System generated metadata --> <!-- WORKER_ID:webapp-1760587353004 --> --- **Open in Web UI**: https://d2c09i1k2ray87.cloudfront.net/sessions/webapp-1760587353004 --------- Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com> Co-authored-by: Masashi Tomooka <[email protected]>
1 parent a95c3dc commit 480661f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/agent-core/src/schema/model.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { z } from 'zod';
22

33
export const modelTypeList = [
4+
'sonnet4.5',
5+
'haiku4.5',
46
'sonnet4',
57
'opus4.1',
68
'opus4',
@@ -32,6 +34,28 @@ const modelConfigSchema = z.object({
3234
});
3335

3436
export const modelConfigs: Record<ModelType, z.infer<typeof modelConfigSchema>> = {
37+
'sonnet4.5': {
38+
name: 'Claude 4.5 Sonnet',
39+
modelId: 'anthropic.claude-sonnet-4-5-20250929-v1:0',
40+
maxOutputTokens: 64_000,
41+
maxInputTokens: 200_000,
42+
cacheSupport: ['system', 'message', 'tool'],
43+
reasoningSupport: true,
44+
toolChoiceSupport: ['any', 'auto', 'tool'],
45+
interleavedThinkingSupport: true,
46+
pricing: { input: 0.003, output: 0.015, cacheRead: 0.0003, cacheWrite: 0.00375 },
47+
},
48+
'haiku4.5': {
49+
name: 'Claude 4.5 Haiku',
50+
modelId: 'anthropic.claude-haiku-4-5-20251001-v1:0',
51+
maxOutputTokens: 64_000,
52+
maxInputTokens: 200_000,
53+
cacheSupport: ['system', 'message', 'tool'],
54+
reasoningSupport: true,
55+
toolChoiceSupport: ['any', 'auto', 'tool'],
56+
interleavedThinkingSupport: true,
57+
pricing: { input: 0.001, output: 0.005, cacheRead: 0.0001, cacheWrite: 0.00125 },
58+
},
3559
'sonnet3.5v1': {
3660
name: 'Claude 3.5 Sonnet v1',
3761
modelId: 'anthropic.claude-3-5-sonnet-20240620-v1:0',

0 commit comments

Comments
 (0)