Skip to content

Commit eff41b7

Browse files
committed
feat(api): mark Sonnet and Opus 4 as deprecated
1 parent 7e2cece commit eff41b7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 72
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-dfe504526eed07979685a729ac9afd45e59cc2879291714b9f4674f2ef1247c7.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-f4d4f18820ecfbe244fb1bbc2232939afca73dfcb21ce23bc296571ee7320e3a.yml
33
openapi_spec_hash: d849fdf2c4dd6631a60c4340e9bc1322
4-
config_hash: 4f42711769ade2ca17b39534532e66bf
4+
config_hash: 2e9a2fd5355db62857f6be16f46a3ccc

src/resources/messages/messages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,10 @@ const DEPRECATED_MODELS: {
11221122
'claude-3-7-sonnet-20250219': 'February 19th, 2026',
11231123
'claude-3-5-haiku-latest': 'February 19th, 2026',
11241124
'claude-3-5-haiku-20241022': 'February 19th, 2026',
1125+
'claude-opus-4-0': 'June 15th, 2026',
1126+
'claude-opus-4-20250514': 'June 15th, 2026',
1127+
'claude-sonnet-4-0': 'June 15th, 2026',
1128+
'claude-sonnet-4-20250514': 'June 15th, 2026',
11251129
};
11261130

11271131
const MODELS_TO_WARN_WITH_THINKING_ENABLED: Model[] = ['claude-opus-4-6'];

tests/api-resources/messages/messages.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ test('create: does not warn for non-deprecated models', async () => {
175175
await client.messages.create({
176176
max_tokens: 1024,
177177
messages: [{ content: 'Hello, world', role: 'user' }],
178-
model: 'claude-opus-4-0',
178+
model: 'claude-opus-4-6',
179179
});
180180

181181
expect(consoleSpy).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)