llm.rb 15.1.0 → 15.2.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 +296 -11
- data/README.md +68 -43
- data/bin/llm.rb +12 -4
- data/data/alibaba.json +912 -823
- data/data/anthropic.json +234 -187
- data/data/bedrock.json +3611 -2217
- data/data/deepinfra.json +1164 -989
- data/data/deepseek.json +65 -81
- data/data/google.json +668 -666
- data/data/mistral.json +501 -460
- data/data/moonshot.json +43 -248
- data/data/openai.json +1008 -914
- data/data/openrouter.json +7798 -7661
- data/data/xai.json +194 -194
- data/data/zai.json +242 -149
- data/docs/deepdive/advanced/compaction.md +5 -5
- data/docs/deepdive/advanced/guard.md +2 -2
- data/docs/deepdive/features/builtin_tools.md +93 -22
- data/docs/deepdive/features/{repl.md → console.md} +28 -28
- data/docs/deepdive/features/database.md +3 -3
- data/docs/deepdive/fundamentals/agents.md +2 -2
- data/docs/deepdive/fundamentals/providers.md +91 -6
- data/docs/deepdive/fundamentals/skills.md +14 -6
- data/docs/deepdive/fundamentals/tools.md +63 -31
- data/docs/deepdive/reference/cost.md +2 -2
- data/docs/deepdive/reference/model_registry.md +2 -2
- data/docs/deepdive/reference/tracer.md +15 -13
- data/docs/deepdive.md +2 -2
- data/lib/llm/active_record/acts_as_agent.rb +9 -5
- data/lib/llm/agent.rb +34 -15
- data/lib/llm/{repl → console}/bar.rb +3 -3
- data/lib/llm/{repl → console}/buffer.rb +4 -4
- data/lib/llm/{repl → console}/color.rb +2 -2
- data/lib/llm/{repl → console}/command.rb +12 -12
- data/lib/llm/{repl → console}/commands/exit.rb +4 -4
- data/lib/llm/{repl → console}/commands/help.rb +1 -1
- data/lib/llm/{repl/commands/compact.rb → console/commands/keep.rb} +11 -9
- data/lib/llm/{repl → console}/commands/model.rb +2 -2
- data/lib/llm/{repl → console}/input/cache.rb +2 -2
- data/lib/llm/{repl → console}/input/char.rb +2 -2
- data/lib/llm/{repl → console}/input/row.rb +1 -1
- data/lib/llm/{repl → console}/input.rb +13 -6
- data/lib/llm/console/markdown/parser.rb +78 -0
- data/lib/llm/{repl → console}/markdown/table.rb +3 -3
- data/lib/llm/{repl → console}/markdown.rb +13 -30
- data/lib/llm/{repl → console}/node.rb +3 -3
- data/lib/llm/{repl → console}/status.rb +11 -11
- data/lib/llm/{repl → console}/stream.rb +9 -9
- data/lib/llm/{repl → console}/walker.rb +1 -1
- data/lib/llm/{repl → console}/window.rb +10 -10
- data/lib/llm/{repl.rb → console.rb} +38 -19
- data/lib/llm/context/deserializer.rb +2 -1
- data/lib/llm/context.rb +1 -0
- data/lib/llm/function/async/reactor.rb +20 -1
- data/lib/llm/function.rb +1 -1
- data/lib/llm/json_adapter.rb +40 -28
- data/lib/llm/message.rb +7 -0
- data/lib/llm/provider.rb +2 -2
- data/lib/llm/providers/alibaba.rb +1 -1
- data/lib/llm/providers/deepseek.rb +1 -1
- data/lib/llm/providers/openai.rb +1 -0
- data/lib/llm/schema/leaf.rb +34 -2
- data/lib/llm/schema.rb +4 -2
- data/lib/llm/sequel/agent.rb +9 -5
- data/lib/llm/tool/param.rb +5 -1
- data/lib/llm/tool.rb +5 -0
- data/lib/llm/tools/bundle.rb +53 -0
- data/lib/llm/tools/edit-file.rb +7 -2
- data/lib/llm/tools/exec.rb +78 -0
- data/lib/llm/tools/git.rb +27 -26
- data/lib/llm/tools/mkdir.rb +12 -19
- data/lib/llm/tools/read_file.rb +69 -9
- data/lib/llm/tools/rg.rb +20 -24
- data/lib/llm/tools/ruby.rb +17 -25
- data/lib/llm/tools/utils.rb +74 -1
- data/lib/llm/tools/write_file.rb +4 -1
- data/lib/llm/tracer/logger.rb +2 -2
- data/lib/llm/tracer/pretty_logger.rb +4 -4
- data/lib/llm/tracer/telemetry.rb +2 -2
- data/lib/llm/tracer.rb +33 -0
- data/lib/llm/transport/utils.rb +1 -1
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +4 -13
- data/llm.gemspec +7 -8
- metadata +64 -37
- data/lib/llm/tools/shell.rb +0 -55
data/data/deepseek.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"name": "DeepSeek",
|
|
9
9
|
"doc": "https://api-docs.deepseek.com/quick_start/pricing",
|
|
10
10
|
"models": {
|
|
11
|
-
"deepseek-v4-flash": {
|
|
12
|
-
"id": "deepseek-v4-flash",
|
|
13
|
-
"name": "DeepSeek V4 Flash",
|
|
14
|
-
"description": "
|
|
11
|
+
"deepseek-v4-flash-vision-exp": {
|
|
12
|
+
"id": "deepseek-v4-flash-vision-exp",
|
|
13
|
+
"name": "DeepSeek V4 Flash Vision Exp",
|
|
14
|
+
"description": "DeepSeek V4.1 Flash model for reasoning and agentic coding",
|
|
15
15
|
"family": "deepseek-flash",
|
|
16
|
-
"attachment":
|
|
16
|
+
"attachment": true,
|
|
17
17
|
"reasoning": true,
|
|
18
18
|
"reasoning_options": [
|
|
19
19
|
{
|
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
"structured_output": true,
|
|
36
36
|
"temperature": true,
|
|
37
37
|
"knowledge": "2025-05",
|
|
38
|
-
"release_date": "2026-
|
|
39
|
-
"last_updated": "2026-
|
|
38
|
+
"release_date": "2026-09-10",
|
|
39
|
+
"last_updated": "2026-09-10",
|
|
40
40
|
"modalities": {
|
|
41
41
|
"input": [
|
|
42
|
-
"text"
|
|
42
|
+
"text",
|
|
43
|
+
"image"
|
|
43
44
|
],
|
|
44
45
|
"output": [
|
|
45
46
|
"text"
|
|
@@ -51,18 +52,18 @@
|
|
|
51
52
|
"output": 384000
|
|
52
53
|
},
|
|
53
54
|
"cost": {
|
|
54
|
-
"input": 0.
|
|
55
|
-
"output": 0.
|
|
56
|
-
"reasoning": 0.
|
|
57
|
-
"cache_read": 0.
|
|
55
|
+
"input": 0.15,
|
|
56
|
+
"output": 0.6,
|
|
57
|
+
"reasoning": 0.6,
|
|
58
|
+
"cache_read": 0.003
|
|
58
59
|
}
|
|
59
60
|
},
|
|
60
|
-
"deepseek-v4-
|
|
61
|
-
"id": "deepseek-v4-
|
|
62
|
-
"name": "DeepSeek V4
|
|
63
|
-
"description": "DeepSeek V4
|
|
64
|
-
"family": "deepseek-
|
|
65
|
-
"attachment":
|
|
61
|
+
"deepseek-v4-flash": {
|
|
62
|
+
"id": "deepseek-v4-flash",
|
|
63
|
+
"name": "DeepSeek V4 Flash",
|
|
64
|
+
"description": "DeepSeek V4.1 Flash model for reasoning and agentic coding",
|
|
65
|
+
"family": "deepseek-flash",
|
|
66
|
+
"attachment": true,
|
|
66
67
|
"reasoning": true,
|
|
67
68
|
"reasoning_options": [
|
|
68
69
|
{
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
{
|
|
72
73
|
"type": "effort",
|
|
73
74
|
"values": [
|
|
75
|
+
"low",
|
|
74
76
|
"high",
|
|
75
77
|
"max"
|
|
76
78
|
]
|
|
@@ -82,43 +84,13 @@
|
|
|
82
84
|
},
|
|
83
85
|
"structured_output": true,
|
|
84
86
|
"temperature": true,
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"input": [
|
|
89
|
-
"text"
|
|
90
|
-
],
|
|
91
|
-
"output": [
|
|
92
|
-
"text"
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
"open_weights": false,
|
|
96
|
-
"limit": {
|
|
97
|
-
"context": 1000000,
|
|
98
|
-
"output": 384000
|
|
99
|
-
},
|
|
100
|
-
"cost": {
|
|
101
|
-
"input": 0.435,
|
|
102
|
-
"output": 0.87,
|
|
103
|
-
"reasoning": 0.87,
|
|
104
|
-
"cache_read": 0.003625
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"deepseek-chat": {
|
|
108
|
-
"id": "deepseek-chat",
|
|
109
|
-
"name": "DeepSeek Chat",
|
|
110
|
-
"description": "DeepSeek chat model for instruction following, coding, and analysis",
|
|
111
|
-
"family": "deepseek",
|
|
112
|
-
"attachment": true,
|
|
113
|
-
"reasoning": false,
|
|
114
|
-
"tool_call": true,
|
|
115
|
-
"temperature": true,
|
|
116
|
-
"knowledge": "2025-09",
|
|
117
|
-
"release_date": "2025-12-01",
|
|
118
|
-
"last_updated": "2026-02-28",
|
|
87
|
+
"knowledge": "2025-05",
|
|
88
|
+
"release_date": "2026-09-10",
|
|
89
|
+
"last_updated": "2026-09-10",
|
|
119
90
|
"modalities": {
|
|
120
91
|
"input": [
|
|
121
|
-
"text"
|
|
92
|
+
"text",
|
|
93
|
+
"image"
|
|
122
94
|
],
|
|
123
95
|
"output": [
|
|
124
96
|
"text"
|
|
@@ -130,27 +102,39 @@
|
|
|
130
102
|
"output": 384000
|
|
131
103
|
},
|
|
132
104
|
"cost": {
|
|
133
|
-
"input": 0.
|
|
134
|
-
"output": 0.
|
|
135
|
-
"
|
|
105
|
+
"input": 0.15,
|
|
106
|
+
"output": 0.6,
|
|
107
|
+
"reasoning": 0.6,
|
|
108
|
+
"cache_read": 0.003
|
|
136
109
|
}
|
|
137
110
|
},
|
|
138
|
-
"deepseek-
|
|
139
|
-
"id": "deepseek-
|
|
140
|
-
"name": "DeepSeek
|
|
141
|
-
"description": "DeepSeek
|
|
111
|
+
"deepseek-v4-pro": {
|
|
112
|
+
"id": "deepseek-v4-pro",
|
|
113
|
+
"name": "DeepSeek V4 Pro",
|
|
114
|
+
"description": "DeepSeek V4 Pro snapshot with million-token context and support for thinking and non-thinking modes",
|
|
142
115
|
"family": "deepseek-thinking",
|
|
143
|
-
"attachment":
|
|
116
|
+
"attachment": false,
|
|
144
117
|
"reasoning": true,
|
|
145
|
-
"reasoning_options": [
|
|
118
|
+
"reasoning_options": [
|
|
119
|
+
{
|
|
120
|
+
"type": "toggle"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "effort",
|
|
124
|
+
"values": [
|
|
125
|
+
"high",
|
|
126
|
+
"max"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
146
130
|
"tool_call": true,
|
|
147
131
|
"interleaved": {
|
|
148
132
|
"field": "reasoning_content"
|
|
149
133
|
},
|
|
134
|
+
"structured_output": true,
|
|
150
135
|
"temperature": true,
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"last_updated": "2026-02-28",
|
|
136
|
+
"release_date": "2026-08-12",
|
|
137
|
+
"last_updated": "2026-08-22",
|
|
154
138
|
"modalities": {
|
|
155
139
|
"input": [
|
|
156
140
|
"text"
|
|
@@ -165,16 +149,16 @@
|
|
|
165
149
|
"output": 384000
|
|
166
150
|
},
|
|
167
151
|
"cost": {
|
|
168
|
-
"input": 0.
|
|
169
|
-
"output": 0.
|
|
170
|
-
"reasoning": 0.
|
|
171
|
-
"cache_read": 0.
|
|
152
|
+
"input": 0.435,
|
|
153
|
+
"output": 0.87,
|
|
154
|
+
"reasoning": 0.87,
|
|
155
|
+
"cache_read": 0.003625
|
|
172
156
|
}
|
|
173
157
|
},
|
|
174
|
-
"deepseek-
|
|
175
|
-
"id": "deepseek-
|
|
176
|
-
"name": "DeepSeek V4 Flash
|
|
177
|
-
"description": "
|
|
158
|
+
"deepseek-flash": {
|
|
159
|
+
"id": "deepseek-flash",
|
|
160
|
+
"name": "DeepSeek V4.1 Flash",
|
|
161
|
+
"description": "DeepSeek V4.1 Flash model for reasoning and agentic coding",
|
|
178
162
|
"family": "deepseek-flash",
|
|
179
163
|
"attachment": true,
|
|
180
164
|
"reasoning": true,
|
|
@@ -197,8 +181,9 @@
|
|
|
197
181
|
},
|
|
198
182
|
"structured_output": true,
|
|
199
183
|
"temperature": true,
|
|
200
|
-
"
|
|
201
|
-
"
|
|
184
|
+
"knowledge": "2025-05",
|
|
185
|
+
"release_date": "2026-09-10",
|
|
186
|
+
"last_updated": "2026-09-10",
|
|
202
187
|
"modalities": {
|
|
203
188
|
"input": [
|
|
204
189
|
"text",
|
|
@@ -208,17 +193,16 @@
|
|
|
208
193
|
"text"
|
|
209
194
|
]
|
|
210
195
|
},
|
|
211
|
-
"open_weights":
|
|
196
|
+
"open_weights": true,
|
|
212
197
|
"limit": {
|
|
213
198
|
"context": 1000000,
|
|
214
199
|
"output": 384000
|
|
215
200
|
},
|
|
216
|
-
"status": "beta",
|
|
217
201
|
"cost": {
|
|
218
|
-
"input": 0.
|
|
219
|
-
"output": 0.
|
|
220
|
-
"reasoning": 0.
|
|
221
|
-
"cache_read": 0.
|
|
202
|
+
"input": 0.15,
|
|
203
|
+
"output": 0.6,
|
|
204
|
+
"reasoning": 0.6,
|
|
205
|
+
"cache_read": 0.003
|
|
222
206
|
}
|
|
223
207
|
}
|
|
224
208
|
}
|