ask-llm-providers 0.2.1 → 0.2.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/CHANGELOG.md +75 -0
- data/lib/ask/llm/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 858bdb99927e65448a7c3c584f2b0bed51bbe1a12d9ee43e0c2e4a97a34ee344
|
|
4
|
+
data.tar.gz: 132b02262647f35a04232385e4148d4754b30a893da4d3015eef52a8cee72caf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8999b96cbe13c709393c4208be9e49513059f0e239da1755e4061be85d3084ae4bcd52418cfcbac6add0f2ded90ad58e43833f2e49488893151f4aea989893f6
|
|
7
|
+
data.tar.gz: 2b5dac9e60b02a4c28e8f406159064454b068c2fe45c215820629bd0e02f5d0da8f81d090d142f1ee0d0a91d68a37b267853327617cf34e8219bc0ec780ae39c
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
## [0.2.2] - 2026-06-25
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
- Extended per-provider tests (Anthropic 18t, Google 14t, DeepSeek 16t, Mistral, Ollama, Cloudflare, Bedrock). Fixed providers_test.rb syntax error. RuboCop, overcommit, gemspec test, SimpleCov, CI.
|
|
5
|
+
# Changelog
|
|
6
|
+
|
|
7
|
+
## [0.1.0] — 2026-06-09
|
|
8
|
+
|
|
9
|
+
Initial release of `ask-llm-providers`, all LLM providers for the ask-rb ecosystem.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **OpenAI provider** — Chat Completions API with streaming, tool calls, vision, structured output, embeddings
|
|
14
|
+
- **Anthropic provider** — Messages API with thinking blocks, tool use, prompt caching
|
|
15
|
+
- **Google Gemini provider** — `generateContent` API with function calling, streaming, embeddings
|
|
16
|
+
- **Amazon Bedrock provider** — Converse API with tool configuration
|
|
17
|
+
- **Ollama provider** — Local LLM inference with chat and embeddings endpoints
|
|
18
|
+
- **Mistral AI provider** — OpenAI-compatible API with embeddings support
|
|
19
|
+
- **Cloudflare provider** — Workers AI direct endpoint and AI Gateway passthrough
|
|
20
|
+
- **Error mapping** — Provider-specific HTTP errors → `Ask::Error` types (rate limit, auth, context exceeded, etc.)
|
|
21
|
+
- **Provider registration** — All providers auto-registered with `Ask::Provider` on gem load
|
|
22
|
+
- **Capabilities introspection** — Each provider exposes supported capabilities
|
|
23
|
+
- **Shared HTTP infrastructure** — `Ask::LLM::HTTP` with Faraday connection builder and SSE streaming
|
|
24
|
+
- **Test suite** — 33 tests across all providers and error mapping
|
|
25
|
+
|
|
26
|
+
## [0.1.8] — 2026-06-18
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **OpenRouter provider** — `Ask::Providers::OpenRouter`, reads `OPENROUTER_API_KEY`,
|
|
31
|
+
sets `HTTP-Referer` and `X-Title` headers.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **`normalize_config` ENV resolution** — Removed broken monkey-patch that defined
|
|
36
|
+
`normalize_config` on `Object` instead of within the `OpenAI` class. Now resolves
|
|
37
|
+
`api_key` from: explicit config → subclass-specific key → `ENV` var →
|
|
38
|
+
`Ask::Auth.resolve` chain. All OpenAI-compatible subclasses (DeepSeek, OpenCode,
|
|
39
|
+
OpenCodeGo, Mimo, OpenRouter) inherit the fix.
|
|
40
|
+
|
|
41
|
+
## [0.1.9] — 2026-06-18
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **`format_messages` with Hash tool_calls** — Tool calls can arrive as Hash (keyed
|
|
46
|
+
by call_id) from some chat implementations, or as Array. The method now detects
|
|
47
|
+
both formats with `tc.is_a?(Hash) ? tc.values : tc`. Also handles `OpenStruct`
|
|
48
|
+
tool call objects via `.respond_to?` checks instead of assuming Hash accessors.
|
|
49
|
+
|
|
50
|
+
## [0.2.0] — 2026-06-19
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- **SSE buffering across all streaming providers** — TCP fragmentation in
|
|
55
|
+
Faraday's `on_data` callback caused silent data loss when SSE events were
|
|
56
|
+
split across packets. Added persistent `@_sse_buffer` with complete-event
|
|
57
|
+
extraction via `Ask::LLM::SSEBuffer` module. Affected providers:
|
|
58
|
+
OpenAI, Anthropic, Cloudflare, Google, Ollama. All OpenAI-compatible
|
|
59
|
+
subclasses inherit the fix.
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- **`Ask::LLM::SSEBuffer`** — Shared module providing `init_sse_buffer` and
|
|
64
|
+
`each_sse_event(raw)` for SSE buffering across streaming callbacks.
|
|
65
|
+
- **SSE buffering tests** — 5 new tests covering fragmented data, event
|
|
66
|
+
boundaries, multiple events, and `[DONE]` sentinel.
|
|
67
|
+
|
|
68
|
+
## [0.1.10] — 2026-06-18
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **`chat_stream` nil response body** — Streaming requests consume the response body
|
|
73
|
+
via `on_data` callback, leaving `resp.body` as `nil`. `JSON.parse(nil)` raised
|
|
74
|
+
`TypeError: no implicit conversion of nil into String`. Now checks
|
|
75
|
+
`resp.body` before parsing.
|
data/lib/ask/llm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ask-llm-providers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaka Ruto
|
|
@@ -27,14 +27,14 @@ dependencies:
|
|
|
27
27
|
name: ask-auth
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
|
-
- - "
|
|
30
|
+
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '0.1'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - "
|
|
37
|
+
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0.1'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
@@ -172,6 +172,7 @@ executables: []
|
|
|
172
172
|
extensions: []
|
|
173
173
|
extra_rdoc_files: []
|
|
174
174
|
files:
|
|
175
|
+
- CHANGELOG.md
|
|
175
176
|
- LICENSE
|
|
176
177
|
- README.md
|
|
177
178
|
- lib/ask-llm-providers.rb
|
|
@@ -196,7 +197,10 @@ files:
|
|
|
196
197
|
homepage: https://github.com/ask-rb/ask-llm-providers
|
|
197
198
|
licenses:
|
|
198
199
|
- MIT
|
|
199
|
-
metadata:
|
|
200
|
+
metadata:
|
|
201
|
+
homepage_uri: https://github.com/ask-rb/ask-llm-providers
|
|
202
|
+
source_code_uri: https://github.com/ask-rb/ask-llm-providers
|
|
203
|
+
changelog_uri: https://github.com/ask-rb/ask-llm-providers/blob/master/CHANGELOG.md
|
|
200
204
|
rdoc_options: []
|
|
201
205
|
require_paths:
|
|
202
206
|
- lib
|