Skip to content

Commit 5494576

Browse files
chore(api): remove retired models from API and SDKs
1 parent def8bad commit 5494576

7 files changed

Lines changed: 8 additions & 29 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-5ce93251152bd7c4c288dacdf5a445383825ba50bc472ff9e9821ee9455e3564.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-04d2899e1e4dd48e29347b98f1265e6345ee20b75e29c12eca1068a8f7c61095.yml
33
openapi_spec_hash: 989d596f7660ce55a7cea748a9292b45
4-
config_hash: 44acd8a997dff056931fb4466201cdeb
4+
config_hash: 221b6331246cafc1f7ff1861d35a3640

‎examples/mcp-tool-runner/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func main() {
7676

7777
runner := client.Beta.Messages.NewToolRunner(betaTools, anthropic.BetaToolRunnerParams{
7878
BetaMessageNewParams: anthropic.BetaMessageNewParams{
79-
Model: anthropic.ModelClaudeSonnet4_20250514,
79+
Model: anthropic.ModelClaudeSonnet4_5_20250929,
8080
MaxTokens: 4096,
8181
Messages: []anthropic.BetaMessageParam{
8282
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock(question)),

‎examples/tool-runner-streaming/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353

5454
runner := client.Beta.Messages.NewToolRunnerStreaming(tools, anthropic.BetaToolRunnerParams{
5555
BetaMessageNewParams: anthropic.BetaMessageNewParams{
56-
Model: anthropic.ModelClaudeSonnet4_20250514,
56+
Model: anthropic.ModelClaudeSonnet4_5_20250929,
5757
MaxTokens: 1000,
5858
Messages: []anthropic.BetaMessageParam{
5959
anthropic.NewBetaUserMessage(

‎examples/tool-runner/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func main() {
5656

5757
runner := client.Beta.Messages.NewToolRunner(tools, anthropic.BetaToolRunnerParams{
5858
BetaMessageNewParams: anthropic.BetaMessageNewParams{
59-
Model: anthropic.ModelClaudeSonnet4_20250514,
59+
Model: anthropic.ModelClaudeSonnet4_5_20250929,
6060
MaxTokens: 1000,
6161
Messages: []anthropic.BetaMessageParam{
6262
anthropic.NewBetaUserMessage(

‎message.go‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4177,27 +4177,6 @@ const (
41774177
// model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for
41784178
// more information.
41794179
ModelClaudeOpus4_1_20250805 Model = "claude-opus-4-1-20250805"
4180-
// Deprecated: Will reach end-of-life on June 15th, 2026. Please migrate to a newer
4181-
// model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for
4182-
// more information.
4183-
ModelClaudeOpus4_0 Model = "claude-opus-4-0"
4184-
// Deprecated: Will reach end-of-life on June 15th, 2026. Please migrate to a newer
4185-
// model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for
4186-
// more information.
4187-
ModelClaudeOpus4_20250514 Model = "claude-opus-4-20250514"
4188-
// Deprecated: Will reach end-of-life on June 15th, 2026. Please migrate to a newer
4189-
// model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for
4190-
// more information.
4191-
ModelClaudeSonnet4_0 Model = "claude-sonnet-4-0"
4192-
// Deprecated: Will reach end-of-life on June 15th, 2026. Please migrate to a newer
4193-
// model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for
4194-
// more information.
4195-
ModelClaudeSonnet4_20250514 Model = "claude-sonnet-4-20250514"
4196-
// Deprecated: Will reach end-of-life on April 20th, 2026. Please migrate to
4197-
// claude-haiku-4-5. Visit
4198-
// https://docs.anthropic.com/en/docs/resources/model-deprecations for more
4199-
// information.
4200-
ModelClaude_3_Haiku_20240307 Model = "claude-3-haiku-20240307"
42014180
)
42024181

42034182
type OutputConfigParam struct {

‎message_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ func TestMessageNewWithNonStreamingTimeoutLimits(t *testing.T) {
502502
)
503503

504504
// Set a model with known token limits
505-
model := anthropic.ModelClaudeOpus4_20250514
505+
model := anthropic.ModelClaudeOpus4_1_20250805
506506
testModelLimit := constant.ModelNonStreamingTokens[string(model)]
507507

508508
// This test verifies that we can still create a message with tokens below the limit

‎tools.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ tools := []anthropic.BetaTool{weatherTool}
113113
114114
runner := client.Beta.Messages.NewToolRunner(tools, anthropic.BetaToolRunnerParams{
115115
BetaMessageNewParams: anthropic.BetaMessageNewParams{
116-
Model: anthropic.ModelClaudeSonnet4_20250514,
116+
Model: anthropic.ModelClaudeSonnet4_5_20250929,
117117
MaxTokens: 1024,
118118
Messages: []anthropic.BetaMessageParam{
119119
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What's the weather in Tokyo?")),
@@ -169,7 +169,7 @@ Use `BetaToolRunnerStreaming` via `NewToolRunnerStreaming()` for streaming respo
169169
```go
170170
runner := client.Beta.Messages.NewToolRunnerStreaming(tools, anthropic.BetaToolRunnerParams{
171171
BetaMessageNewParams: anthropic.BetaMessageNewParams{
172-
Model: anthropic.ModelClaudeSonnet4_20250514,
172+
Model: anthropic.ModelClaudeSonnet4_5_20250929,
173173
MaxTokens: 1024,
174174
Messages: []anthropic.BetaMessageParam{
175175
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What's the weather in Tokyo?")),

0 commit comments

Comments
 (0)