Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.28.0"
".": "1.29.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-efe26b096126c693462514b8cbd3ec3e376569232becbfb730cd26fb31c7c7e3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-04225437444990f383d0581df2f07022baab6ad510de0f3a8bd6b07c38d83cc9.yml
openapi_spec_hash: cae9199aabfd7b87f0ff2dcc10760c92
config_hash: 7aaaa92e479b2962424ce93d7d24e004
config_hash: fcc34074db6eaf64bc99b578c6c82c61
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.29.0 (2026-04-07)

Full Changelog: [v1.28.0...v1.29.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.28.0...v1.29.0)

### Features

* **api:** Add support for claude-mythos-preview ([3f81797](https://github.com/anthropics/anthropic-sdk-ruby/commit/3f81797e418480fecb7034e7001690cddf97e1e3))

## 1.28.0 (2026-04-03)

Full Changelog: [v1.27.0...v1.28.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.27.0...v1.28.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
anthropic (1.28.0)
anthropic (1.29.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Add to your application's Gemfile:
<!-- x-release-please-start-version -->

```ruby
gem "anthropic", "~> 1.28.0"
gem "anthropic", "~> 1.29.0"
```

<!-- x-release-please-end -->
Expand Down
11 changes: 11 additions & 0 deletions lib/anthropic/models/beta/message_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :system_, union: -> { Anthropic::Beta::MessageCreateParams::System }, api_name: :system

# @!attribute temperature
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting
# temperature. A value of 1.0 of will be accepted for backwards compatibility, all
# other values will be rejected with a 400 error.
#
# Amount of randomness injected into the response.
#
# Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
Expand Down Expand Up @@ -316,6 +320,9 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }

# @!attribute top_k
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value
# will be rejected with a 400 error.
#
# Only sample from the top K options for each subsequent token.
#
# Used to remove "long tail" low probability responses.
Expand All @@ -328,6 +335,10 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :top_k, Integer

# @!attribute top_p
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting top_p.
# A value >= 0.99 will be accepted for backwards compatibility, all other values
# will be rejected with a 400 error.
#
# Use nucleus sampling.
#
# In nucleus sampling, we compute the cumulative distribution over all the options
Expand Down
11 changes: 11 additions & 0 deletions lib/anthropic/models/beta/messages/batch_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ class Params < Anthropic::Internal::Type::BaseModel
api_name: :system

# @!attribute temperature
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting
# temperature. A value of 1.0 of will be accepted for backwards compatibility, all
# other values will be rejected with a 400 error.
#
# Amount of randomness injected into the response.
#
# Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
Expand Down Expand Up @@ -384,6 +388,9 @@ class Params < Anthropic::Internal::Type::BaseModel
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }

# @!attribute top_k
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value
# will be rejected with a 400 error.
#
# Only sample from the top K options for each subsequent token.
#
# Used to remove "long tail" low probability responses.
Expand All @@ -396,6 +403,10 @@ class Params < Anthropic::Internal::Type::BaseModel
optional :top_k, Integer

# @!attribute top_p
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting top_p.
# A value >= 0.99 will be accepted for backwards compatibility, all other values
# will be rejected with a 400 error.
#
# Use nucleus sampling.
#
# In nucleus sampling, we compute the cumulative distribution over all the options
Expand Down
11 changes: 11 additions & 0 deletions lib/anthropic/models/message_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :system_, union: -> { Anthropic::MessageCreateParams::System }, api_name: :system

# @!attribute temperature
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting
# temperature. A value of 1.0 of will be accepted for backwards compatibility, all
# other values will be rejected with a 400 error.
#
# Amount of randomness injected into the response.
#
# Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
Expand Down Expand Up @@ -280,6 +284,9 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }

# @!attribute top_k
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value
# will be rejected with a 400 error.
#
# Only sample from the top K options for each subsequent token.
#
# Used to remove "long tail" low probability responses.
Expand All @@ -292,6 +299,10 @@ class MessageCreateParams < Anthropic::Internal::Type::BaseModel
optional :top_k, Integer

# @!attribute top_p
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting top_p.
# A value >= 0.99 will be accepted for backwards compatibility, all other values
# will be rejected with a 400 error.
#
# Use nucleus sampling.
#
# In nucleus sampling, we compute the cumulative distribution over all the options
Expand Down
11 changes: 11 additions & 0 deletions lib/anthropic/models/messages/batch_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ class Params < Anthropic::Internal::Type::BaseModel
api_name: :system

# @!attribute temperature
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting
# temperature. A value of 1.0 of will be accepted for backwards compatibility, all
# other values will be rejected with a 400 error.
#
# Amount of randomness injected into the response.
#
# Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
Expand Down Expand Up @@ -334,6 +338,9 @@ class Params < Anthropic::Internal::Type::BaseModel
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }

# @!attribute top_k
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value
# will be rejected with a 400 error.
#
# Only sample from the top K options for each subsequent token.
#
# Used to remove "long tail" low probability responses.
Expand All @@ -346,6 +353,10 @@ class Params < Anthropic::Internal::Type::BaseModel
optional :top_k, Integer

# @!attribute top_p
# @deprecated Deprecated. Models released after Claude Opus 4.6 do not support setting top_p.
# A value >= 0.99 will be accepted for backwards compatibility, all other values
# will be rejected with a 400 error.
#
# Use nucleus sampling.
#
# In nucleus sampling, we compute the cumulative distribution over all the options
Expand Down
7 changes: 6 additions & 1 deletion lib/anthropic/models/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module Models
module Model
extend Anthropic::Internal::Type::Union

variant const: -> { Anthropic::Models::Model::CLAUDE_MYTHOS_PREVIEW }

variant const: -> { Anthropic::Models::Model::CLAUDE_OPUS_4_6 }

variant const: -> { Anthropic::Models::Model::CLAUDE_SONNET_4_6 }
Expand Down Expand Up @@ -49,7 +51,10 @@ module Model

# @!group

# Most intelligent model for building agents and coding
# New class of intelligence, strongest in coding and cybersecurity
CLAUDE_MYTHOS_PREVIEW = :"claude-mythos-preview"

# Frontier intelligence for long-running agents and coding
CLAUDE_OPUS_4_6 = :"claude-opus-4-6"

# Best combination of speed and intelligence
Expand Down
2 changes: 1 addition & 1 deletion lib/anthropic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Anthropic
VERSION = "1.28.0"
VERSION = "1.29.0"
end
6 changes: 5 additions & 1 deletion rbi/anthropic/models/model.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ module Anthropic
TaggedSymbol = T.type_alias { T.all(Symbol, Anthropic::Model) }
OrSymbol = T.type_alias { T.any(Symbol, String) }

# Most intelligent model for building agents and coding
# New class of intelligence, strongest in coding and cybersecurity
CLAUDE_MYTHOS_PREVIEW =
T.let(:"claude-mythos-preview", Anthropic::Model::TaggedSymbol)

# Frontier intelligence for long-running agents and coding
CLAUDE_OPUS_4_6 =
T.let(:"claude-opus-4-6", Anthropic::Model::TaggedSymbol)

Expand Down
8 changes: 6 additions & 2 deletions sig/anthropic/models/model.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module Anthropic
module Models
type model =
:"claude-opus-4-6"
:"claude-mythos-preview"
| :"claude-opus-4-6"
| :"claude-sonnet-4-6"
| :"claude-haiku-4-5"
| :"claude-haiku-4-5-20251001"
Expand All @@ -23,7 +24,10 @@ module Anthropic

def self?.variants: -> ::Array[Anthropic::Models::model]

# Most intelligent model for building agents and coding
# New class of intelligence, strongest in coding and cybersecurity
CLAUDE_MYTHOS_PREVIEW: :"claude-mythos-preview"

# Frontier intelligence for long-running agents and coding
CLAUDE_OPUS_4_6: :"claude-opus-4-6"

# Best combination of speed and intelligence
Expand Down
2 changes: 1 addition & 1 deletion test/anthropic/resources/beta/messages_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_count_tokens_required_params
response =
@anthropic.beta.messages.count_tokens(
messages: [{content: "string", role: :user}],
model: :"claude-opus-4-6"
model: :"claude-mythos-preview"
)

assert_pattern do
Expand Down
2 changes: 1 addition & 1 deletion test/anthropic/resources/completions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def test_create_required_params
response =
@anthropic.completions.create(
max_tokens_to_sample: 256,
model: :"claude-opus-4-6",
model: :"claude-mythos-preview",
prompt: "\n\nHuman: Hello, world!\n\nAssistant:"
)

Expand Down
2 changes: 1 addition & 1 deletion test/anthropic/resources/messages_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_count_tokens_required_params
response =
@anthropic.messages.count_tokens(
messages: [{content: "string", role: :user}],
model: :"claude-opus-4-6"
model: :"claude-mythos-preview"
)

assert_pattern do
Expand Down