llm-zoo 1.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.
- package/LICENSE +21 -0
- package/README.md +269 -0
- package/dist/index-CQCjbg9k.d.cts +226 -0
- package/dist/index-CQCjbg9k.d.ts +226 -0
- package/dist/index.cjs +1778 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +260 -0
- package/dist/index.d.ts +260 -0
- package/dist/index.js +1733 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/index.cjs +1535 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +1523 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/schemas.cjs +61 -0
- package/dist/schemas.cjs.map +1 -0
- package/dist/schemas.d.cts +355 -0
- package/dist/schemas.d.ts +355 -0
- package/dist/schemas.js +55 -0
- package/dist/schemas.js.map +1 -0
- package/package.json +91 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 texra-ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# llm-zoo 🦁
|
|
2
|
+
|
|
3
|
+
LLM pricing and capabilities change weekly. Docs are scattered. There's no single source of truth.
|
|
4
|
+
|
|
5
|
+
**One package. 78 models. Always current.**
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { lookup, cost, cheapest } from 'llm-zoo';
|
|
9
|
+
|
|
10
|
+
// Know everything about any model
|
|
11
|
+
const claude = lookup('sonnet45');
|
|
12
|
+
console.log(claude.contextWindow); // 200000
|
|
13
|
+
console.log(claude.inputPrice); // 3
|
|
14
|
+
|
|
15
|
+
// Calculate exact costs
|
|
16
|
+
const price = cost('gpt4o', { input: 50000, output: 10000 });
|
|
17
|
+
|
|
18
|
+
// Find the right model
|
|
19
|
+
const budget = cheapest({ supportsVision: true, supportsReasoning: true });
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Zero dependencies. Full TypeScript. Tree-shakeable. Zod schemas included.**
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install llm-zoo
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Model Rankings
|
|
33
|
+
|
|
34
|
+
### Cheapest ($/1M tokens)
|
|
35
|
+
|
|
36
|
+
| Model | Input | Output | Provider |
|
|
37
|
+
|-------|-------|--------|----------|
|
|
38
|
+
| `qwenturbo` | $0.05 | $0.50 | DashScope |
|
|
39
|
+
| `gpt41--` | $0.10 | $0.40 | OpenAI |
|
|
40
|
+
| `gemini25f-` | $0.10 | $0.40 | Google |
|
|
41
|
+
| `dsv3` | $0.14 | $0.28 | DeepSeek |
|
|
42
|
+
| `gpt4o-` | $0.15 | $0.60 | OpenAI |
|
|
43
|
+
| `haiku3` | $0.25 | $1.25 | Anthropic |
|
|
44
|
+
| `deepseek` | $0.28 | $0.42 | DeepSeek |
|
|
45
|
+
| `gemini3f` | $0.30 | $2.50 | Google |
|
|
46
|
+
|
|
47
|
+
### Premium ($/1M tokens)
|
|
48
|
+
|
|
49
|
+
| Model | Input | Output | Reasoning | Provider |
|
|
50
|
+
|-------|-------|--------|-----------|----------|
|
|
51
|
+
| `o1pro` | $150 | $600 | ✓ | OpenAI |
|
|
52
|
+
| `gpt45` | $75 | $150 | - | OpenAI |
|
|
53
|
+
| `gpt52pro` | $21 | $168 | ✓ | OpenAI |
|
|
54
|
+
| `o3pro` | $20 | $80 | ✓ | OpenAI |
|
|
55
|
+
| `opus45T` | $5 | $25 | ✓ | Anthropic |
|
|
56
|
+
| `opus45` | $5 | $25 | - | Anthropic |
|
|
57
|
+
| `opus41T` | $15 | $75 | ✓ | Anthropic |
|
|
58
|
+
| `opus41` | $15 | $75 | - | Anthropic |
|
|
59
|
+
|
|
60
|
+
### Largest Context
|
|
61
|
+
|
|
62
|
+
| Model | Context | Provider |
|
|
63
|
+
|-------|---------|----------|
|
|
64
|
+
| `gemini3p` | 1M | Google |
|
|
65
|
+
| `gemini25p` | 1M | Google |
|
|
66
|
+
| `qwenplus` | 1M | DashScope |
|
|
67
|
+
| `gpt41` | 1M | OpenAI |
|
|
68
|
+
| `gpt5` | 400K | OpenAI |
|
|
69
|
+
| `kimi2` | 262K | Moonshot |
|
|
70
|
+
| `grok4` | 256K | xAI |
|
|
71
|
+
| `sonnet45` | 200K | Anthropic |
|
|
72
|
+
|
|
73
|
+
### Capabilities
|
|
74
|
+
|
|
75
|
+
| Capability | Count | Examples |
|
|
76
|
+
|------------|-------|----------|
|
|
77
|
+
| Vision | 45+ | `sonnet45`, `gpt4o`, `gemini25p` |
|
|
78
|
+
| Reasoning | 30+ | `opus45T`, `o3`, `deepseekT`, `grok4` |
|
|
79
|
+
| Code Execution | 20+ | `sonnet45`, `gpt41`, `gemini3p` |
|
|
80
|
+
| Web Search | 15+ | `opus45`, `gpt4o`, `o3` |
|
|
81
|
+
| Prompt Caching | 25+ | All Claude, Gemini, DeepSeek |
|
|
82
|
+
|
|
83
|
+
### Providers
|
|
84
|
+
|
|
85
|
+
| Provider | Models | Highlights |
|
|
86
|
+
|----------|--------|------------|
|
|
87
|
+
| **Anthropic** | 20 | 90% cache savings, PDF support |
|
|
88
|
+
| **OpenAI** | 27 | o-series reasoning, deep research |
|
|
89
|
+
| **Google** | 6 | 1M context, audio input |
|
|
90
|
+
| **DeepSeek** | 7 | Budget reasoning ($0.28/1M) |
|
|
91
|
+
| **xAI** | 5 | Grok 4 with 256K context |
|
|
92
|
+
| **Moonshot** | 7 | Kimi K2 thinking mode |
|
|
93
|
+
| **DashScope** | 3 | Qwen with 1M context |
|
|
94
|
+
| **Copilot** | 1 | Free GPT-4o |
|
|
95
|
+
| **OpenRouter** | 2 | Llama 405B, QVQ-72B |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## API
|
|
100
|
+
|
|
101
|
+
### Lookup
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
lookup('sonnet45') // → ModelConfig | undefined
|
|
105
|
+
resolve('claude-sonnet-4-5') // → by full API name
|
|
106
|
+
exists('gpt4o') // → true
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Filter
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
from(ModelProvider.ANTHROPIC) // → all Claude models
|
|
113
|
+
where(c => c.supportsVision) // → by capability predicate
|
|
114
|
+
supporting('supportsReasoning') // → models with reasoning
|
|
115
|
+
withContext(500000) // → 500K+ context models
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Cost
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
cost('sonnet45', { input: 10000, output: 5000 })
|
|
122
|
+
cost('sonnet45', { input: 10000, output: 5000, cached: 8000 }) // with caching
|
|
123
|
+
maxCost('gpt4o', 50000) // worst case
|
|
124
|
+
compareCosts(['sonnet45', 'gpt4o'], { input: 10000, output: 2000 })
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Select
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
cheapest({ supportsVision: true })
|
|
131
|
+
cheapest({ supportsReasoning: true }, { minContext: 100000 })
|
|
132
|
+
smartpick(5) // best model under $5/1M tokens
|
|
133
|
+
ranked('price') // cheapest first
|
|
134
|
+
ranked('context', 'desc') // largest context first
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Insights
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
const { totalModels, providers, pricing, context } = insights();
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Zod Schemas
|
|
146
|
+
|
|
147
|
+
Validate model configs at runtime:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
import { ModelConfigSchema } from 'llm-zoo';
|
|
151
|
+
// or import { ModelConfigSchema } from 'llm-zoo/schemas';
|
|
152
|
+
|
|
153
|
+
// Validate custom model config
|
|
154
|
+
const result = ModelConfigSchema.safeParse(myConfig);
|
|
155
|
+
if (!result.success) {
|
|
156
|
+
console.error(result.error);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Validate API responses
|
|
160
|
+
const validatedModel = ModelConfigSchema.parse(apiResponse);
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Available schemas:
|
|
164
|
+
- `ModelConfigSchema` — Full model configuration
|
|
165
|
+
- `ModelCapabilitiesSchema` — Capability flags
|
|
166
|
+
- `ModelProviderSchema` — Provider enum
|
|
167
|
+
- `ReasoningEffortSchema` — Reasoning levels
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Data Structure
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
interface ModelConfig {
|
|
175
|
+
name: string; // 'sonnet45'
|
|
176
|
+
fullName: string; // 'claude-sonnet-4-5'
|
|
177
|
+
provider: ModelProvider;
|
|
178
|
+
inputPrice: number; // $/1M tokens
|
|
179
|
+
outputPrice: number;
|
|
180
|
+
contextWindow: number;
|
|
181
|
+
maxOutputTokens: number;
|
|
182
|
+
capabilities: ModelCapabilities;
|
|
183
|
+
openRouterOnly: boolean;
|
|
184
|
+
openrouterFullName?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface ModelCapabilities {
|
|
188
|
+
supportsFunctionCalling: boolean;
|
|
189
|
+
supportsVision: boolean;
|
|
190
|
+
supportsReasoning: boolean;
|
|
191
|
+
supportsNativeCodeExecution: boolean;
|
|
192
|
+
supportsNativeWebSearch: boolean;
|
|
193
|
+
supportsPromptCaching: boolean;
|
|
194
|
+
cacheDiscountFactor: number; // 0.1 = 90% savings
|
|
195
|
+
// ... and more
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Use Cases
|
|
202
|
+
|
|
203
|
+
### LLM Router
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import { where, cost } from 'llm-zoo';
|
|
207
|
+
|
|
208
|
+
function route(needs: { vision?: boolean; budget: number; tokens: number }) {
|
|
209
|
+
return where(c => !needs.vision || c.supportsVision)
|
|
210
|
+
.filter(m => cost(m, { input: needs.tokens, output: 4000 }) <= needs.budget)
|
|
211
|
+
.sort((a, b) => a.inputPrice - b.inputPrice)[0];
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Edge Function (Supabase/Vercel)
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
import { lookup, exists, cost } from 'llm-zoo';
|
|
219
|
+
|
|
220
|
+
export async function validateRequest(model: string, tokens: number, tier: string) {
|
|
221
|
+
if (!exists(model)) return { error: 'Unknown model' };
|
|
222
|
+
|
|
223
|
+
const config = lookup(model)!;
|
|
224
|
+
if (tier === 'free' && config.inputPrice > 1) {
|
|
225
|
+
return { error: 'Upgrade for premium models' };
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
allowed: true,
|
|
230
|
+
estimatedCost: cost(model, { input: tokens, output: 4000 })
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Cost Dashboard
|
|
236
|
+
|
|
237
|
+
```typescript
|
|
238
|
+
import { cost, MODEL_CONFIGS } from 'llm-zoo';
|
|
239
|
+
|
|
240
|
+
const report = Object.entries(usage).map(([model, tokens]) => ({
|
|
241
|
+
model,
|
|
242
|
+
spent: cost(model, tokens),
|
|
243
|
+
provider: MODEL_CONFIGS[model]?.provider,
|
|
244
|
+
}));
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Direct Access
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
import { MODEL_CONFIGS, MODELS, ANTHROPIC_MODELS } from 'llm-zoo';
|
|
253
|
+
|
|
254
|
+
MODEL_CONFIGS['sonnet45'].inputPrice;
|
|
255
|
+
MODELS.forEach(name => console.log(name));
|
|
256
|
+
Object.keys(ANTHROPIC_MODELS);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Contributing
|
|
262
|
+
|
|
263
|
+
Found incorrect pricing? Missing capability? New model released? **PRs welcome!**
|
|
264
|
+
|
|
265
|
+
Model data lives in `src/providers/`. Just update the relevant file and submit a PR.
|
|
266
|
+
|
|
267
|
+
## License
|
|
268
|
+
|
|
269
|
+
MIT
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration types and constants for language model interactions and capabilities.
|
|
3
|
+
* This module provides a comprehensive type system for describing LLM capabilities,
|
|
4
|
+
* pricing, and provider-specific configurations.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Default context window size in tokens.
|
|
10
|
+
* Used as fallback when model doesn't specify a custom context window.
|
|
11
|
+
*/
|
|
12
|
+
declare const DEFAULT_CONTEXT_WINDOW = 128000;
|
|
13
|
+
/**
|
|
14
|
+
* Reasoning effort levels for models that support configurable reasoning depth.
|
|
15
|
+
* Higher effort typically results in better reasoning quality but increased latency and cost.
|
|
16
|
+
*/
|
|
17
|
+
declare enum ReasoningEffort {
|
|
18
|
+
/** Extra high reasoning effort - maximum depth analysis */
|
|
19
|
+
XHIGH = "xhigh",
|
|
20
|
+
/** High reasoning effort - thorough analysis */
|
|
21
|
+
HIGH = "high",
|
|
22
|
+
/** Medium reasoning effort - balanced analysis */
|
|
23
|
+
MEDIUM = "medium",
|
|
24
|
+
/** Low reasoning effort - quick analysis */
|
|
25
|
+
LOW = "low",
|
|
26
|
+
/** No explicit reasoning - standard model behavior */
|
|
27
|
+
NONE = "none"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Supported language model providers.
|
|
31
|
+
* Each provider has specific API formats, capabilities, and pricing structures.
|
|
32
|
+
*/
|
|
33
|
+
declare enum ModelProvider {
|
|
34
|
+
/** Anthropic (Claude models) */
|
|
35
|
+
ANTHROPIC = "anthropic",
|
|
36
|
+
/** OpenAI (GPT, o-series models) */
|
|
37
|
+
OPENAI = "openai",
|
|
38
|
+
/** Google (Gemini models) */
|
|
39
|
+
GOOGLE = "google",
|
|
40
|
+
/** DeepSeek (V3, R1 models) */
|
|
41
|
+
DEEPSEEK = "deepseek",
|
|
42
|
+
/** xAI (Grok models) */
|
|
43
|
+
XAI = "xai",
|
|
44
|
+
/** Moonshot AI (Kimi models) */
|
|
45
|
+
MOONSHOT = "moonshot",
|
|
46
|
+
/** Alibaba DashScope (Qwen models) */
|
|
47
|
+
DASHSCOPE = "dashscope",
|
|
48
|
+
/** GitHub Copilot */
|
|
49
|
+
COPILOT = "copilot",
|
|
50
|
+
/** Other providers (OpenRouter-only models, etc.) */
|
|
51
|
+
OTHERS = "others"
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Feature flags defining a model's supported capabilities and behaviors.
|
|
55
|
+
* These capabilities help determine which features can be used with a specific model.
|
|
56
|
+
*/
|
|
57
|
+
interface ModelCapabilities {
|
|
58
|
+
/** Whether the model supports function/tool calling */
|
|
59
|
+
supportsFunctionCalling: boolean;
|
|
60
|
+
/** Whether the model supports native MCP (Model Context Protocol) servers */
|
|
61
|
+
supportsNativeMCPServer: boolean;
|
|
62
|
+
/** Whether the model has built-in web search capability */
|
|
63
|
+
supportsNativeWebSearch: boolean;
|
|
64
|
+
/** Whether the model can execute code natively (e.g., Python sandbox) */
|
|
65
|
+
supportsNativeCodeExecution: boolean;
|
|
66
|
+
/** Whether the model supports explicit prompt caching */
|
|
67
|
+
supportsPromptCaching: boolean;
|
|
68
|
+
/** Whether the model automatically caches prompts without explicit markers */
|
|
69
|
+
supportsAutoPromptCaching: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Cost multiplier for cached tokens (0.0-1.0).
|
|
72
|
+
* Lower values mean greater savings when using cached content.
|
|
73
|
+
* Example: 0.1 means cached tokens cost 10% of normal price.
|
|
74
|
+
*/
|
|
75
|
+
cacheDiscountFactor: number;
|
|
76
|
+
/** Whether the model supports extended reasoning/thinking */
|
|
77
|
+
supportsReasoning: boolean;
|
|
78
|
+
/** Whether reasoning can be interleaved with regular output */
|
|
79
|
+
supportsInterleavedThinking: boolean;
|
|
80
|
+
/** Whether the model supports configurable reasoning effort levels */
|
|
81
|
+
supportsReasoningEffort: boolean;
|
|
82
|
+
/** Default reasoning effort level when reasoning is enabled */
|
|
83
|
+
reasoningEffort: ReasoningEffort;
|
|
84
|
+
/** Whether the model can process images */
|
|
85
|
+
supportsVision: boolean;
|
|
86
|
+
/** Whether the model can process PDF documents natively */
|
|
87
|
+
supportsNativePdf: boolean;
|
|
88
|
+
/** Whether the model can process audio input natively */
|
|
89
|
+
supportsNativeAudio: boolean;
|
|
90
|
+
/** Whether the model supports assistant message prefilling */
|
|
91
|
+
supportsAssistantPrefill: boolean;
|
|
92
|
+
/** Whether the model supports predictive/speculative output */
|
|
93
|
+
supportsPredictiveOutput: boolean;
|
|
94
|
+
/** Whether the model provides accurate token counting */
|
|
95
|
+
supportsTokenCounting: boolean;
|
|
96
|
+
/** Whether the model supports system prompts */
|
|
97
|
+
supportsSystemPrompt: boolean;
|
|
98
|
+
/** Whether the model supports intermediate developer messages */
|
|
99
|
+
supportsIntermDevMsgs: boolean;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Base model capabilities with sensible defaults.
|
|
103
|
+
* Models should spread this and override specific capabilities.
|
|
104
|
+
*/
|
|
105
|
+
declare const DEFAULT_MODEL_CAPABILITIES: ModelCapabilities;
|
|
106
|
+
/**
|
|
107
|
+
* Complete configuration for a language model.
|
|
108
|
+
* Contains all metadata needed to work with the model including
|
|
109
|
+
* pricing, capabilities, and provider-specific settings.
|
|
110
|
+
*/
|
|
111
|
+
interface ModelConfig {
|
|
112
|
+
/**
|
|
113
|
+
* Short identifier for the model (e.g., "sonnet45", "gpt4o").
|
|
114
|
+
* Used as the key in the registry and for quick reference.
|
|
115
|
+
*/
|
|
116
|
+
name: string;
|
|
117
|
+
/**
|
|
118
|
+
* Full API model identifier (e.g., "claude-sonnet-4-5", "gpt-4o-2024-11-20").
|
|
119
|
+
* This is the actual string sent to the provider's API.
|
|
120
|
+
*/
|
|
121
|
+
fullName: string;
|
|
122
|
+
/** The model's provider */
|
|
123
|
+
provider: ModelProvider;
|
|
124
|
+
/** Maximum tokens the model can generate in a single response */
|
|
125
|
+
maxOutputTokens: number;
|
|
126
|
+
/** Cost per million input tokens in USD */
|
|
127
|
+
inputPrice: number;
|
|
128
|
+
/** Cost per million output tokens in USD */
|
|
129
|
+
outputPrice: number;
|
|
130
|
+
/** Maximum context window size in tokens */
|
|
131
|
+
contextWindow: number;
|
|
132
|
+
/** Model capability flags */
|
|
133
|
+
capabilities: ModelCapabilities;
|
|
134
|
+
/**
|
|
135
|
+
* Whether this model is only available through OpenRouter.
|
|
136
|
+
* When true, direct API access is not available.
|
|
137
|
+
*/
|
|
138
|
+
openRouterOnly: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Model identifier for OpenRouter API.
|
|
141
|
+
* Example: "anthropic/claude-sonnet-4.5"
|
|
142
|
+
*/
|
|
143
|
+
openrouterFullName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Custom base URL for this specific model.
|
|
146
|
+
* Overrides the provider's default endpoint.
|
|
147
|
+
*/
|
|
148
|
+
baseUrl?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Whether this model requires OpenAI's Responses API format.
|
|
151
|
+
* Used for special models like deep research that bypass standard chat completions.
|
|
152
|
+
*/
|
|
153
|
+
requiresResponsesAPI?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Anthropic Claude model configurations.
|
|
158
|
+
* Includes Claude 4.x, 3.x Opus, Sonnet, and Haiku variants.
|
|
159
|
+
*/
|
|
160
|
+
declare const ANTHROPIC_MODELS: Record<string, ModelConfig>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* GitHub Copilot model configurations.
|
|
164
|
+
* These models are free-tier and powered by GPT-4o.
|
|
165
|
+
*/
|
|
166
|
+
declare const COPILOT_MODELS: Record<string, ModelConfig>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Alibaba DashScope (Qwen) model configurations.
|
|
170
|
+
* Includes Qwen 3 Max, Plus, and Turbo variants.
|
|
171
|
+
*/
|
|
172
|
+
declare const DASHSCOPE_MODELS: Record<string, ModelConfig>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* DeepSeek model configurations.
|
|
176
|
+
* Includes V3.2, R1, and thinking variants.
|
|
177
|
+
*
|
|
178
|
+
* Model name conventions:
|
|
179
|
+
* - fullName: Model name for native DeepSeek API (e.g., 'deepseek-chat', 'deepseek-reasoner')
|
|
180
|
+
* - openrouterFullName: Model name for OpenRouter API (e.g., 'deepseek/deepseek-v3.2')
|
|
181
|
+
*/
|
|
182
|
+
declare const DEEPSEEK_MODELS: Record<string, ModelConfig>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Google Gemini model configurations.
|
|
186
|
+
* Includes Gemini 3.x and 2.5 Pro/Flash variants.
|
|
187
|
+
*/
|
|
188
|
+
declare const GOOGLE_MODELS: Record<string, ModelConfig>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Moonshot AI (Kimi) model configurations.
|
|
192
|
+
* Includes Kimi K2 and thinking variants.
|
|
193
|
+
*/
|
|
194
|
+
declare const MOONSHOT_MODELS: Record<string, ModelConfig>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* OpenAI deep research model configurations.
|
|
198
|
+
* These models require the Responses API and are optimized for research tasks.
|
|
199
|
+
*/
|
|
200
|
+
declare const OPENAI_DEEP_RESEARCH_MODELS: Record<string, ModelConfig>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* OpenAI GPT model configurations.
|
|
204
|
+
* Includes GPT-4.x, GPT-4o, and GPT-4.5 variants.
|
|
205
|
+
*/
|
|
206
|
+
declare const OPENAI_MODELS: Record<string, ModelConfig>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* OpenAI reasoning model configurations.
|
|
210
|
+
* Includes o1, o3, o4, and GPT-5 reasoning variants.
|
|
211
|
+
*/
|
|
212
|
+
declare const OPENAI_REASONING_MODELS: Record<string, ModelConfig>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Other model configurations (OpenRouter-only models).
|
|
216
|
+
* Includes models that are only available through OpenRouter proxy.
|
|
217
|
+
*/
|
|
218
|
+
declare const OTHER_MODELS: Record<string, ModelConfig>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* xAI Grok model configurations.
|
|
222
|
+
* Includes Grok 4, 3, and 2 variants.
|
|
223
|
+
*/
|
|
224
|
+
declare const XAI_MODELS: Record<string, ModelConfig>;
|
|
225
|
+
|
|
226
|
+
export { ANTHROPIC_MODELS as A, COPILOT_MODELS as C, DEFAULT_MODEL_CAPABILITIES as D, GOOGLE_MODELS as G, type ModelConfig as M, OPENAI_MODELS as O, ReasoningEffort as R, XAI_MODELS as X, ModelProvider as a, type ModelCapabilities as b, DEFAULT_CONTEXT_WINDOW as c, OPENAI_REASONING_MODELS as d, OPENAI_DEEP_RESEARCH_MODELS as e, DEEPSEEK_MODELS as f, MOONSHOT_MODELS as g, DASHSCOPE_MODELS as h, OTHER_MODELS as i };
|