llm.rb 16.0.0.pre.1 → 16.0.0.pre.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 +17 -8
- data/README.md +11 -6
- data/data/alibaba.json +16 -8
- data/data/anthropic.json +60 -6
- data/data/bedrock.json +406 -179
- data/data/deepinfra.json +105 -53
- data/data/deepseek.json +8 -4
- data/data/google.json +48 -24
- data/data/mistral.json +22 -42
- data/data/moonshot.json +6 -3
- data/data/openai.json +28 -14
- data/data/openrouter.json +650 -387
- data/data/xai.json +10 -5
- data/data/zai.json +14 -7
- data/docs/deepdive/features/builtin_tools.md +3 -1
- data/docs/deepdive/features/console.md +7 -0
- data/docs/deepdive/fundamentals/schema.md +46 -0
- data/docs/deepdive/fundamentals/tools.md +68 -0
- data/docs/deepdive/protocols/a2a.md +91 -0
- data/docs/deepdive/protocols/mcp.md +50 -0
- data/docs/deepdive/reference/model_registry.md +1 -1
- data/lib/llm/function/async/reactor.rb +10 -0
- data/lib/llm/function/async/task.rb +63 -11
- data/lib/llm/function.rb +1 -1
- data/lib/llm/tool/param.rb +8 -8
- data/lib/llm/version.rb +1 -1
- data/llm.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61578ce1082ecd25f86574ef19e1ffd4cc2b68c6689b705f0544f4aa3e391ede
|
|
4
|
+
data.tar.gz: 742b8d66f49113389c5ff08772e79498334eb6d5afe9821f05c2b8d1851cf4e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0024edabc9ac7360a71a485362aed854644187c116777623b340e5fbd391ae257139aefe07ba29ce7fe9bf04573e66ff09c0f48024153833cbb28b385e13280
|
|
7
|
+
data.tar.gz: ec0b4f0b2ba6a66b38cd324c5c3ea6daccd4ff76cde43a1fa8c272c20da89bec735ff7b7bae3afb516d4b5a3131b4e383abe70f48365d6ba9c8a61028e233c48
|
data/CHANGELOG.md
CHANGED
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
|
|
44
44
|
* **function: deliver an interrupt to the tool, not to whatever is running** <br>
|
|
45
45
|
[`LLM::Function::Window`](https://r.uby.dev/api-docs/llm.rb/LLM/Function/Window.html)
|
|
46
|
-
is the stretch of a call that an interrupt belongs to. The `:fork` and
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
the
|
|
53
|
-
got to.
|
|
46
|
+
is the stretch of a call that an interrupt belongs to. The `:fork` and `:ractor`
|
|
47
|
+
strategies now raise
|
|
48
|
+
[`LLM::Interrupt`](https://r.uby.dev/api-docs/llm.rb/LLM/Interrupt.html) on the
|
|
49
|
+
thread that runs the tool, and only while the tool runs: a cancel that arrives
|
|
50
|
+
before the tool starts is held until it does, so the tool's own `rescue` can
|
|
51
|
+
handle it, and one that arrives after the tool has returned is a no-op, which
|
|
52
|
+
no longer throws the result away. Before this, the interrupt was raised on the
|
|
53
|
+
child process's or the ractor's main thread wherever that thread had got to.
|
|
54
54
|
|
|
55
55
|
* **function: answer a ractor-backed task once its ractor has gone** <br>
|
|
56
56
|
A `:ractor` tool's result is handed to a ractor the task holds it in,
|
|
@@ -68,6 +68,15 @@
|
|
|
68
68
|
error, and a group's cancel stopped at the first task that had already
|
|
69
69
|
returned, leaving the calls after it uncancelled.
|
|
70
70
|
|
|
71
|
+
* **function: tell an `:async` tool it was cancelled** <br>
|
|
72
|
+
A cancel now raises `LLM::Interrupt` on the fiber the tool runs in, through the
|
|
73
|
+
reactor's scheduler, so the tool is told and can answer with its own value. A
|
|
74
|
+
cancel that arrives before the tool started stops it from running, and the
|
|
75
|
+
reactor is stopped by whoever waits. Before this, the cancel pushed an
|
|
76
|
+
interrupt sentinel to the task's result queue and left the tool running, its
|
|
77
|
+
side effects happening and its result written to a queue nobody read, and the
|
|
78
|
+
reactor thread stayed alive until a group's `wait` stopped it.
|
|
79
|
+
|
|
71
80
|
### Provider
|
|
72
81
|
|
|
73
82
|
* **deepseek: support image attachments in chat completions** <br>
|
data/README.md
CHANGED
|
@@ -18,16 +18,21 @@ llm.rb is a runtime for building agentic AI applications
|
|
|
18
18
|
on CRuby. It has zero runtime dependencies by default, supports
|
|
19
19
|
concurrent and parallel tool execution and has a single coherent API
|
|
20
20
|
that spans 14+ providers.
|
|
21
|
+
The README covers the common cases. For everything else there is the
|
|
22
|
+
[deepdive](docs/deepdive.md), a reference with a chapter for each
|
|
23
|
+
topic, and for what changes between releases there is the
|
|
24
|
+
[changelog](CHANGELOG.md).
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**Still in early development.**
|
|
26
|
+
[The r.uby.dev website](https://r.uby.dev) hosts
|
|
27
|
+
an agentic platform that provides users with
|
|
28
|
+
personalized agents who can access GitHub, and
|
|
29
|
+
other services. It is built with llm.rb. Check it
|
|
30
|
+
out if curious. **Still in early development.**
|
|
28
31
|
|
|
29
32
|
## Install
|
|
30
33
|
|
|
34
|
+
llm.rb requires Ruby 3.4 or later.
|
|
35
|
+
|
|
31
36
|
```bash
|
|
32
37
|
gem install llm.rb
|
|
33
38
|
```
|
data/data/alibaba.json
CHANGED
|
@@ -90,7 +90,8 @@
|
|
|
90
90
|
"output": 0.4,
|
|
91
91
|
"cache_read": 0.01,
|
|
92
92
|
"cache_write": 0.125
|
|
93
|
-
}
|
|
93
|
+
},
|
|
94
|
+
"canonical_model_id": "alibaba/qwen3.5-flash"
|
|
94
95
|
},
|
|
95
96
|
"qwen3.7-max": {
|
|
96
97
|
"id": "qwen3.7-max",
|
|
@@ -349,7 +350,8 @@
|
|
|
349
350
|
"input": 0.2,
|
|
350
351
|
"output": 0.4,
|
|
351
352
|
"cache_read": 0.04
|
|
352
|
-
}
|
|
353
|
+
},
|
|
354
|
+
"canonical_model_id": "deepseek/deepseek-v4-flash-0731"
|
|
353
355
|
},
|
|
354
356
|
"qwen-max": {
|
|
355
357
|
"id": "qwen-max",
|
|
@@ -470,7 +472,8 @@
|
|
|
470
472
|
"output": 6,
|
|
471
473
|
"cache_read": 0.25,
|
|
472
474
|
"cache_write": 2.5
|
|
473
|
-
}
|
|
475
|
+
},
|
|
476
|
+
"canonical_model_id": "alibaba/qwen3.8-max"
|
|
474
477
|
},
|
|
475
478
|
"kimi-k3": {
|
|
476
479
|
"id": "kimi-k3",
|
|
@@ -515,7 +518,8 @@
|
|
|
515
518
|
"input": 3,
|
|
516
519
|
"output": 15,
|
|
517
520
|
"cache_read": 0.3
|
|
518
|
-
}
|
|
521
|
+
},
|
|
522
|
+
"canonical_model_id": "moonshotai/kimi-k3"
|
|
519
523
|
},
|
|
520
524
|
"qwen-plus-character-ja": {
|
|
521
525
|
"id": "qwen-plus-character-ja",
|
|
@@ -799,7 +803,8 @@
|
|
|
799
803
|
}
|
|
800
804
|
}
|
|
801
805
|
]
|
|
802
|
-
}
|
|
806
|
+
},
|
|
807
|
+
"canonical_model_id": "alibaba/qwen3.7-flash"
|
|
803
808
|
},
|
|
804
809
|
"qwen3-max": {
|
|
805
810
|
"id": "qwen3-max",
|
|
@@ -1046,7 +1051,8 @@
|
|
|
1046
1051
|
"input": 0.15,
|
|
1047
1052
|
"output": 0.47,
|
|
1048
1053
|
"cache_read": 0.016
|
|
1049
|
-
}
|
|
1054
|
+
},
|
|
1055
|
+
"canonical_model_id": "alibaba/qwen3.8-omni-flash"
|
|
1050
1056
|
},
|
|
1051
1057
|
"qvq-max": {
|
|
1052
1058
|
"id": "qvq-max",
|
|
@@ -1685,7 +1691,8 @@
|
|
|
1685
1691
|
"output": 0.47,
|
|
1686
1692
|
"cache_read": 0.016,
|
|
1687
1693
|
"cache_write": 0.2
|
|
1688
|
-
}
|
|
1694
|
+
},
|
|
1695
|
+
"canonical_model_id": "alibaba/qwen3.8-flash"
|
|
1689
1696
|
},
|
|
1690
1697
|
"qwen2-5-vl-7b-instruct": {
|
|
1691
1698
|
"id": "qwen2-5-vl-7b-instruct",
|
|
@@ -1956,7 +1963,8 @@
|
|
|
1956
1963
|
"output": 4.4,
|
|
1957
1964
|
"cache_read": 0.28,
|
|
1958
1965
|
"cache_write": 0
|
|
1959
|
-
}
|
|
1966
|
+
},
|
|
1967
|
+
"canonical_model_id": "zhipuai/glm-5.2"
|
|
1960
1968
|
},
|
|
1961
1969
|
"qwen-omni-turbo": {
|
|
1962
1970
|
"id": "qwen-omni-turbo",
|
data/data/anthropic.json
CHANGED
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"output": 5,
|
|
47
47
|
"cache_read": 0.1,
|
|
48
48
|
"cache_write": 1.25
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"canonical_model_id": "anthropic/claude-haiku-4-5"
|
|
50
51
|
},
|
|
51
52
|
"claude-opus-4-5": {
|
|
52
53
|
"id": "claude-opus-4-5",
|
|
@@ -95,7 +96,8 @@
|
|
|
95
96
|
"output": 25,
|
|
96
97
|
"cache_read": 0.5,
|
|
97
98
|
"cache_write": 6.25
|
|
98
|
-
}
|
|
99
|
+
},
|
|
100
|
+
"canonical_model_id": "anthropic/claude-opus-4-5"
|
|
99
101
|
},
|
|
100
102
|
"claude-sonnet-4-5": {
|
|
101
103
|
"id": "claude-sonnet-4-5",
|
|
@@ -136,7 +138,8 @@
|
|
|
136
138
|
"output": 15,
|
|
137
139
|
"cache_read": 0.3,
|
|
138
140
|
"cache_write": 3.75
|
|
139
|
-
}
|
|
141
|
+
},
|
|
142
|
+
"canonical_model_id": "anthropic/claude-sonnet-4-5"
|
|
140
143
|
},
|
|
141
144
|
"claude-opus-5-5": {
|
|
142
145
|
"id": "claude-opus-5-5",
|
|
@@ -203,7 +206,8 @@
|
|
|
203
206
|
"output": 20,
|
|
204
207
|
"cache_read": 0.2,
|
|
205
208
|
"cache_write": 5
|
|
206
|
-
}
|
|
209
|
+
},
|
|
210
|
+
"canonical_model_id": "anthropic/claude-opus-5-5"
|
|
207
211
|
},
|
|
208
212
|
"claude-fable-5-1": {
|
|
209
213
|
"id": "claude-fable-5-1",
|
|
@@ -250,7 +254,8 @@
|
|
|
250
254
|
"output": 50,
|
|
251
255
|
"cache_read": 0.25,
|
|
252
256
|
"cache_write": 12.5
|
|
253
|
-
}
|
|
257
|
+
},
|
|
258
|
+
"canonical_model_id": "anthropic/claude-fable-5-1"
|
|
254
259
|
},
|
|
255
260
|
"claude-opus-4-5-20251101": {
|
|
256
261
|
"id": "claude-opus-4-5-20251101",
|
|
@@ -366,7 +371,8 @@
|
|
|
366
371
|
"output": 25,
|
|
367
372
|
"cache_read": 0.5,
|
|
368
373
|
"cache_write": 6.25
|
|
369
|
-
}
|
|
374
|
+
},
|
|
375
|
+
"canonical_model_id": "anthropic/claude-opus-5"
|
|
370
376
|
},
|
|
371
377
|
"claude-fable-5": {
|
|
372
378
|
"id": "claude-fable-5",
|
|
@@ -713,6 +719,54 @@
|
|
|
713
719
|
"cache_write": 3.75
|
|
714
720
|
}
|
|
715
721
|
},
|
|
722
|
+
"claude-sonnet-5-5": {
|
|
723
|
+
"id": "claude-sonnet-5-5",
|
|
724
|
+
"name": "Claude Sonnet 5.5",
|
|
725
|
+
"description": "Fast Claude model for everyday coding, agents, and knowledge work",
|
|
726
|
+
"family": "claude-sonnet",
|
|
727
|
+
"attachment": true,
|
|
728
|
+
"reasoning": true,
|
|
729
|
+
"reasoning_options": [
|
|
730
|
+
{
|
|
731
|
+
"type": "effort",
|
|
732
|
+
"values": [
|
|
733
|
+
"low",
|
|
734
|
+
"medium",
|
|
735
|
+
"high",
|
|
736
|
+
"xhigh",
|
|
737
|
+
"max"
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
"tool_call": true,
|
|
742
|
+
"structured_output": true,
|
|
743
|
+
"temperature": false,
|
|
744
|
+
"knowledge": "2026-06",
|
|
745
|
+
"release_date": "2026-09-28",
|
|
746
|
+
"last_updated": "2026-09-28",
|
|
747
|
+
"modalities": {
|
|
748
|
+
"input": [
|
|
749
|
+
"text",
|
|
750
|
+
"image",
|
|
751
|
+
"pdf"
|
|
752
|
+
],
|
|
753
|
+
"output": [
|
|
754
|
+
"text"
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
"open_weights": false,
|
|
758
|
+
"limit": {
|
|
759
|
+
"context": 1000000,
|
|
760
|
+
"output": 128000
|
|
761
|
+
},
|
|
762
|
+
"cost": {
|
|
763
|
+
"input": 2,
|
|
764
|
+
"output": 10,
|
|
765
|
+
"cache_read": 0.2,
|
|
766
|
+
"cache_write": 2.5
|
|
767
|
+
},
|
|
768
|
+
"canonical_model_id": "anthropic/claude-sonnet-5-5"
|
|
769
|
+
},
|
|
716
770
|
"claude-opus-4-7": {
|
|
717
771
|
"id": "claude-opus-4-7",
|
|
718
772
|
"name": "Claude Opus 4.7",
|