riffer 0.57.0 → 0.57.2
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/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +14 -0
- data/docs/providers/GOOGLE_CLOUD.md +1 -1
- data/lib/riffer/messages/assistant/reasoning_part.rb +1 -1
- data/lib/riffer/messages/assistant/server_tool_part.rb +5 -1
- data/lib/riffer/messages/assistant/tool_call.rb +4 -3
- data/lib/riffer/messages/system.rb +2 -1
- data/lib/riffer/messages/tool.rb +6 -1
- data/lib/riffer/messages/user.rb +2 -1
- data/lib/riffer/providers/anthropic_compatible/messages_api.rb +1 -1
- data/lib/riffer/providers/anthropic_vertex.rb +7 -0
- data/lib/riffer/version.rb +1 -1
- data/sig/generated/riffer/providers/anthropic_vertex.rbs +5 -0
- 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: 5a0b2c4a5de151eb7d6b04fcdb294109ec985016e3c0a664518215c0056b6b3d
|
|
4
|
+
data.tar.gz: 2b07877eead03fca26a9f59418c9b590cbb4b65fcfc9d39c947c470e79c3b48f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a815d376b2ade4129f162ae0ae2e1c526fcc0fabe6a29901a26ee0a621c1c17b3ec7452faf379e880f0c4d08fc3ee8b783f1bad6d0242645a8890c9ce7aadb30
|
|
7
|
+
data.tar.gz: c15a1e4521e950f9d6b11565e0cfbfeeff25950beaf2ad3445a90074fce85f8fa652ae89a8e2e30f52ec84a60643b7057564fbfaff4e5fd1ed8b8ee46592d3e2
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.10
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.57.2](https://github.com/janeapp/riffer/compare/riffer/v0.57.1...riffer/v0.57.2) (2026-11-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **messages:** raise Riffer::ArgumentError for message hashes missing fields ([#590](https://github.com/janeapp/riffer/issues/590)) ([e85e6c2](https://github.com/janeapp/riffer/commit/e85e6c2392ecdc9e26f7bbdb09da2364176e35c7))
|
|
14
|
+
|
|
15
|
+
## [0.57.1](https://github.com/janeapp/riffer/compare/riffer/v0.57.0...riffer/v0.57.1) (2026-11-13)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **anthropic_vertex:** download URL files and add anthropic_vertex to the acceptance suite ([#585](https://github.com/janeapp/riffer/issues/585)) ([1aef911](https://github.com/janeapp/riffer/commit/1aef9115a8c68b5ab1a4e9c670c65590f5e75238))
|
|
21
|
+
|
|
8
22
|
## [0.57.0](https://github.com/janeapp/riffer/compare/riffer/v0.56.0...riffer/v0.57.0) (2026-11-13)
|
|
9
23
|
|
|
10
24
|
|
|
@@ -358,7 +358,7 @@ Claude models on Agent Platform behave as they do on the Anthropic provider:
|
|
|
358
358
|
- **Tags:** only the reserved `user_id` tag is sent, as `metadata.user_id`.
|
|
359
359
|
- **Incomplete streams:** a stream that ends without a `message_stop` event raises `Riffer::IncompleteStreamError`.
|
|
360
360
|
|
|
361
|
-
`anthropic_vertex` never reads `config.anthropic` or `ANTHROPIC_API_KEY`. Files are sent inline as base64.
|
|
361
|
+
`anthropic_vertex` never reads `config.anthropic` or `ANTHROPIC_API_KEY`. Files are sent inline as base64. Agent Platform rejects URL sources, so riffer downloads a `FilePart.from_url` source and sends it inline, subject to the `allow_downloads` policy in [File Downloads](../CONFIGURATION.md#file-downloads).
|
|
362
362
|
|
|
363
363
|
Web search and structured output are partner-model features that an organization policy can turn off. If a request fails with a `constraints/vertexai.allowedPartnerModelFeatures` violation, an organization policy administrator must allow `publishers/anthropic/models/MODEL:web_search` or `:structured_outputs` (or `publishers/anthropic` for every feature); see [Control access to Model Garden models](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/control-model-access).
|
|
364
364
|
|
|
@@ -22,7 +22,7 @@ class Riffer::Messages::Assistant::ReasoningPart
|
|
|
22
22
|
return part if part.is_a?(Riffer::Messages::Assistant::ReasoningPart)
|
|
23
23
|
|
|
24
24
|
new(
|
|
25
|
-
type: part[:type]
|
|
25
|
+
type: part[:type]&.to_sym,
|
|
26
26
|
text: part[:text],
|
|
27
27
|
data: part[:data],
|
|
28
28
|
signature: part[:signature],
|
|
@@ -23,9 +23,13 @@ class Riffer::Messages::Assistant::ServerToolPart
|
|
|
23
23
|
def self.from_hash(part)
|
|
24
24
|
return part if part.is_a?(Riffer::Messages::Assistant::ServerToolPart)
|
|
25
25
|
|
|
26
|
+
if part.values_at(:name, :data).any?(&:nil?)
|
|
27
|
+
raise Riffer::ArgumentError, "Server tool part hash must include :name and :data"
|
|
28
|
+
end
|
|
29
|
+
|
|
26
30
|
new(
|
|
27
31
|
name: part[:name],
|
|
28
|
-
kind: part[:kind]
|
|
32
|
+
kind: part[:kind]&.to_sym,
|
|
29
33
|
data: part[:data],
|
|
30
34
|
id: part[:id],
|
|
31
35
|
format: part[:format],
|
|
@@ -14,11 +14,12 @@ class Riffer::Messages::Assistant::ToolCall
|
|
|
14
14
|
def self.from_hash(call)
|
|
15
15
|
return call if call.is_a?(Riffer::Messages::Assistant::ToolCall)
|
|
16
16
|
|
|
17
|
-
if call.values_at(:call_id, :name
|
|
18
|
-
raise Riffer::ArgumentError, "Tool call hash must include :call_id
|
|
17
|
+
if call.values_at(:call_id, :name).any?(&:nil?)
|
|
18
|
+
raise Riffer::ArgumentError, "Tool call hash must include :call_id and :name"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# A call without arguments can carry "", which a source that drops blank strings omits.
|
|
22
|
+
new(call_id: call[:call_id], name: call[:name], arguments: call[:arguments] || "")
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
#--
|
|
@@ -7,7 +7,8 @@ class Riffer::Messages::System < Riffer::Messages::Base
|
|
|
7
7
|
def self.from_hash(msg)
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::System)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
# An empty prompt is "", which a source that drops blank strings omits.
|
|
11
|
+
new(msg[:content] || "", id: msg[:id])
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
#--
|
data/lib/riffer/messages/tool.rb
CHANGED
|
@@ -7,8 +7,13 @@ class Riffer::Messages::Tool < Riffer::Messages::Base
|
|
|
7
7
|
def self.from_hash(msg)
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::Tool)
|
|
9
9
|
|
|
10
|
+
if msg.values_at(:tool_call_id, :name).any?(&:nil?)
|
|
11
|
+
raise Riffer::ArgumentError, "Tool message hash must include :tool_call_id and :name"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# An empty result is "", which a source that drops blank strings omits.
|
|
10
15
|
new(
|
|
11
|
-
msg[:content],
|
|
16
|
+
msg[:content] || "",
|
|
12
17
|
id: msg[:id],
|
|
13
18
|
tool_call_id: msg[:tool_call_id],
|
|
14
19
|
name: msg[:name],
|
data/lib/riffer/messages/user.rb
CHANGED
|
@@ -8,7 +8,8 @@ class Riffer::Messages::User < Riffer::Messages::Base
|
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::User)
|
|
9
9
|
|
|
10
10
|
files = (msg[:files] || []).map { |f| Riffer::Messages::User::FilePart.from_hash(f) }
|
|
11
|
-
|
|
11
|
+
# An empty prompt is "", which a source that drops blank strings omits.
|
|
12
|
+
new(msg[:content] || "", id: msg[:id], files: files)
|
|
12
13
|
end
|
|
13
14
|
|
|
14
15
|
attr_reader :files #: Array[Riffer::Messages::User::FilePart] # @dynamic files
|
|
@@ -370,7 +370,7 @@ class Riffer::Providers::AnthropicCompatible::MessagesAPI < Riffer::Providers::B
|
|
|
370
370
|
def convert_file_part(file)
|
|
371
371
|
type = file.image? ? "image" : "document"
|
|
372
372
|
|
|
373
|
-
source = if file.url?
|
|
373
|
+
source = if file.url? && file_delivery(file) == :url
|
|
374
374
|
{ type: "url", url: file.url }
|
|
375
375
|
else
|
|
376
376
|
{ type: "base64", media_type: file.media_type, data: file.data }
|
|
@@ -17,6 +17,13 @@ class Riffer::Providers::AnthropicVertex < Riffer::Providers::AnthropicCompatibl
|
|
|
17
17
|
"gcp.vertex_ai"
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
# Agent Platform rejects URL sources, so riffer downloads the file and sends it inline.
|
|
21
|
+
#--
|
|
22
|
+
#: (Riffer::Messages::User::FilePart) -> Symbol
|
|
23
|
+
def file_delivery(_file)
|
|
24
|
+
:base64
|
|
25
|
+
end
|
|
26
|
+
|
|
20
27
|
private
|
|
21
28
|
|
|
22
29
|
#--
|
data/lib/riffer/version.rb
CHANGED
|
@@ -14,6 +14,11 @@ class Riffer::Providers::AnthropicVertex < Riffer::Providers::AnthropicCompatibl
|
|
|
14
14
|
# : () -> String
|
|
15
15
|
def self.semconv_provider_name: () -> String
|
|
16
16
|
|
|
17
|
+
# Agent Platform rejects URL sources, so riffer downloads the file and sends it inline.
|
|
18
|
+
# --
|
|
19
|
+
# : (Riffer::Messages::User::FilePart) -> Symbol
|
|
20
|
+
def file_delivery: (Riffer::Messages::User::FilePart) -> Symbol
|
|
21
|
+
|
|
17
22
|
private
|
|
18
23
|
|
|
19
24
|
# --
|