ask-llm-providers 0.1.2 → 0.8.2

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +181 -0
  3. data/lib/ask/llm/aliases.json +11 -0
  4. data/lib/ask/llm/aliases.rb +62 -0
  5. data/lib/ask/llm/catalog.rb +221 -0
  6. data/lib/ask/llm/cost_calculator.rb +114 -0
  7. data/lib/ask/llm/http.rb +68 -12
  8. data/lib/ask/llm/models/anthropic.json +872 -0
  9. data/lib/ask/llm/models/bedrock.json +3769 -0
  10. data/lib/ask/llm/models/deepseek.json +340 -0
  11. data/lib/ask/llm/models/gemini.json +1211 -0
  12. data/lib/ask/llm/models/meta.json +299 -0
  13. data/lib/ask/llm/models/mistral.json +1303 -0
  14. data/lib/ask/llm/models/moonshot.json +198 -0
  15. data/lib/ask/llm/models/nvidia_nim.json +289 -0
  16. data/lib/ask/llm/models/openai.json +2521 -0
  17. data/lib/ask/llm/models/opencode.json +552 -0
  18. data/lib/ask/llm/models/perplexity.json +148 -0
  19. data/lib/ask/llm/models/vertex_ai.json +1347 -0
  20. data/lib/ask/llm/models/xai.json +326 -0
  21. data/lib/ask/llm/models_schema.json +74 -0
  22. data/lib/ask/llm/openai_compatible.rb +100 -0
  23. data/lib/ask/llm/provider_config.rb +65 -0
  24. data/lib/ask/llm/sources/models_dev.rb +154 -0
  25. data/lib/ask/llm/sources/openrouter.rb +176 -0
  26. data/lib/ask/llm/sse_buffer.rb +43 -0
  27. data/lib/ask/llm/version.rb +1 -1
  28. data/lib/ask/provider/anthropic.rb +106 -103
  29. data/lib/ask/provider/bedrock.rb +84 -52
  30. data/lib/ask/provider/cloudflare.rb +62 -40
  31. data/lib/ask/provider/google.rb +112 -74
  32. data/lib/ask/provider/mistral.rb +156 -6
  33. data/lib/ask/provider/ollama.rb +83 -29
  34. data/lib/ask/provider/openai.rb +141 -68
  35. data/lib/ask/provider/openai_compatible.rb +91 -0
  36. data/lib/ask/skills/providers.model_select/SKILL.md +164 -0
  37. data/lib/ask-llm-providers.rb +22 -18
  38. metadata +35 -7
  39. data/lib/ask/llm/models/openai.rb +0 -69
@@ -0,0 +1,299 @@
1
+ [
2
+ {
3
+ "id": "llama-3.1-70b-instruct",
4
+ "name": "Meta: Llama 3.1 70B Instruct",
5
+ "provider": "meta",
6
+ "context_window": 131072,
7
+ "max_output_tokens": 16384,
8
+ "capabilities": [],
9
+ "modalities": {
10
+ "input": [
11
+ "text"
12
+ ],
13
+ "output": [
14
+ "text"
15
+ ]
16
+ },
17
+ "pricing": {
18
+ "text_tokens": {
19
+ "standard": {
20
+ "input_per_million": 0.4,
21
+ "output_per_million": 0.4
22
+ }
23
+ }
24
+ },
25
+ "architecture": "text->text",
26
+ "source": "openrouter"
27
+ },
28
+ {
29
+ "id": "llama-3.1-8b-instruct",
30
+ "name": "Meta: Llama 3.1 8B Instruct",
31
+ "provider": "meta",
32
+ "context_window": 131072,
33
+ "max_output_tokens": 131072,
34
+ "capabilities": [],
35
+ "modalities": {
36
+ "input": [
37
+ "text"
38
+ ],
39
+ "output": [
40
+ "text"
41
+ ]
42
+ },
43
+ "pricing": {
44
+ "text_tokens": {
45
+ "standard": {
46
+ "input_per_million": 0.05,
47
+ "output_per_million": 0.08,
48
+ "cache_read_input_per_million": 0.025
49
+ }
50
+ }
51
+ },
52
+ "architecture": "text->text",
53
+ "source": "openrouter"
54
+ },
55
+ {
56
+ "id": "llama-3.2-11b-vision-instruct",
57
+ "name": "Meta: Llama 3.2 11B Vision Instruct",
58
+ "provider": "meta",
59
+ "context_window": 131072,
60
+ "max_output_tokens": 16384,
61
+ "capabilities": [
62
+ "vision"
63
+ ],
64
+ "modalities": {
65
+ "input": [
66
+ "text",
67
+ "image"
68
+ ],
69
+ "output": [
70
+ "text"
71
+ ]
72
+ },
73
+ "pricing": {
74
+ "text_tokens": {
75
+ "standard": {
76
+ "input_per_million": 0.345,
77
+ "output_per_million": 0.345
78
+ }
79
+ }
80
+ },
81
+ "architecture": "text+image->text",
82
+ "source": "openrouter"
83
+ },
84
+ {
85
+ "id": "llama-3.2-1b-instruct",
86
+ "name": "Meta: Llama 3.2 1B Instruct",
87
+ "provider": "meta",
88
+ "context_window": 131072,
89
+ "max_output_tokens": 60000,
90
+ "capabilities": [],
91
+ "modalities": {
92
+ "input": [
93
+ "text"
94
+ ],
95
+ "output": [
96
+ "text"
97
+ ]
98
+ },
99
+ "pricing": {
100
+ "text_tokens": {
101
+ "standard": {
102
+ "input_per_million": 0.027,
103
+ "output_per_million": 0.201
104
+ }
105
+ }
106
+ },
107
+ "architecture": "text->text",
108
+ "source": "openrouter"
109
+ },
110
+ {
111
+ "id": "llama-3.2-3b-instruct",
112
+ "name": "Meta: Llama 3.2 3B Instruct",
113
+ "provider": "meta",
114
+ "context_window": 131072,
115
+ "max_output_tokens": 80000,
116
+ "capabilities": [],
117
+ "modalities": {
118
+ "input": [
119
+ "text"
120
+ ],
121
+ "output": [
122
+ "text"
123
+ ]
124
+ },
125
+ "pricing": {
126
+ "text_tokens": {
127
+ "standard": {
128
+ "input_per_million": 0.0509,
129
+ "output_per_million": 0.335
130
+ }
131
+ }
132
+ },
133
+ "architecture": "text->text",
134
+ "source": "openrouter"
135
+ },
136
+ {
137
+ "id": "llama-3.2-3b-instruct:free",
138
+ "name": "Meta: Llama 3.2 3B Instruct (free)",
139
+ "provider": "meta",
140
+ "context_window": 131072,
141
+ "capabilities": [],
142
+ "modalities": {
143
+ "input": [
144
+ "text"
145
+ ],
146
+ "output": [
147
+ "text"
148
+ ]
149
+ },
150
+ "pricing": {
151
+ "text_tokens": {
152
+ "standard": {
153
+ "input_per_million": 0.0,
154
+ "output_per_million": 0.0
155
+ }
156
+ }
157
+ },
158
+ "architecture": "text->text",
159
+ "source": "openrouter"
160
+ },
161
+ {
162
+ "id": "llama-3.3-70b-instruct",
163
+ "name": "Meta: Llama 3.3 70B Instruct",
164
+ "provider": "meta",
165
+ "context_window": 131072,
166
+ "max_output_tokens": 128000,
167
+ "capabilities": [],
168
+ "modalities": {
169
+ "input": [
170
+ "text"
171
+ ],
172
+ "output": [
173
+ "text"
174
+ ]
175
+ },
176
+ "pricing": {
177
+ "text_tokens": {
178
+ "standard": {
179
+ "input_per_million": 0.13,
180
+ "output_per_million": 0.4
181
+ }
182
+ }
183
+ },
184
+ "architecture": "text->text",
185
+ "source": "openrouter"
186
+ },
187
+ {
188
+ "id": "llama-3.3-70b-instruct:free",
189
+ "name": "Meta: Llama 3.3 70B Instruct (free)",
190
+ "provider": "meta",
191
+ "context_window": 131072,
192
+ "capabilities": [],
193
+ "modalities": {
194
+ "input": [
195
+ "text"
196
+ ],
197
+ "output": [
198
+ "text"
199
+ ]
200
+ },
201
+ "pricing": {
202
+ "text_tokens": {
203
+ "standard": {
204
+ "input_per_million": 0.0,
205
+ "output_per_million": 0.0
206
+ }
207
+ }
208
+ },
209
+ "architecture": "text->text",
210
+ "source": "openrouter"
211
+ },
212
+ {
213
+ "id": "llama-4-maverick",
214
+ "name": "Meta: Llama 4 Maverick",
215
+ "provider": "meta",
216
+ "context_window": 1048576,
217
+ "max_output_tokens": 16384,
218
+ "capabilities": [
219
+ "vision"
220
+ ],
221
+ "modalities": {
222
+ "input": [
223
+ "text",
224
+ "image"
225
+ ],
226
+ "output": [
227
+ "text"
228
+ ]
229
+ },
230
+ "pricing": {
231
+ "text_tokens": {
232
+ "standard": {
233
+ "input_per_million": 0.2,
234
+ "output_per_million": 0.8
235
+ }
236
+ }
237
+ },
238
+ "architecture": "text+image->text",
239
+ "source": "openrouter"
240
+ },
241
+ {
242
+ "id": "llama-4-scout",
243
+ "name": "Meta: Llama 4 Scout",
244
+ "provider": "meta",
245
+ "context_window": 10000000,
246
+ "max_output_tokens": 16384,
247
+ "capabilities": [
248
+ "vision"
249
+ ],
250
+ "modalities": {
251
+ "input": [
252
+ "text",
253
+ "image"
254
+ ],
255
+ "output": [
256
+ "text"
257
+ ]
258
+ },
259
+ "pricing": {
260
+ "text_tokens": {
261
+ "standard": {
262
+ "input_per_million": 0.1,
263
+ "output_per_million": 0.3
264
+ }
265
+ }
266
+ },
267
+ "architecture": "text+image->text",
268
+ "source": "openrouter"
269
+ },
270
+ {
271
+ "id": "llama-guard-4-12b",
272
+ "name": "Meta: Llama Guard 4 12B",
273
+ "provider": "meta",
274
+ "context_window": 163840,
275
+ "max_output_tokens": 16384,
276
+ "capabilities": [
277
+ "vision"
278
+ ],
279
+ "modalities": {
280
+ "input": [
281
+ "text",
282
+ "image"
283
+ ],
284
+ "output": [
285
+ "text"
286
+ ]
287
+ },
288
+ "pricing": {
289
+ "text_tokens": {
290
+ "standard": {
291
+ "input_per_million": 0.18,
292
+ "output_per_million": 0.18
293
+ }
294
+ }
295
+ },
296
+ "architecture": "text+image->text",
297
+ "source": "openrouter"
298
+ }
299
+ ]