llmshim 0.12.1 → 0.13.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 +4 -4
- data/README.md +6 -6
- data/lib/llmshim/version.rb +1 -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: 6beb9e67d7df1413f9b6906251e7c43fd5a2e25f58531c361d5e666f1eb766f7
|
|
4
|
+
data.tar.gz: 34513d6a22d92a2e9a26a2269842838824d2e0ec664329d11798fa2806a1b29c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db8a76024b9ab01f039236a53022c546e257eb7d11c166bf0fb6da0d79cf8e0f0800760f54f715eaaf8853a7e91cb7551327211f7d6b129fe15dd00d396d1e43
|
|
7
|
+
data.tar.gz: d6cc09976318249bf5c353fa55472577d4d13bcab3eda8cdaf2f09b36d6072e828660edc1864cbcecb21822b710590c431138c530919b403b8f9cc3c682eabfe
|
data/README.md
CHANGED
|
@@ -44,7 +44,7 @@ environment variables. The Ruby client never sees your keys — the proxy holds
|
|
|
44
44
|
|
|
45
45
|
| Provider | Model string form | Env vars |
|
|
46
46
|
| ---------- | --------------------------------------- | ------------------------------------- |
|
|
47
|
-
| OpenAI | `openai/gpt-
|
|
47
|
+
| OpenAI | `openai/gpt-6-sol` | `OPENAI_API_KEY` |
|
|
48
48
|
| Anthropic | `anthropic/claude-sonnet-5` | `ANTHROPIC_API_KEY` |
|
|
49
49
|
| Gemini | `gemini/gemini-3.8-flash` | `GEMINI_API_KEY` |
|
|
50
50
|
| xAI | `xai/grok-4.6` | `XAI_API_KEY` |
|
|
@@ -75,7 +75,7 @@ of message hashes:
|
|
|
75
75
|
|
|
76
76
|
```ruby
|
|
77
77
|
resp = client.chat(
|
|
78
|
-
model: "openai/gpt-
|
|
78
|
+
model: "openai/gpt-6-sol",
|
|
79
79
|
messages: [
|
|
80
80
|
{ role: "system", content: "You are a pirate." },
|
|
81
81
|
{ role: "user", content: "Hello!" }
|
|
@@ -99,7 +99,7 @@ A shared default client (base URL from `LLMSHIM_BASE_URL`, else `http://localhos
|
|
|
99
99
|
```ruby
|
|
100
100
|
require "llmshim"
|
|
101
101
|
|
|
102
|
-
resp = Llmshim.chat(model: "gpt-
|
|
102
|
+
resp = Llmshim.chat(model: "gpt-6-sol", messages: "Explain quicksort")
|
|
103
103
|
puts resp.content
|
|
104
104
|
```
|
|
105
105
|
|
|
@@ -127,7 +127,7 @@ Predicate helpers are available too: `event.content?`, `event.reasoning?`,
|
|
|
127
127
|
Called without a block, `stream` returns the collected array of events:
|
|
128
128
|
|
|
129
129
|
```ruby
|
|
130
|
-
events = client.stream(model: "gpt-
|
|
130
|
+
events = client.stream(model: "gpt-6-sol", messages: "Hi")
|
|
131
131
|
text = events.select(&:content?).map(&:text).join
|
|
132
132
|
```
|
|
133
133
|
|
|
@@ -147,7 +147,7 @@ resp = client.chat(
|
|
|
147
147
|
# Provider-specific controls, namespaced under x-<provider> (see below):
|
|
148
148
|
provider_config: { "x-anthropic" => { thinking: { type: "adaptive" }, output_config: { effort: "high" } } },
|
|
149
149
|
# Try these models if the primary fails with a retryable error:
|
|
150
|
-
fallback: ["openai/gpt-
|
|
150
|
+
fallback: ["openai/gpt-6-sol", "gemini/gemini-3.8-flash"]
|
|
151
151
|
)
|
|
152
152
|
|
|
153
153
|
resp.message.tool_calls.each do |tc|
|
|
@@ -208,7 +208,7 @@ Two provider-agnostic knobs live in `config` (pass them as top-level kwargs):
|
|
|
208
208
|
|
|
209
209
|
```ruby
|
|
210
210
|
resp = client.chat(
|
|
211
|
-
model: "openai/gpt-
|
|
211
|
+
model: "openai/gpt-6-sol",
|
|
212
212
|
messages: "Prove that sqrt(2) is irrational.",
|
|
213
213
|
reasoning_effort: "high",
|
|
214
214
|
reasoning_mode: "pro"
|
data/lib/llmshim/version.rb
CHANGED