omniai-anthropic 3.8.1 → 3.10.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fac6cb3ea1bd260904f003583e88c839230f9898d8c33cbd8b07046924df3e8
|
|
4
|
+
data.tar.gz: 4214e79a1f1deeb84bb43e430a05b3cc0c70e2ae72e1ae5adcbceacc1c433a95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35faca266e9bd010842a634fc29feebce6699f432d5a08dc534a3979494bc9a00409713384644b20926358238397e9a78df058ef505da8ab0061d82d8580cd23
|
|
7
|
+
data.tar.gz: 750528e0bdfcc63ff0a1fb3b1e6f2c4eb8bd4036dfc2b185f30fe131cd591c63a9697028deed94e2640163f301c3e58162144f65ef5f8fe6b773b39b1d04626b
|
|
@@ -5,14 +5,20 @@ module OmniAI
|
|
|
5
5
|
class Chat
|
|
6
6
|
# Overrides tool-call response serialize / deserialize.
|
|
7
7
|
module ToolCallResultSerializer
|
|
8
|
+
# A result whose content is media (e.g. an image) is sent as a content block rather than JSON.
|
|
9
|
+
#
|
|
8
10
|
# @param tool_call_result [OmniAI::Chat::ToolCallResult]
|
|
11
|
+
# @param context [OmniAI::Context] optional
|
|
9
12
|
#
|
|
10
13
|
# @return [Hash]
|
|
11
|
-
def self.serialize(tool_call_result,
|
|
14
|
+
def self.serialize(tool_call_result, context: nil)
|
|
15
|
+
content = tool_call_result.content
|
|
16
|
+
content = content.is_a?(OmniAI::Chat::Media) ? [content.serialize(context:)] : tool_call_result.text
|
|
17
|
+
|
|
12
18
|
{
|
|
13
19
|
type: "tool_result",
|
|
14
20
|
tool_use_id: tool_call_result.tool_call_id,
|
|
15
|
-
content
|
|
21
|
+
content:,
|
|
16
22
|
}
|
|
17
23
|
end
|
|
18
24
|
|
|
@@ -52,6 +52,7 @@ module OmniAI
|
|
|
52
52
|
CLAUDE_SONNET_4_5 = "claude-sonnet-4-5"
|
|
53
53
|
CLAUDE_SONNET_4_6 = "claude-sonnet-4-6"
|
|
54
54
|
CLAUDE_SONNET_5 = "claude-sonnet-5"
|
|
55
|
+
CLAUDE_SONNET_5_5 = "claude-sonnet-5-5"
|
|
55
56
|
CLAUDE_FABLE_5 = "claude-fable-5"
|
|
56
57
|
|
|
57
58
|
CLAUDE_HAIKU = CLAUDE_HAIKU_4_5
|
|
@@ -62,8 +63,8 @@ module OmniAI
|
|
|
62
63
|
DEFAULT_MODEL = Model::CLAUDE_SONNET
|
|
63
64
|
|
|
64
65
|
# Models that reject `temperature` with a 400 ("`temperature` is deprecated for this model"), even with
|
|
65
|
-
# thinking omitted. Every entry below was verified live against the API on 2026-09-
|
|
66
|
-
# too but has no constant yet.
|
|
66
|
+
# thinking omitted. Every entry below was verified live against the API (Sonnet 5.5 on 2026-09-28, the rest on
|
|
67
|
+
# 2026-09-26). Opus 4.8 rejects it too but has no constant yet.
|
|
67
68
|
#
|
|
68
69
|
# Models absent from this list pass `temperature` through unchanged. That is deliberate: an unlisted
|
|
69
70
|
# model that rejects it surfaces a loud API error the caller can act on, whereas over-applying the guard
|
|
@@ -73,6 +74,7 @@ module OmniAI
|
|
|
73
74
|
Model::CLAUDE_OPUS_5,
|
|
74
75
|
Model::CLAUDE_OPUS_5_5,
|
|
75
76
|
Model::CLAUDE_SONNET_5,
|
|
77
|
+
Model::CLAUDE_SONNET_5_5,
|
|
76
78
|
].freeze
|
|
77
79
|
|
|
78
80
|
# @return [Context]
|