llm.rb 11.3.1 → 12.1.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 +354 -2
- data/LICENSE +93 -17
- data/README.md +226 -616
- data/data/anthropic.json +322 -426
- data/data/bedrock.json +2634 -1144
- data/data/deepinfra.json +1513 -0
- data/data/deepseek.json +57 -28
- data/data/google.json +411 -771
- data/data/openai.json +1104 -771
- data/data/xai.json +141 -292
- data/data/zai.json +263 -141
- data/lib/llm/active_record/acts_as_agent.rb +3 -41
- data/lib/llm/active_record/acts_as_llm.rb +18 -0
- data/lib/llm/active_record.rb +3 -3
- data/lib/llm/agent.rb +25 -1
- data/lib/llm/context.rb +17 -5
- data/lib/llm/contract/completion.rb +2 -2
- data/lib/llm/json_adapter.rb +29 -3
- data/lib/llm/provider.rb +3 -3
- 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 +22 -5
- data/lib/llm/providers/google.rb +4 -4
- data/lib/llm/providers/llamacpp.rb +5 -5
- 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/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/repl/input.rb +64 -0
- data/lib/llm/repl/status.rb +30 -0
- data/lib/llm/repl/stream.rb +46 -0
- data/lib/llm/repl/transcript.rb +61 -0
- data/lib/llm/repl/window.rb +107 -0
- data/lib/llm/repl.rb +78 -0
- data/lib/llm/response.rb +10 -0
- data/lib/llm/schema/leaf.rb +7 -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/tools/chdir.rb +23 -0
- data/lib/llm/tools/git.rb +41 -0
- data/lib/llm/tools/mkdir.rb +32 -0
- data/lib/llm/tools/pwd.rb +20 -0
- data/lib/llm/tools/read_file.rb +40 -0
- data/lib/llm/tools/rg.rb +46 -0
- data/lib/llm/tools/shell.rb +48 -0
- data/lib/llm/tools/swap_text.rb +25 -0
- data/lib/llm/tools/write_file.rb +24 -0
- data/lib/llm/tools.rb +5 -0
- 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/net_http_adapter.rb +1 -1
- data/lib/llm/uridata.rb +16 -0
- data/lib/llm/version.rb +1 -1
- data/lib/llm.rb +9 -0
- data/llm.gemspec +5 -18
- data/resources/deepdive.md +829 -263
- metadata +31 -18
- data/lib/llm/tracer/langsmith.rb +0 -144
data/data/deepseek.json
CHANGED
|
@@ -8,17 +8,34 @@
|
|
|
8
8
|
"name": "DeepSeek",
|
|
9
9
|
"doc": "https://api-docs.deepseek.com/quick_start/pricing",
|
|
10
10
|
"models": {
|
|
11
|
-
"deepseek-
|
|
12
|
-
"id": "deepseek-
|
|
13
|
-
"name": "DeepSeek
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
11
|
+
"deepseek-v4-flash": {
|
|
12
|
+
"id": "deepseek-v4-flash",
|
|
13
|
+
"name": "DeepSeek V4 Flash",
|
|
14
|
+
"description": "Fast DeepSeek V4 lane for economical reasoning, coding, and long-context work",
|
|
15
|
+
"family": "deepseek-flash",
|
|
16
|
+
"attachment": false,
|
|
17
|
+
"reasoning": true,
|
|
18
|
+
"reasoning_options": [
|
|
19
|
+
{
|
|
20
|
+
"type": "toggle"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "effort",
|
|
24
|
+
"values": [
|
|
25
|
+
"high",
|
|
26
|
+
"max"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
17
30
|
"tool_call": true,
|
|
31
|
+
"interleaved": {
|
|
32
|
+
"field": "reasoning_content"
|
|
33
|
+
},
|
|
34
|
+
"structured_output": true,
|
|
18
35
|
"temperature": true,
|
|
19
|
-
"knowledge": "2025-
|
|
20
|
-
"release_date": "
|
|
21
|
-
"last_updated": "2026-
|
|
36
|
+
"knowledge": "2025-05",
|
|
37
|
+
"release_date": "2026-04-24",
|
|
38
|
+
"last_updated": "2026-04-24",
|
|
22
39
|
"modalities": {
|
|
23
40
|
"input": [
|
|
24
41
|
"text"
|
|
@@ -35,15 +52,28 @@
|
|
|
35
52
|
"cost": {
|
|
36
53
|
"input": 0.14,
|
|
37
54
|
"output": 0.28,
|
|
38
|
-
"cache_read": 0.
|
|
55
|
+
"cache_read": 0.0028
|
|
39
56
|
}
|
|
40
57
|
},
|
|
41
58
|
"deepseek-v4-pro": {
|
|
42
59
|
"id": "deepseek-v4-pro",
|
|
43
60
|
"name": "DeepSeek V4 Pro",
|
|
61
|
+
"description": "Open MoE flagship with million-token context for coding and long agent runs",
|
|
44
62
|
"family": "deepseek-thinking",
|
|
45
63
|
"attachment": false,
|
|
46
64
|
"reasoning": true,
|
|
65
|
+
"reasoning_options": [
|
|
66
|
+
{
|
|
67
|
+
"type": "toggle"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "effort",
|
|
71
|
+
"values": [
|
|
72
|
+
"high",
|
|
73
|
+
"max"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
47
77
|
"tool_call": true,
|
|
48
78
|
"interleaved": {
|
|
49
79
|
"field": "reasoning_content"
|
|
@@ -67,17 +97,19 @@
|
|
|
67
97
|
"output": 384000
|
|
68
98
|
},
|
|
69
99
|
"cost": {
|
|
70
|
-
"input":
|
|
71
|
-
"output":
|
|
72
|
-
"cache_read": 0.
|
|
100
|
+
"input": 0.435,
|
|
101
|
+
"output": 0.87,
|
|
102
|
+
"cache_read": 0.003625
|
|
73
103
|
}
|
|
74
104
|
},
|
|
75
105
|
"deepseek-reasoner": {
|
|
76
106
|
"id": "deepseek-reasoner",
|
|
77
107
|
"name": "DeepSeek Reasoner",
|
|
108
|
+
"description": "DeepSeek reasoning model for multi-step analysis, math, coding, and tools",
|
|
78
109
|
"family": "deepseek-thinking",
|
|
79
110
|
"attachment": true,
|
|
80
111
|
"reasoning": true,
|
|
112
|
+
"reasoning_options": [],
|
|
81
113
|
"tool_call": true,
|
|
82
114
|
"interleaved": {
|
|
83
115
|
"field": "reasoning_content"
|
|
@@ -102,24 +134,21 @@
|
|
|
102
134
|
"cost": {
|
|
103
135
|
"input": 0.14,
|
|
104
136
|
"output": 0.28,
|
|
105
|
-
"cache_read": 0.
|
|
137
|
+
"cache_read": 0.0028
|
|
106
138
|
}
|
|
107
139
|
},
|
|
108
|
-
"deepseek-
|
|
109
|
-
"id": "deepseek-
|
|
110
|
-
"name": "DeepSeek
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
140
|
+
"deepseek-chat": {
|
|
141
|
+
"id": "deepseek-chat",
|
|
142
|
+
"name": "DeepSeek Chat",
|
|
143
|
+
"description": "DeepSeek chat model for instruction following, coding, and analysis",
|
|
144
|
+
"family": "deepseek",
|
|
145
|
+
"attachment": true,
|
|
146
|
+
"reasoning": false,
|
|
114
147
|
"tool_call": true,
|
|
115
|
-
"interleaved": {
|
|
116
|
-
"field": "reasoning_content"
|
|
117
|
-
},
|
|
118
|
-
"structured_output": true,
|
|
119
148
|
"temperature": true,
|
|
120
|
-
"knowledge": "2025-
|
|
121
|
-
"release_date": "
|
|
122
|
-
"last_updated": "2026-
|
|
149
|
+
"knowledge": "2025-09",
|
|
150
|
+
"release_date": "2025-12-01",
|
|
151
|
+
"last_updated": "2026-02-28",
|
|
123
152
|
"modalities": {
|
|
124
153
|
"input": [
|
|
125
154
|
"text"
|
|
@@ -136,7 +165,7 @@
|
|
|
136
165
|
"cost": {
|
|
137
166
|
"input": 0.14,
|
|
138
167
|
"output": 0.28,
|
|
139
|
-
"cache_read": 0.
|
|
168
|
+
"cache_read": 0.0028
|
|
140
169
|
}
|
|
141
170
|
}
|
|
142
171
|
}
|