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: 54ace6377f4ec569ce3e78de2d878c099707d9331e5cbb68635a766c71637b4e
4
- data.tar.gz: 27868e87f01534c18a2e951d6eabeb82b6ec3100f2b36818e610c0c76ae5c782
3
+ metadata.gz: 8fac6cb3ea1bd260904f003583e88c839230f9898d8c33cbd8b07046924df3e8
4
+ data.tar.gz: 4214e79a1f1deeb84bb43e430a05b3cc0c70e2ae72e1ae5adcbceacc1c433a95
5
5
  SHA512:
6
- metadata.gz: ac834a7bb42e9af6529ae465ec9048c24ca2b3f1490b69df42dcca5b064ad67d7b704dd76e4c1b802aa11b7a7e9b2e9342043add43eed6d22592956c45a37eb7
7
- data.tar.gz: '081062fa5a0e066ae77d05e4fea012253a92d172e55e360a58235de5ab335789629ceee7e95d6f9cd25256141ff7afdb8cdd3d3fcd31fc050ec91f950f6ef2cb'
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: tool_call_result.text,
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-26. Opus 4.8 rejects it
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]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Anthropic
5
- VERSION = "3.8.1"
5
+ VERSION = "3.10.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai-anthropic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre