llm.rb 11.3.0 → 12.0.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/CHANGELOG.md +270 -1
- data/LICENSE +92 -17
- data/README.md +209 -647
- data/data/anthropic.json +433 -249
- data/data/bedrock.json +2097 -1055
- data/data/deepinfra.json +993 -0
- data/data/deepseek.json +53 -28
- data/data/google.json +389 -771
- data/data/openai.json +1053 -771
- data/data/xai.json +133 -292
- data/data/zai.json +249 -141
- data/lib/llm/a2a.rb +2 -2
- data/lib/llm/active_record/acts_as_agent.rb +10 -41
- data/lib/llm/active_record/acts_as_llm.rb +25 -0
- data/lib/llm/active_record.rb +3 -3
- data/lib/llm/agent.rb +1 -1
- data/lib/llm/context.rb +9 -5
- data/lib/llm/contract/completion.rb +2 -2
- data/lib/llm/cost.rb +1 -1
- data/lib/llm/function/fiber_group.rb +2 -2
- data/lib/llm/function/task_group.rb +2 -2
- data/lib/llm/function/thread_group.rb +3 -3
- data/lib/llm/pipe.rb +1 -1
- data/lib/llm/provider.rb +2 -2
- data/lib/llm/providers/anthropic/request_adapter.rb +1 -1
- data/lib/llm/providers/bedrock/request_adapter/completion.rb +5 -5
- data/lib/llm/providers/bedrock/request_adapter.rb +3 -3
- data/lib/llm/providers/bedrock/response_adapter/completion.rb +2 -2
- data/lib/llm/providers/bedrock/response_adapter.rb +2 -2
- data/lib/llm/providers/deepinfra/audio.rb +66 -0
- data/lib/llm/providers/deepinfra/images.rb +90 -0
- data/lib/llm/providers/deepinfra/response_adapter.rb +36 -0
- data/lib/llm/providers/deepinfra.rb +100 -0
- data/lib/llm/providers/deepseek/images.rb +109 -0
- data/lib/llm/providers/deepseek/request_adapter.rb +32 -0
- data/lib/llm/providers/deepseek/response_adapter/image.rb +9 -0
- data/lib/llm/providers/deepseek/response_adapter.rb +29 -0
- data/lib/llm/providers/deepseek.rb +4 -2
- data/lib/llm/providers/google/request_adapter.rb +23 -6
- data/lib/llm/providers/google.rb +4 -4
- data/lib/llm/providers/ollama/request_adapter.rb +1 -1
- data/lib/llm/providers/openai/audio.rb +6 -2
- data/lib/llm/providers/openai/images.rb +9 -50
- data/lib/llm/providers/openai/request_adapter/respond.rb +38 -4
- data/lib/llm/providers/openai/request_adapter.rb +1 -1
- data/lib/llm/providers/openai/response_adapter/audio.rb +5 -1
- data/lib/llm/providers/openai/response_adapter/completion.rb +1 -1
- data/lib/llm/providers/openai/response_adapter/image.rb +0 -4
- data/lib/llm/providers/openai/responses.rb +1 -0
- data/lib/llm/providers/openai/stream_parser.rb +5 -6
- data/lib/llm/providers/openai.rb +2 -2
- data/lib/llm/providers/xai/images.rb +49 -26
- data/lib/llm/providers/xai.rb +2 -2
- data/lib/llm/registry.rb +2 -2
- data/lib/llm/response.rb +11 -1
- data/lib/llm/schema/leaf.rb +7 -1
- data/lib/llm/schema/object.rb +1 -1
- data/lib/llm/schema/renderer.rb +121 -0
- data/lib/llm/schema.rb +30 -0
- data/lib/llm/sequel/agent.rb +2 -43
- data/lib/llm/sequel/plugin.rb +25 -7
- data/lib/llm/stream.rb +1 -1
- data/lib/llm/tool.rb +2 -2
- data/lib/llm/tracer/telemetry.rb +4 -6
- data/lib/llm/tracer.rb +9 -21
- data/lib/llm/transport/execution.rb +16 -1
- data/lib/llm/transport/http.rb +2 -2
- data/lib/llm/transport/net_http_adapter.rb +1 -1
- data/lib/llm/transport/persistent_http.rb +1 -1
- data/lib/llm/transport/response/http.rb +1 -1
- data/lib/llm/uridata.rb +16 -0
- data/lib/llm/utils.rb +1 -1
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +20 -8
- data/llm.gemspec +14 -26
- data/resources/deepdive.md +966 -0
- metadata +26 -29
- data/lib/llm/tracer/langsmith.rb +0 -144
data/data/zai.json
CHANGED
|
@@ -8,20 +8,25 @@
|
|
|
8
8
|
"name": "Z.AI",
|
|
9
9
|
"doc": "https://docs.z.ai/guides/overview/pricing",
|
|
10
10
|
"models": {
|
|
11
|
-
"glm-
|
|
12
|
-
"id": "glm-
|
|
13
|
-
"name": "GLM-
|
|
11
|
+
"glm-4.7": {
|
|
12
|
+
"id": "glm-4.7",
|
|
13
|
+
"name": "GLM-4.7",
|
|
14
14
|
"family": "glm",
|
|
15
15
|
"attachment": false,
|
|
16
16
|
"reasoning": true,
|
|
17
|
+
"reasoning_options": [
|
|
18
|
+
{
|
|
19
|
+
"type": "toggle"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
17
22
|
"tool_call": true,
|
|
18
23
|
"interleaved": {
|
|
19
24
|
"field": "reasoning_content"
|
|
20
25
|
},
|
|
21
|
-
"structured_output": true,
|
|
22
26
|
"temperature": true,
|
|
23
|
-
"
|
|
24
|
-
"
|
|
27
|
+
"knowledge": "2025-04",
|
|
28
|
+
"release_date": "2025-12-22",
|
|
29
|
+
"last_updated": "2025-12-22",
|
|
25
30
|
"modalities": {
|
|
26
31
|
"input": [
|
|
27
32
|
"text"
|
|
@@ -30,51 +35,87 @@
|
|
|
30
35
|
"text"
|
|
31
36
|
]
|
|
32
37
|
},
|
|
33
|
-
"open_weights":
|
|
38
|
+
"open_weights": true,
|
|
34
39
|
"limit": {
|
|
35
|
-
"context":
|
|
40
|
+
"context": 204800,
|
|
36
41
|
"output": 131072
|
|
37
42
|
},
|
|
38
43
|
"cost": {
|
|
39
|
-
"input":
|
|
40
|
-
"output":
|
|
41
|
-
"cache_read": 0.
|
|
44
|
+
"input": 0.6,
|
|
45
|
+
"output": 2.2,
|
|
46
|
+
"cache_read": 0.11,
|
|
42
47
|
"cache_write": 0
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
|
-
"glm-5v
|
|
46
|
-
"id": "glm-5v
|
|
47
|
-
"name": "GLM-5V
|
|
50
|
+
"glm-4.5v": {
|
|
51
|
+
"id": "glm-4.5v",
|
|
52
|
+
"name": "GLM-4.5V",
|
|
48
53
|
"family": "glm",
|
|
49
54
|
"attachment": true,
|
|
50
55
|
"reasoning": true,
|
|
56
|
+
"reasoning_options": [
|
|
57
|
+
{
|
|
58
|
+
"type": "toggle"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
51
61
|
"tool_call": true,
|
|
52
|
-
"interleaved": {
|
|
53
|
-
"field": "reasoning_content"
|
|
54
|
-
},
|
|
55
62
|
"temperature": true,
|
|
56
|
-
"
|
|
57
|
-
"
|
|
63
|
+
"knowledge": "2025-04",
|
|
64
|
+
"release_date": "2025-08-11",
|
|
65
|
+
"last_updated": "2025-08-11",
|
|
58
66
|
"modalities": {
|
|
59
67
|
"input": [
|
|
60
68
|
"text",
|
|
61
69
|
"image",
|
|
62
|
-
"video"
|
|
63
|
-
"pdf"
|
|
70
|
+
"video"
|
|
64
71
|
],
|
|
65
72
|
"output": [
|
|
66
73
|
"text"
|
|
67
74
|
]
|
|
68
75
|
},
|
|
69
|
-
"open_weights":
|
|
76
|
+
"open_weights": true,
|
|
70
77
|
"limit": {
|
|
71
|
-
"context":
|
|
72
|
-
"output":
|
|
78
|
+
"context": 64000,
|
|
79
|
+
"output": 16384
|
|
73
80
|
},
|
|
74
81
|
"cost": {
|
|
75
|
-
"input":
|
|
76
|
-
"output":
|
|
77
|
-
|
|
82
|
+
"input": 0.6,
|
|
83
|
+
"output": 1.8
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"glm-4.5": {
|
|
87
|
+
"id": "glm-4.5",
|
|
88
|
+
"name": "GLM-4.5",
|
|
89
|
+
"family": "glm",
|
|
90
|
+
"attachment": false,
|
|
91
|
+
"reasoning": true,
|
|
92
|
+
"reasoning_options": [
|
|
93
|
+
{
|
|
94
|
+
"type": "toggle"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"tool_call": true,
|
|
98
|
+
"temperature": true,
|
|
99
|
+
"knowledge": "2025-04",
|
|
100
|
+
"release_date": "2025-07-28",
|
|
101
|
+
"last_updated": "2025-07-28",
|
|
102
|
+
"modalities": {
|
|
103
|
+
"input": [
|
|
104
|
+
"text"
|
|
105
|
+
],
|
|
106
|
+
"output": [
|
|
107
|
+
"text"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"open_weights": true,
|
|
111
|
+
"limit": {
|
|
112
|
+
"context": 131072,
|
|
113
|
+
"output": 98304
|
|
114
|
+
},
|
|
115
|
+
"cost": {
|
|
116
|
+
"input": 0.6,
|
|
117
|
+
"output": 2.2,
|
|
118
|
+
"cache_read": 0.11,
|
|
78
119
|
"cache_write": 0
|
|
79
120
|
}
|
|
80
121
|
},
|
|
@@ -84,6 +125,11 @@
|
|
|
84
125
|
"family": "glm-flash",
|
|
85
126
|
"attachment": false,
|
|
86
127
|
"reasoning": true,
|
|
128
|
+
"reasoning_options": [
|
|
129
|
+
{
|
|
130
|
+
"type": "toggle"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
87
133
|
"tool_call": true,
|
|
88
134
|
"temperature": true,
|
|
89
135
|
"knowledge": "2025-04",
|
|
@@ -109,17 +155,25 @@
|
|
|
109
155
|
"cache_write": 0
|
|
110
156
|
}
|
|
111
157
|
},
|
|
112
|
-
"glm-
|
|
113
|
-
"id": "glm-
|
|
114
|
-
"name": "GLM-
|
|
115
|
-
"family": "glm
|
|
158
|
+
"glm-5.1": {
|
|
159
|
+
"id": "glm-5.1",
|
|
160
|
+
"name": "GLM-5.1",
|
|
161
|
+
"family": "glm",
|
|
116
162
|
"attachment": false,
|
|
117
163
|
"reasoning": true,
|
|
164
|
+
"reasoning_options": [
|
|
165
|
+
{
|
|
166
|
+
"type": "toggle"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
118
169
|
"tool_call": true,
|
|
170
|
+
"interleaved": {
|
|
171
|
+
"field": "reasoning_content"
|
|
172
|
+
},
|
|
173
|
+
"structured_output": true,
|
|
119
174
|
"temperature": true,
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"last_updated": "2025-07-28",
|
|
175
|
+
"release_date": "2026-04-07",
|
|
176
|
+
"last_updated": "2026-04-07",
|
|
123
177
|
"modalities": {
|
|
124
178
|
"input": [
|
|
125
179
|
"text"
|
|
@@ -130,32 +184,35 @@
|
|
|
130
184
|
},
|
|
131
185
|
"open_weights": true,
|
|
132
186
|
"limit": {
|
|
133
|
-
"context":
|
|
134
|
-
"output":
|
|
187
|
+
"context": 200000,
|
|
188
|
+
"output": 131072
|
|
135
189
|
},
|
|
136
190
|
"cost": {
|
|
137
|
-
"input":
|
|
138
|
-
"output":
|
|
139
|
-
"cache_read": 0.
|
|
191
|
+
"input": 1.4,
|
|
192
|
+
"output": 4.4,
|
|
193
|
+
"cache_read": 0.26,
|
|
140
194
|
"cache_write": 0
|
|
141
195
|
}
|
|
142
196
|
},
|
|
143
|
-
"glm-4.
|
|
144
|
-
"id": "glm-4.
|
|
145
|
-
"name": "GLM-4.
|
|
197
|
+
"glm-4.6": {
|
|
198
|
+
"id": "glm-4.6",
|
|
199
|
+
"name": "GLM-4.6",
|
|
146
200
|
"family": "glm",
|
|
147
|
-
"attachment":
|
|
201
|
+
"attachment": false,
|
|
148
202
|
"reasoning": true,
|
|
203
|
+
"reasoning_options": [
|
|
204
|
+
{
|
|
205
|
+
"type": "toggle"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
149
208
|
"tool_call": true,
|
|
150
209
|
"temperature": true,
|
|
151
210
|
"knowledge": "2025-04",
|
|
152
|
-
"release_date": "2025-
|
|
153
|
-
"last_updated": "2025-
|
|
211
|
+
"release_date": "2025-09-30",
|
|
212
|
+
"last_updated": "2025-09-30",
|
|
154
213
|
"modalities": {
|
|
155
214
|
"input": [
|
|
156
|
-
"text"
|
|
157
|
-
"image",
|
|
158
|
-
"video"
|
|
215
|
+
"text"
|
|
159
216
|
],
|
|
160
217
|
"output": [
|
|
161
218
|
"text"
|
|
@@ -163,25 +220,39 @@
|
|
|
163
220
|
},
|
|
164
221
|
"open_weights": true,
|
|
165
222
|
"limit": {
|
|
166
|
-
"context":
|
|
167
|
-
"output":
|
|
223
|
+
"context": 204800,
|
|
224
|
+
"output": 131072
|
|
168
225
|
},
|
|
169
226
|
"cost": {
|
|
170
227
|
"input": 0.6,
|
|
171
|
-
"output":
|
|
228
|
+
"output": 2.2,
|
|
229
|
+
"cache_read": 0.11,
|
|
230
|
+
"cache_write": 0
|
|
172
231
|
}
|
|
173
232
|
},
|
|
174
|
-
"glm-
|
|
175
|
-
"id": "glm-
|
|
176
|
-
"name": "GLM-
|
|
177
|
-
"family": "glm
|
|
233
|
+
"glm-5.2": {
|
|
234
|
+
"id": "glm-5.2",
|
|
235
|
+
"name": "GLM-5.2",
|
|
236
|
+
"family": "glm",
|
|
178
237
|
"attachment": false,
|
|
179
238
|
"reasoning": true,
|
|
239
|
+
"reasoning_options": [
|
|
240
|
+
{
|
|
241
|
+
"type": "effort",
|
|
242
|
+
"values": [
|
|
243
|
+
"high",
|
|
244
|
+
"max"
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
],
|
|
180
248
|
"tool_call": true,
|
|
249
|
+
"interleaved": {
|
|
250
|
+
"field": "reasoning_content"
|
|
251
|
+
},
|
|
252
|
+
"structured_output": true,
|
|
181
253
|
"temperature": true,
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"last_updated": "2026-01-19",
|
|
254
|
+
"release_date": "2026-06-13",
|
|
255
|
+
"last_updated": "2026-06-13",
|
|
185
256
|
"modalities": {
|
|
186
257
|
"input": [
|
|
187
258
|
"text"
|
|
@@ -192,30 +263,37 @@
|
|
|
192
263
|
},
|
|
193
264
|
"open_weights": true,
|
|
194
265
|
"limit": {
|
|
195
|
-
"context":
|
|
266
|
+
"context": 1000000,
|
|
196
267
|
"output": 131072
|
|
197
268
|
},
|
|
198
269
|
"cost": {
|
|
199
|
-
"input":
|
|
200
|
-
"output":
|
|
201
|
-
"cache_read": 0,
|
|
270
|
+
"input": 1.4,
|
|
271
|
+
"output": 4.4,
|
|
272
|
+
"cache_read": 0.26,
|
|
202
273
|
"cache_write": 0
|
|
203
274
|
}
|
|
204
275
|
},
|
|
205
|
-
"glm-4.
|
|
206
|
-
"id": "glm-4.
|
|
207
|
-
"name": "GLM-4.
|
|
276
|
+
"glm-4.6v": {
|
|
277
|
+
"id": "glm-4.6v",
|
|
278
|
+
"name": "GLM-4.6V",
|
|
208
279
|
"family": "glm",
|
|
209
|
-
"attachment":
|
|
280
|
+
"attachment": true,
|
|
210
281
|
"reasoning": true,
|
|
282
|
+
"reasoning_options": [
|
|
283
|
+
{
|
|
284
|
+
"type": "toggle"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
211
287
|
"tool_call": true,
|
|
212
288
|
"temperature": true,
|
|
213
289
|
"knowledge": "2025-04",
|
|
214
|
-
"release_date": "2025-
|
|
215
|
-
"last_updated": "2025-
|
|
290
|
+
"release_date": "2025-12-08",
|
|
291
|
+
"last_updated": "2025-12-08",
|
|
216
292
|
"modalities": {
|
|
217
293
|
"input": [
|
|
218
|
-
"text"
|
|
294
|
+
"text",
|
|
295
|
+
"image",
|
|
296
|
+
"video"
|
|
219
297
|
],
|
|
220
298
|
"output": [
|
|
221
299
|
"text"
|
|
@@ -223,53 +301,66 @@
|
|
|
223
301
|
},
|
|
224
302
|
"open_weights": true,
|
|
225
303
|
"limit": {
|
|
226
|
-
"context":
|
|
227
|
-
"output":
|
|
304
|
+
"context": 128000,
|
|
305
|
+
"output": 32768
|
|
228
306
|
},
|
|
229
307
|
"cost": {
|
|
230
|
-
"input": 0.
|
|
231
|
-
"output":
|
|
232
|
-
"cache_read": 0.11,
|
|
233
|
-
"cache_write": 0
|
|
308
|
+
"input": 0.3,
|
|
309
|
+
"output": 0.9
|
|
234
310
|
}
|
|
235
311
|
},
|
|
236
|
-
"glm-
|
|
237
|
-
"id": "glm-
|
|
238
|
-
"name": "GLM-
|
|
312
|
+
"glm-5v-turbo": {
|
|
313
|
+
"id": "glm-5v-turbo",
|
|
314
|
+
"name": "GLM-5V-Turbo",
|
|
239
315
|
"family": "glm",
|
|
240
|
-
"attachment":
|
|
316
|
+
"attachment": true,
|
|
241
317
|
"reasoning": true,
|
|
318
|
+
"reasoning_options": [
|
|
319
|
+
{
|
|
320
|
+
"type": "toggle"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
242
323
|
"tool_call": true,
|
|
324
|
+
"interleaved": {
|
|
325
|
+
"field": "reasoning_content"
|
|
326
|
+
},
|
|
243
327
|
"temperature": true,
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"last_updated": "2025-07-28",
|
|
328
|
+
"release_date": "2026-04-01",
|
|
329
|
+
"last_updated": "2026-04-01",
|
|
247
330
|
"modalities": {
|
|
248
331
|
"input": [
|
|
249
|
-
"text"
|
|
332
|
+
"text",
|
|
333
|
+
"image",
|
|
334
|
+
"video",
|
|
335
|
+
"pdf"
|
|
250
336
|
],
|
|
251
337
|
"output": [
|
|
252
338
|
"text"
|
|
253
339
|
]
|
|
254
340
|
},
|
|
255
|
-
"open_weights":
|
|
341
|
+
"open_weights": false,
|
|
256
342
|
"limit": {
|
|
257
|
-
"context":
|
|
258
|
-
"output":
|
|
343
|
+
"context": 200000,
|
|
344
|
+
"output": 131072
|
|
259
345
|
},
|
|
260
346
|
"cost": {
|
|
261
|
-
"input":
|
|
262
|
-
"output":
|
|
263
|
-
"cache_read": 0.
|
|
347
|
+
"input": 1.2,
|
|
348
|
+
"output": 4,
|
|
349
|
+
"cache_read": 0.24,
|
|
264
350
|
"cache_write": 0
|
|
265
351
|
}
|
|
266
352
|
},
|
|
267
|
-
"glm-4.5-
|
|
268
|
-
"id": "glm-4.5-
|
|
269
|
-
"name": "GLM-4.5-
|
|
270
|
-
"family": "glm-
|
|
353
|
+
"glm-4.5-air": {
|
|
354
|
+
"id": "glm-4.5-air",
|
|
355
|
+
"name": "GLM-4.5-Air",
|
|
356
|
+
"family": "glm-air",
|
|
271
357
|
"attachment": false,
|
|
272
358
|
"reasoning": true,
|
|
359
|
+
"reasoning_options": [
|
|
360
|
+
{
|
|
361
|
+
"type": "toggle"
|
|
362
|
+
}
|
|
363
|
+
],
|
|
273
364
|
"tool_call": true,
|
|
274
365
|
"temperature": true,
|
|
275
366
|
"knowledge": "2025-04",
|
|
@@ -289,26 +380,28 @@
|
|
|
289
380
|
"output": 98304
|
|
290
381
|
},
|
|
291
382
|
"cost": {
|
|
292
|
-
"input": 0,
|
|
293
|
-
"output":
|
|
294
|
-
"cache_read": 0,
|
|
383
|
+
"input": 0.2,
|
|
384
|
+
"output": 1.1,
|
|
385
|
+
"cache_read": 0.03,
|
|
295
386
|
"cache_write": 0
|
|
296
387
|
}
|
|
297
388
|
},
|
|
298
|
-
"glm-
|
|
299
|
-
"id": "glm-
|
|
300
|
-
"name": "GLM-
|
|
301
|
-
"family": "glm",
|
|
389
|
+
"glm-4.7-flash": {
|
|
390
|
+
"id": "glm-4.7-flash",
|
|
391
|
+
"name": "GLM-4.7-Flash",
|
|
392
|
+
"family": "glm-flash",
|
|
302
393
|
"attachment": false,
|
|
303
394
|
"reasoning": true,
|
|
395
|
+
"reasoning_options": [
|
|
396
|
+
{
|
|
397
|
+
"type": "toggle"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
304
400
|
"tool_call": true,
|
|
305
|
-
"interleaved": {
|
|
306
|
-
"field": "reasoning_content"
|
|
307
|
-
},
|
|
308
|
-
"structured_output": true,
|
|
309
401
|
"temperature": true,
|
|
310
|
-
"
|
|
311
|
-
"
|
|
402
|
+
"knowledge": "2025-04",
|
|
403
|
+
"release_date": "2026-01-19",
|
|
404
|
+
"last_updated": "2026-01-19",
|
|
312
405
|
"modalities": {
|
|
313
406
|
"input": [
|
|
314
407
|
"text"
|
|
@@ -317,32 +410,34 @@
|
|
|
317
410
|
"text"
|
|
318
411
|
]
|
|
319
412
|
},
|
|
320
|
-
"open_weights":
|
|
413
|
+
"open_weights": true,
|
|
321
414
|
"limit": {
|
|
322
415
|
"context": 200000,
|
|
323
416
|
"output": 131072
|
|
324
417
|
},
|
|
325
418
|
"cost": {
|
|
326
|
-
"input":
|
|
327
|
-
"output":
|
|
328
|
-
"cache_read": 0
|
|
419
|
+
"input": 0,
|
|
420
|
+
"output": 0,
|
|
421
|
+
"cache_read": 0,
|
|
329
422
|
"cache_write": 0
|
|
330
423
|
}
|
|
331
424
|
},
|
|
332
|
-
"glm-4.
|
|
333
|
-
"id": "glm-4.
|
|
334
|
-
"name": "GLM-4.
|
|
335
|
-
"family": "glm",
|
|
425
|
+
"glm-4.5-flash": {
|
|
426
|
+
"id": "glm-4.5-flash",
|
|
427
|
+
"name": "GLM-4.5-Flash",
|
|
428
|
+
"family": "glm-flash",
|
|
336
429
|
"attachment": false,
|
|
337
430
|
"reasoning": true,
|
|
431
|
+
"reasoning_options": [
|
|
432
|
+
{
|
|
433
|
+
"type": "toggle"
|
|
434
|
+
}
|
|
435
|
+
],
|
|
338
436
|
"tool_call": true,
|
|
339
|
-
"interleaved": {
|
|
340
|
-
"field": "reasoning_content"
|
|
341
|
-
},
|
|
342
437
|
"temperature": true,
|
|
343
438
|
"knowledge": "2025-04",
|
|
344
|
-
"release_date": "2025-
|
|
345
|
-
"last_updated": "2025-
|
|
439
|
+
"release_date": "2025-07-28",
|
|
440
|
+
"last_updated": "2025-07-28",
|
|
346
441
|
"modalities": {
|
|
347
442
|
"input": [
|
|
348
443
|
"text"
|
|
@@ -353,13 +448,13 @@
|
|
|
353
448
|
},
|
|
354
449
|
"open_weights": true,
|
|
355
450
|
"limit": {
|
|
356
|
-
"context":
|
|
357
|
-
"output":
|
|
451
|
+
"context": 131072,
|
|
452
|
+
"output": 98304
|
|
358
453
|
},
|
|
359
454
|
"cost": {
|
|
360
|
-
"input": 0
|
|
361
|
-
"output":
|
|
362
|
-
"cache_read": 0
|
|
455
|
+
"input": 0,
|
|
456
|
+
"output": 0,
|
|
457
|
+
"cache_read": 0,
|
|
363
458
|
"cache_write": 0
|
|
364
459
|
}
|
|
365
460
|
},
|
|
@@ -369,13 +464,18 @@
|
|
|
369
464
|
"family": "glm",
|
|
370
465
|
"attachment": false,
|
|
371
466
|
"reasoning": true,
|
|
467
|
+
"reasoning_options": [
|
|
468
|
+
{
|
|
469
|
+
"type": "toggle"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
372
472
|
"tool_call": true,
|
|
373
473
|
"interleaved": {
|
|
374
474
|
"field": "reasoning_content"
|
|
375
475
|
},
|
|
376
476
|
"temperature": true,
|
|
377
|
-
"release_date": "2026-02-
|
|
378
|
-
"last_updated": "2026-02-
|
|
477
|
+
"release_date": "2026-02-12",
|
|
478
|
+
"last_updated": "2026-02-12",
|
|
379
479
|
"modalities": {
|
|
380
480
|
"input": [
|
|
381
481
|
"text"
|
|
@@ -396,35 +496,43 @@
|
|
|
396
496
|
"cache_write": 0
|
|
397
497
|
}
|
|
398
498
|
},
|
|
399
|
-
"glm-
|
|
400
|
-
"id": "glm-
|
|
401
|
-
"name": "GLM-
|
|
499
|
+
"glm-5-turbo": {
|
|
500
|
+
"id": "glm-5-turbo",
|
|
501
|
+
"name": "GLM-5-Turbo",
|
|
402
502
|
"family": "glm",
|
|
403
|
-
"attachment":
|
|
503
|
+
"attachment": false,
|
|
404
504
|
"reasoning": true,
|
|
505
|
+
"reasoning_options": [
|
|
506
|
+
{
|
|
507
|
+
"type": "toggle"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
405
510
|
"tool_call": true,
|
|
511
|
+
"interleaved": {
|
|
512
|
+
"field": "reasoning_content"
|
|
513
|
+
},
|
|
514
|
+
"structured_output": true,
|
|
406
515
|
"temperature": true,
|
|
407
|
-
"
|
|
408
|
-
"
|
|
409
|
-
"last_updated": "2025-12-08",
|
|
516
|
+
"release_date": "2026-03-16",
|
|
517
|
+
"last_updated": "2026-03-16",
|
|
410
518
|
"modalities": {
|
|
411
519
|
"input": [
|
|
412
|
-
"text"
|
|
413
|
-
"image",
|
|
414
|
-
"video"
|
|
520
|
+
"text"
|
|
415
521
|
],
|
|
416
522
|
"output": [
|
|
417
523
|
"text"
|
|
418
524
|
]
|
|
419
525
|
},
|
|
420
|
-
"open_weights":
|
|
526
|
+
"open_weights": false,
|
|
421
527
|
"limit": {
|
|
422
|
-
"context":
|
|
423
|
-
"output":
|
|
528
|
+
"context": 200000,
|
|
529
|
+
"output": 131072
|
|
424
530
|
},
|
|
425
531
|
"cost": {
|
|
426
|
-
"input":
|
|
427
|
-
"output":
|
|
532
|
+
"input": 1.2,
|
|
533
|
+
"output": 4,
|
|
534
|
+
"cache_read": 0.24,
|
|
535
|
+
"cache_write": 0
|
|
428
536
|
}
|
|
429
537
|
}
|
|
430
538
|
}
|
data/lib/llm/a2a.rb
CHANGED
|
@@ -177,7 +177,7 @@ class LLM::A2A
|
|
|
177
177
|
##
|
|
178
178
|
# Sends a message to the agent and returns the response.
|
|
179
179
|
# @param [String] text The message text to send
|
|
180
|
-
# @param [Hash]
|
|
180
|
+
# @param [Hash] configuration
|
|
181
181
|
# Optional configuration (accepted_output_modes, return_immediately)
|
|
182
182
|
# @param [Hash, nil] metadata
|
|
183
183
|
# Optional metadata to attach to the request
|
|
@@ -198,7 +198,7 @@ class LLM::A2A
|
|
|
198
198
|
# The block is called for each {LLM::Object} event in the stream
|
|
199
199
|
# (Task, Message, TaskStatusUpdateEvent, TaskArtifactUpdateEvent).
|
|
200
200
|
# @param [String] text The message text to send
|
|
201
|
-
# @param [Hash]
|
|
201
|
+
# @param [Hash] configuration Optional configuration
|
|
202
202
|
# @yieldparam [LLM::Object] event A stream event
|
|
203
203
|
# @return [void]
|
|
204
204
|
def send_streaming_message(text, configuration = {}, &on_event)
|