ask-llm-providers 0.13.5 → 0.13.6
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/CHANGELOG.md +11 -0
- data/lib/ask/llm/models.json +5 -3
- data/lib/ask/llm/version.rb +1 -1
- data/lib/ask/provider/openai.rb +19 -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: 50fa40af50459e52a10bb0709fbf9f2f948cf351025d5971d89f434f3b59af0a
|
|
4
|
+
data.tar.gz: 119a652e9404ccca613b3e81721cbc23d3c87347bd79e55ceae6f7107e1320de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 700fc99441598c8103d64cce0aeb4cdc476564c69c79fd921c1a091ce9f72eea9ba77088185eed3cde8e5083b796d4fa780767d88be2c5270db14644998fda77
|
|
7
|
+
data.tar.gz: e0e42bfeb0f2aaa73b344f7f3041ea37dbaa3b3f10f44c66becd51caf5d7050d55b7abdf8dfcdf6467b0598d4f347eeda8c1cf15fa84c428f601a77bdf97babf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [0.13.6] — 2026-09-13
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- **`deepseek/deepseek-v4.1-flash` is multimodal.** The catalog entry declared
|
|
6
|
+
text-only, so agents refused to send it images; it now carries image input
|
|
7
|
+
and the vision capability (native visual understanding since the Sept 10
|
|
8
|
+
release).
|
|
9
|
+
|
|
10
|
+
- **Empty user continuations are dropped from OpenAI-compatible requests.** After tool calls the agent loop appends an empty user message to prompt the next turn; strict gateways (Command Code) reject it with "user message must have content", breaking every tool-using turn. The provider now omits contentless user messages, which carry no information.
|
|
11
|
+
|
|
1
12
|
## [0.13.1] — 2026-09-05
|
|
2
13
|
|
|
3
14
|
### Fixed
|
data/lib/ask/llm/models.json
CHANGED
|
@@ -5083,11 +5083,13 @@
|
|
|
5083
5083
|
"context_window": 1000000,
|
|
5084
5084
|
"capabilities": [
|
|
5085
5085
|
"function_calling",
|
|
5086
|
-
"streaming"
|
|
5086
|
+
"streaming",
|
|
5087
|
+
"vision"
|
|
5087
5088
|
],
|
|
5088
5089
|
"modalities": {
|
|
5089
5090
|
"input": [
|
|
5090
|
-
"text"
|
|
5091
|
+
"text",
|
|
5092
|
+
"image"
|
|
5091
5093
|
],
|
|
5092
5094
|
"output": [
|
|
5093
5095
|
"text"
|
|
@@ -14454,4 +14456,4 @@
|
|
|
14454
14456
|
"pricing": {},
|
|
14455
14457
|
"created_at": "2026-01-28"
|
|
14456
14458
|
}
|
|
14457
|
-
]
|
|
14459
|
+
]
|
data/lib/ask/llm/version.rb
CHANGED
data/lib/ask/provider/openai.rb
CHANGED
|
@@ -425,9 +425,27 @@ module Ask
|
|
|
425
425
|
LLM::HTTP.connection(api_base, headers:, request: { open_timeout: 30, timeout: 600 })
|
|
426
426
|
end
|
|
427
427
|
|
|
428
|
+
# Messages for the wire, minus the agent loop's empty user
|
|
429
|
+
# continuations: after tool calls the loop appends a "" user message
|
|
430
|
+
# to prompt the next turn, which strict OpenAI-compatible gateways
|
|
431
|
+
# reject ("user message must have content"). The message carries no
|
|
432
|
+
# information, so it is dropped here.
|
|
428
433
|
def format_messages(messages)
|
|
429
|
-
messages.
|
|
434
|
+
messages.filter_map do |msg|
|
|
435
|
+
next if empty_user_message?(msg)
|
|
436
|
+
|
|
437
|
+
format_message(msg)
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
def empty_user_message?(message)
|
|
442
|
+
role = message.respond_to?(:role) ? message.role : (message[:role] || message["role"])
|
|
443
|
+
return false unless role.to_s == "user"
|
|
444
|
+
|
|
445
|
+
content = message.respond_to?(:content) ? message.content : (message[:content] || message["content"])
|
|
446
|
+
content.to_s.strip.empty?
|
|
430
447
|
end
|
|
448
|
+
private :empty_user_message?
|
|
431
449
|
|
|
432
450
|
# Transform a generic content block hash into OpenAI's wire format.
|
|
433
451
|
# https://platform.openai.com/docs/guides/vision
|