llm.rb 15.0.3 → 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 +433 -3
- data/README.md +188 -71
- data/bin/llm.rb +50 -7
- data/data/alibaba.json +912 -823
- data/data/anthropic.json +234 -187
- data/data/bedrock.json +3702 -2058
- data/data/deepinfra.json +1288 -951
- data/data/deepseek.json +87 -53
- data/data/google.json +670 -670
- data/data/mistral.json +501 -460
- data/data/moonshot.json +43 -248
- data/data/openai.json +1008 -914
- data/data/openrouter.json +14417 -0
- data/data/xai.json +213 -201
- data/data/zai.json +242 -149
- data/docs/deepdive/advanced/compaction.md +5 -5
- data/docs/deepdive/advanced/context.md +8 -6
- 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 +13 -12
- data/docs/deepdive/fundamentals/providers.md +91 -6
- data/docs/deepdive/fundamentals/skills.md +14 -6
- data/docs/deepdive/fundamentals/stream.md +4 -4
- 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 +40 -15
- data/lib/llm/{repl → console}/bar.rb +3 -3
- data/lib/llm/{repl → console}/buffer.rb +24 -9
- 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 +18 -10
- data/lib/llm/console/markdown/parser.rb +78 -0
- data/lib/llm/{repl → console}/markdown/table.rb +8 -5
- data/lib/llm/{repl → console}/markdown.rb +13 -30
- data/lib/llm/console/node.rb +69 -0
- data/lib/llm/{repl → console}/status.rb +11 -11
- data/lib/llm/{repl → console}/stream.rb +36 -9
- data/lib/llm/{repl → console}/walker.rb +1 -1
- data/lib/llm/{repl → console}/window.rb +17 -17
- data/lib/llm/{repl.rb → console.rb} +39 -19
- data/lib/llm/context/deserializer.rb +2 -1
- data/lib/llm/context.rb +29 -13
- data/lib/llm/cost.rb +13 -0
- data/lib/llm/function/async/reactor.rb +20 -1
- data/lib/llm/function/fork/task.rb +14 -10
- 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 +31 -10
- data/lib/llm/providers/alibaba.rb +1 -1
- data/lib/llm/providers/anthropic.rb +1 -1
- data/lib/llm/providers/bedrock/models.rb +2 -2
- data/lib/llm/providers/bedrock.rb +1 -1
- data/lib/llm/providers/deepseek.rb +1 -1
- data/lib/llm/providers/google.rb +1 -1
- data/lib/llm/providers/ollama.rb +1 -1
- data/lib/llm/providers/openai/responses.rb +2 -1
- data/lib/llm/providers/openai.rb +2 -1
- data/lib/llm/providers/openrouter.rb +87 -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/skill.rb +7 -1
- data/lib/llm/stream.rb +8 -3
- 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 +75 -2
- 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/curb.rb +5 -3
- data/lib/llm/transport/http.rb +5 -2
- data/lib/llm/transport/persistent_http.rb +6 -4
- data/lib/llm/transport/utils.rb +8 -6
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +18 -12
- data/llm.gemspec +8 -8
- metadata +80 -37
- data/lib/llm/repl/node.rb +0 -44
- 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,40 +84,57 @@
|
|
|
82
84
|
},
|
|
83
85
|
"structured_output": true,
|
|
84
86
|
"temperature": true,
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
+
"knowledge": "2025-05",
|
|
88
|
+
"release_date": "2026-09-10",
|
|
89
|
+
"last_updated": "2026-09-10",
|
|
87
90
|
"modalities": {
|
|
88
91
|
"input": [
|
|
89
|
-
"text"
|
|
92
|
+
"text",
|
|
93
|
+
"image"
|
|
90
94
|
],
|
|
91
95
|
"output": [
|
|
92
96
|
"text"
|
|
93
97
|
]
|
|
94
98
|
},
|
|
95
|
-
"open_weights":
|
|
99
|
+
"open_weights": true,
|
|
96
100
|
"limit": {
|
|
97
101
|
"context": 1000000,
|
|
98
102
|
"output": 384000
|
|
99
103
|
},
|
|
100
104
|
"cost": {
|
|
101
|
-
"input": 0.
|
|
102
|
-
"output": 0.
|
|
103
|
-
"reasoning": 0.
|
|
104
|
-
"cache_read": 0.
|
|
105
|
+
"input": 0.15,
|
|
106
|
+
"output": 0.6,
|
|
107
|
+
"reasoning": 0.6,
|
|
108
|
+
"cache_read": 0.003
|
|
105
109
|
}
|
|
106
110
|
},
|
|
107
|
-
"deepseek-
|
|
108
|
-
"id": "deepseek-
|
|
109
|
-
"name": "DeepSeek
|
|
110
|
-
"description": "DeepSeek
|
|
111
|
-
"family": "deepseek",
|
|
112
|
-
"attachment":
|
|
113
|
-
"reasoning":
|
|
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",
|
|
115
|
+
"family": "deepseek-thinking",
|
|
116
|
+
"attachment": false,
|
|
117
|
+
"reasoning": true,
|
|
118
|
+
"reasoning_options": [
|
|
119
|
+
{
|
|
120
|
+
"type": "toggle"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "effort",
|
|
124
|
+
"values": [
|
|
125
|
+
"high",
|
|
126
|
+
"max"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
114
130
|
"tool_call": true,
|
|
131
|
+
"interleaved": {
|
|
132
|
+
"field": "reasoning_content"
|
|
133
|
+
},
|
|
134
|
+
"structured_output": true,
|
|
115
135
|
"temperature": true,
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"last_updated": "2026-02-28",
|
|
136
|
+
"release_date": "2026-08-12",
|
|
137
|
+
"last_updated": "2026-08-22",
|
|
119
138
|
"modalities": {
|
|
120
139
|
"input": [
|
|
121
140
|
"text"
|
|
@@ -130,30 +149,45 @@
|
|
|
130
149
|
"output": 384000
|
|
131
150
|
},
|
|
132
151
|
"cost": {
|
|
133
|
-
"input": 0.
|
|
134
|
-
"output": 0.
|
|
135
|
-
"
|
|
152
|
+
"input": 0.435,
|
|
153
|
+
"output": 0.87,
|
|
154
|
+
"reasoning": 0.87,
|
|
155
|
+
"cache_read": 0.003625
|
|
136
156
|
}
|
|
137
157
|
},
|
|
138
|
-
"deepseek-
|
|
139
|
-
"id": "deepseek-
|
|
140
|
-
"name": "DeepSeek
|
|
141
|
-
"description": "DeepSeek
|
|
142
|
-
"family": "deepseek-
|
|
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",
|
|
162
|
+
"family": "deepseek-flash",
|
|
143
163
|
"attachment": true,
|
|
144
164
|
"reasoning": true,
|
|
145
|
-
"reasoning_options": [
|
|
165
|
+
"reasoning_options": [
|
|
166
|
+
{
|
|
167
|
+
"type": "toggle"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "effort",
|
|
171
|
+
"values": [
|
|
172
|
+
"low",
|
|
173
|
+
"high",
|
|
174
|
+
"max"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
146
178
|
"tool_call": true,
|
|
147
179
|
"interleaved": {
|
|
148
180
|
"field": "reasoning_content"
|
|
149
181
|
},
|
|
182
|
+
"structured_output": true,
|
|
150
183
|
"temperature": true,
|
|
151
|
-
"knowledge": "2025-
|
|
152
|
-
"release_date": "
|
|
153
|
-
"last_updated": "2026-
|
|
184
|
+
"knowledge": "2025-05",
|
|
185
|
+
"release_date": "2026-09-10",
|
|
186
|
+
"last_updated": "2026-09-10",
|
|
154
187
|
"modalities": {
|
|
155
188
|
"input": [
|
|
156
|
-
"text"
|
|
189
|
+
"text",
|
|
190
|
+
"image"
|
|
157
191
|
],
|
|
158
192
|
"output": [
|
|
159
193
|
"text"
|
|
@@ -165,10 +199,10 @@
|
|
|
165
199
|
"output": 384000
|
|
166
200
|
},
|
|
167
201
|
"cost": {
|
|
168
|
-
"input": 0.
|
|
169
|
-
"output": 0.
|
|
170
|
-
"reasoning": 0.
|
|
171
|
-
"cache_read": 0.
|
|
202
|
+
"input": 0.15,
|
|
203
|
+
"output": 0.6,
|
|
204
|
+
"reasoning": 0.6,
|
|
205
|
+
"cache_read": 0.003
|
|
172
206
|
}
|
|
173
207
|
}
|
|
174
208
|
}
|