omniai-anthropic 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/omniai/anthropic/chat.rb +7 -2
- data/lib/omniai/anthropic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d66f6059f32b44407260b181a7b5cf2b82334de7a3122f9c3663769e1c7fcd1
|
|
4
|
+
data.tar.gz: f5fec3fad159c3ed96b7f43b58983a447ec69a9e793e2e6244c83d55a12fb894
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6a192b20e1e2ef30964e5fbeae707b6f01ac64823a50c25ff29928f59cf456b98db59e5472fc973f6618eededbc7d22078e82027bbd858504781bbbdc45efeb
|
|
7
|
+
data.tar.gz: ec1c3af2a37c5b03b0b3551c337e39c595525d99e2afadf133a30f28a0cab55a89ae1879c1786c8bd244aec8740eae74bd2c5b235cf3f5c384d37d13990de4e9
|
data/README.md
CHANGED
|
@@ -61,7 +61,7 @@ completion.text # 'The capital of Canada is Ottawa.'
|
|
|
61
61
|
|
|
62
62
|
#### Model
|
|
63
63
|
|
|
64
|
-
`model` takes an optional string (default is `claude-sonnet-
|
|
64
|
+
`model` takes an optional string (default is `claude-sonnet-5`):
|
|
65
65
|
|
|
66
66
|
```ruby
|
|
67
67
|
completion = client.chat('Provide code for fibonacci', model: OmniAI::Anthropic::Chat::Model::CLAUDE_SONNET)
|
|
@@ -49,10 +49,11 @@ module OmniAI
|
|
|
49
49
|
CLAUDE_SONNET_4_0 = "claude-sonnet-4-0"
|
|
50
50
|
CLAUDE_SONNET_4_5 = "claude-sonnet-4-5"
|
|
51
51
|
CLAUDE_SONNET_4_6 = "claude-sonnet-4-6"
|
|
52
|
+
CLAUDE_SONNET_5 = "claude-sonnet-5"
|
|
52
53
|
|
|
53
54
|
CLAUDE_HAIKU = CLAUDE_HAIKU_4_5
|
|
54
55
|
CLAUDE_OPUS = CLAUDE_OPUS_4_7
|
|
55
|
-
CLAUDE_SONNET =
|
|
56
|
+
CLAUDE_SONNET = CLAUDE_SONNET_5
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
DEFAULT_MODEL = Model::CLAUDE_SONNET
|
|
@@ -115,6 +116,10 @@ module OmniAI
|
|
|
115
116
|
# Example: `thinking: { budget_tokens: 10000 }` becomes `{ type: "enabled", budget_tokens: 10000 }`
|
|
116
117
|
# Example: `thinking: { effort: nil }` becomes `{ type: "adaptive" }` (Claude decides)
|
|
117
118
|
# Example: `thinking: { effort: "medium" }` becomes `{ type: "adaptive" }` + output_config
|
|
119
|
+
# Example: `thinking: { effort: "medium", display: "summarized" }` forwards display onto the adaptive object.
|
|
120
|
+
#
|
|
121
|
+
# NOTE: `display` is strictly opt-in pass-through. When omitted, no `display` key is sent and the
|
|
122
|
+
# model's own default applies (e.g. "omitted" on Sonnet 5 / Opus 4.7+, "summarized" on Sonnet 4.6).
|
|
118
123
|
# @return [Hash, nil]
|
|
119
124
|
def thinking_config
|
|
120
125
|
return @thinking_config if defined?(@thinking_config)
|
|
@@ -125,7 +130,7 @@ module OmniAI
|
|
|
125
130
|
when true then { type: "enabled", budget_tokens: 10_000 }
|
|
126
131
|
when Hash
|
|
127
132
|
if thinking.key?(:effort)
|
|
128
|
-
{ type: "adaptive" }
|
|
133
|
+
{ type: "adaptive" }.merge(thinking.slice(:display))
|
|
129
134
|
else
|
|
130
135
|
{ type: "enabled" }.merge(thinking)
|
|
131
136
|
end
|