llm.rb 11.3.1 → 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 +242 -1
- data/LICENSE +92 -17
- data/README.md +204 -623
- 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/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/context.rb +9 -5
- data/lib/llm/contract/completion.rb +2 -2
- data/lib/llm/provider.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 +22 -5
- data/lib/llm/providers/google.rb +4 -4
- 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/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/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 +798 -264
- metadata +15 -18
- data/lib/llm/tracer/langsmith.rb +0 -144
data/data/deepseek.json
CHANGED
|
@@ -8,17 +8,33 @@
|
|
|
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
|
-
"family": "deepseek",
|
|
15
|
-
"attachment":
|
|
16
|
-
"reasoning":
|
|
11
|
+
"deepseek-v4-flash": {
|
|
12
|
+
"id": "deepseek-v4-flash",
|
|
13
|
+
"name": "DeepSeek V4 Flash",
|
|
14
|
+
"family": "deepseek-flash",
|
|
15
|
+
"attachment": false,
|
|
16
|
+
"reasoning": true,
|
|
17
|
+
"reasoning_options": [
|
|
18
|
+
{
|
|
19
|
+
"type": "toggle"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "effort",
|
|
23
|
+
"values": [
|
|
24
|
+
"high",
|
|
25
|
+
"max"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
17
29
|
"tool_call": true,
|
|
30
|
+
"interleaved": {
|
|
31
|
+
"field": "reasoning_content"
|
|
32
|
+
},
|
|
33
|
+
"structured_output": true,
|
|
18
34
|
"temperature": true,
|
|
19
|
-
"knowledge": "2025-
|
|
20
|
-
"release_date": "
|
|
21
|
-
"last_updated": "2026-
|
|
35
|
+
"knowledge": "2025-05",
|
|
36
|
+
"release_date": "2026-04-24",
|
|
37
|
+
"last_updated": "2026-04-24",
|
|
22
38
|
"modalities": {
|
|
23
39
|
"input": [
|
|
24
40
|
"text"
|
|
@@ -35,7 +51,7 @@
|
|
|
35
51
|
"cost": {
|
|
36
52
|
"input": 0.14,
|
|
37
53
|
"output": 0.28,
|
|
38
|
-
"cache_read": 0.
|
|
54
|
+
"cache_read": 0.0028
|
|
39
55
|
}
|
|
40
56
|
},
|
|
41
57
|
"deepseek-v4-pro": {
|
|
@@ -44,6 +60,18 @@
|
|
|
44
60
|
"family": "deepseek-thinking",
|
|
45
61
|
"attachment": false,
|
|
46
62
|
"reasoning": true,
|
|
63
|
+
"reasoning_options": [
|
|
64
|
+
{
|
|
65
|
+
"type": "toggle"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "effort",
|
|
69
|
+
"values": [
|
|
70
|
+
"high",
|
|
71
|
+
"max"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
47
75
|
"tool_call": true,
|
|
48
76
|
"interleaved": {
|
|
49
77
|
"field": "reasoning_content"
|
|
@@ -67,9 +95,9 @@
|
|
|
67
95
|
"output": 384000
|
|
68
96
|
},
|
|
69
97
|
"cost": {
|
|
70
|
-
"input":
|
|
71
|
-
"output":
|
|
72
|
-
"cache_read": 0.
|
|
98
|
+
"input": 0.435,
|
|
99
|
+
"output": 0.87,
|
|
100
|
+
"cache_read": 0.003625
|
|
73
101
|
}
|
|
74
102
|
},
|
|
75
103
|
"deepseek-reasoner": {
|
|
@@ -78,6 +106,7 @@
|
|
|
78
106
|
"family": "deepseek-thinking",
|
|
79
107
|
"attachment": true,
|
|
80
108
|
"reasoning": true,
|
|
109
|
+
"reasoning_options": [],
|
|
81
110
|
"tool_call": true,
|
|
82
111
|
"interleaved": {
|
|
83
112
|
"field": "reasoning_content"
|
|
@@ -102,24 +131,20 @@
|
|
|
102
131
|
"cost": {
|
|
103
132
|
"input": 0.14,
|
|
104
133
|
"output": 0.28,
|
|
105
|
-
"cache_read": 0.
|
|
134
|
+
"cache_read": 0.0028
|
|
106
135
|
}
|
|
107
136
|
},
|
|
108
|
-
"deepseek-
|
|
109
|
-
"id": "deepseek-
|
|
110
|
-
"name": "DeepSeek
|
|
111
|
-
"family": "deepseek
|
|
112
|
-
"attachment":
|
|
113
|
-
"reasoning":
|
|
137
|
+
"deepseek-chat": {
|
|
138
|
+
"id": "deepseek-chat",
|
|
139
|
+
"name": "DeepSeek Chat",
|
|
140
|
+
"family": "deepseek",
|
|
141
|
+
"attachment": true,
|
|
142
|
+
"reasoning": false,
|
|
114
143
|
"tool_call": true,
|
|
115
|
-
"interleaved": {
|
|
116
|
-
"field": "reasoning_content"
|
|
117
|
-
},
|
|
118
|
-
"structured_output": true,
|
|
119
144
|
"temperature": true,
|
|
120
|
-
"knowledge": "2025-
|
|
121
|
-
"release_date": "
|
|
122
|
-
"last_updated": "2026-
|
|
145
|
+
"knowledge": "2025-09",
|
|
146
|
+
"release_date": "2025-12-01",
|
|
147
|
+
"last_updated": "2026-02-28",
|
|
123
148
|
"modalities": {
|
|
124
149
|
"input": [
|
|
125
150
|
"text"
|
|
@@ -136,7 +161,7 @@
|
|
|
136
161
|
"cost": {
|
|
137
162
|
"input": 0.14,
|
|
138
163
|
"output": 0.28,
|
|
139
|
-
"cache_read": 0.
|
|
164
|
+
"cache_read": 0.0028
|
|
140
165
|
}
|
|
141
166
|
}
|
|
142
167
|
}
|