llm-zoo 1.0.1 → 1.0.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.
- package/README.md +4 -5
- package/dist/{index-CQCjbg9k.d.cts → ModelConfig-BlHqDZD6.d.cts} +1 -71
- package/dist/{index-CQCjbg9k.d.ts → ModelConfig-BlHqDZD6.d.ts} +1 -71
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/providers/index.d.cts +73 -1
- package/dist/providers/index.d.ts +73 -1
- package/dist/schemas.cjs +35 -21
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +38 -276
- package/dist/schemas.d.ts +38 -276
- package/dist/schemas.js +35 -21
- package/dist/schemas.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
LLM pricing and capabilities change weekly. Docs are scattered. There's no single source of truth.
|
|
4
4
|
|
|
5
|
-
**One package.
|
|
5
|
+
**One package. 70+ models. Always current.**
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { lookup, cost, cheapest } from 'llm-zoo';
|
|
@@ -142,13 +142,12 @@ const { totalModels, providers, pricing, context } = insights();
|
|
|
142
142
|
|
|
143
143
|
---
|
|
144
144
|
|
|
145
|
-
## Zod Schemas
|
|
145
|
+
## Zod Schemas (v4)
|
|
146
146
|
|
|
147
|
-
Validate model configs at runtime:
|
|
147
|
+
Validate model configs at runtime (requires `zod@^4.0.0`):
|
|
148
148
|
|
|
149
149
|
```typescript
|
|
150
|
-
import { ModelConfigSchema } from 'llm-zoo';
|
|
151
|
-
// or import { ModelConfigSchema } from 'llm-zoo/schemas';
|
|
150
|
+
import { ModelConfigSchema } from 'llm-zoo/schemas';
|
|
152
151
|
|
|
153
152
|
// Validate custom model config
|
|
154
153
|
const result = ModelConfigSchema.safeParse(myConfig);
|
|
@@ -153,74 +153,4 @@ interface ModelConfig {
|
|
|
153
153
|
requiresResponsesAPI?: boolean;
|
|
154
154
|
}
|
|
155
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 };
|
|
156
|
+
export { DEFAULT_MODEL_CAPABILITIES as D, ModelProvider as M, ReasoningEffort as R, type ModelConfig as a, type ModelCapabilities as b, DEFAULT_CONTEXT_WINDOW as c };
|
|
@@ -153,74 +153,4 @@ interface ModelConfig {
|
|
|
153
153
|
requiresResponsesAPI?: boolean;
|
|
154
154
|
}
|
|
155
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 };
|
|
156
|
+
export { DEFAULT_MODEL_CAPABILITIES as D, ModelProvider as M, ReasoningEffort as R, type ModelConfig as a, type ModelCapabilities as b, DEFAULT_CONTEXT_WINDOW as c };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as ModelConfig, M as ModelProvider, b as ModelCapabilities } from './ModelConfig-BlHqDZD6.cjs';
|
|
2
|
+
export { c as DEFAULT_CONTEXT_WINDOW, D as DEFAULT_MODEL_CAPABILITIES, R as ReasoningEffort } from './ModelConfig-BlHqDZD6.cjs';
|
|
3
|
+
export { ANTHROPIC_MODELS, COPILOT_MODELS, DASHSCOPE_MODELS, DEEPSEEK_MODELS, GOOGLE_MODELS, MOONSHOT_MODELS, OPENAI_DEEP_RESEARCH_MODELS, OPENAI_MODELS, OPENAI_REASONING_MODELS, OTHER_MODELS, XAI_MODELS } from './providers/index.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Central registry of all available language model configurations.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as ModelConfig, M as ModelProvider, b as ModelCapabilities } from './ModelConfig-BlHqDZD6.js';
|
|
2
|
+
export { c as DEFAULT_CONTEXT_WINDOW, D as DEFAULT_MODEL_CAPABILITIES, R as ReasoningEffort } from './ModelConfig-BlHqDZD6.js';
|
|
3
|
+
export { ANTHROPIC_MODELS, COPILOT_MODELS, DASHSCOPE_MODELS, DEEPSEEK_MODELS, GOOGLE_MODELS, MOONSHOT_MODELS, OPENAI_DEEP_RESEARCH_MODELS, OPENAI_MODELS, OPENAI_REASONING_MODELS, OTHER_MODELS, XAI_MODELS } from './providers/index.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Central registry of all available language model configurations.
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as ModelConfig } from '../ModelConfig-BlHqDZD6.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Anthropic Claude model configurations.
|
|
5
|
+
* Includes Claude 4.x, 3.x Opus, Sonnet, and Haiku variants.
|
|
6
|
+
*/
|
|
7
|
+
declare const ANTHROPIC_MODELS: Record<string, ModelConfig>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* GitHub Copilot model configurations.
|
|
11
|
+
* These models are free-tier and powered by GPT-4o.
|
|
12
|
+
*/
|
|
13
|
+
declare const COPILOT_MODELS: Record<string, ModelConfig>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Alibaba DashScope (Qwen) model configurations.
|
|
17
|
+
* Includes Qwen 3 Max, Plus, and Turbo variants.
|
|
18
|
+
*/
|
|
19
|
+
declare const DASHSCOPE_MODELS: Record<string, ModelConfig>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* DeepSeek model configurations.
|
|
23
|
+
* Includes V3.2, R1, and thinking variants.
|
|
24
|
+
*
|
|
25
|
+
* Model name conventions:
|
|
26
|
+
* - fullName: Model name for native DeepSeek API (e.g., 'deepseek-chat', 'deepseek-reasoner')
|
|
27
|
+
* - openrouterFullName: Model name for OpenRouter API (e.g., 'deepseek/deepseek-v3.2')
|
|
28
|
+
*/
|
|
29
|
+
declare const DEEPSEEK_MODELS: Record<string, ModelConfig>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Google Gemini model configurations.
|
|
33
|
+
* Includes Gemini 3.x and 2.5 Pro/Flash variants.
|
|
34
|
+
*/
|
|
35
|
+
declare const GOOGLE_MODELS: Record<string, ModelConfig>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Moonshot AI (Kimi) model configurations.
|
|
39
|
+
* Includes Kimi K2 and thinking variants.
|
|
40
|
+
*/
|
|
41
|
+
declare const MOONSHOT_MODELS: Record<string, ModelConfig>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* OpenAI deep research model configurations.
|
|
45
|
+
* These models require the Responses API and are optimized for research tasks.
|
|
46
|
+
*/
|
|
47
|
+
declare const OPENAI_DEEP_RESEARCH_MODELS: Record<string, ModelConfig>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* OpenAI GPT model configurations.
|
|
51
|
+
* Includes GPT-4.x, GPT-4o, and GPT-4.5 variants.
|
|
52
|
+
*/
|
|
53
|
+
declare const OPENAI_MODELS: Record<string, ModelConfig>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* OpenAI reasoning model configurations.
|
|
57
|
+
* Includes o1, o3, o4, and GPT-5 reasoning variants.
|
|
58
|
+
*/
|
|
59
|
+
declare const OPENAI_REASONING_MODELS: Record<string, ModelConfig>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Other model configurations (OpenRouter-only models).
|
|
63
|
+
* Includes models that are only available through OpenRouter proxy.
|
|
64
|
+
*/
|
|
65
|
+
declare const OTHER_MODELS: Record<string, ModelConfig>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* xAI Grok model configurations.
|
|
69
|
+
* Includes Grok 4, 3, and 2 variants.
|
|
70
|
+
*/
|
|
71
|
+
declare const XAI_MODELS: Record<string, ModelConfig>;
|
|
72
|
+
|
|
73
|
+
export { ANTHROPIC_MODELS, COPILOT_MODELS, DASHSCOPE_MODELS, DEEPSEEK_MODELS, GOOGLE_MODELS, MOONSHOT_MODELS, OPENAI_DEEP_RESEARCH_MODELS, OPENAI_MODELS, OPENAI_REASONING_MODELS, OTHER_MODELS, XAI_MODELS };
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as ModelConfig } from '../ModelConfig-BlHqDZD6.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Anthropic Claude model configurations.
|
|
5
|
+
* Includes Claude 4.x, 3.x Opus, Sonnet, and Haiku variants.
|
|
6
|
+
*/
|
|
7
|
+
declare const ANTHROPIC_MODELS: Record<string, ModelConfig>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* GitHub Copilot model configurations.
|
|
11
|
+
* These models are free-tier and powered by GPT-4o.
|
|
12
|
+
*/
|
|
13
|
+
declare const COPILOT_MODELS: Record<string, ModelConfig>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Alibaba DashScope (Qwen) model configurations.
|
|
17
|
+
* Includes Qwen 3 Max, Plus, and Turbo variants.
|
|
18
|
+
*/
|
|
19
|
+
declare const DASHSCOPE_MODELS: Record<string, ModelConfig>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* DeepSeek model configurations.
|
|
23
|
+
* Includes V3.2, R1, and thinking variants.
|
|
24
|
+
*
|
|
25
|
+
* Model name conventions:
|
|
26
|
+
* - fullName: Model name for native DeepSeek API (e.g., 'deepseek-chat', 'deepseek-reasoner')
|
|
27
|
+
* - openrouterFullName: Model name for OpenRouter API (e.g., 'deepseek/deepseek-v3.2')
|
|
28
|
+
*/
|
|
29
|
+
declare const DEEPSEEK_MODELS: Record<string, ModelConfig>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Google Gemini model configurations.
|
|
33
|
+
* Includes Gemini 3.x and 2.5 Pro/Flash variants.
|
|
34
|
+
*/
|
|
35
|
+
declare const GOOGLE_MODELS: Record<string, ModelConfig>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Moonshot AI (Kimi) model configurations.
|
|
39
|
+
* Includes Kimi K2 and thinking variants.
|
|
40
|
+
*/
|
|
41
|
+
declare const MOONSHOT_MODELS: Record<string, ModelConfig>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* OpenAI deep research model configurations.
|
|
45
|
+
* These models require the Responses API and are optimized for research tasks.
|
|
46
|
+
*/
|
|
47
|
+
declare const OPENAI_DEEP_RESEARCH_MODELS: Record<string, ModelConfig>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* OpenAI GPT model configurations.
|
|
51
|
+
* Includes GPT-4.x, GPT-4o, and GPT-4.5 variants.
|
|
52
|
+
*/
|
|
53
|
+
declare const OPENAI_MODELS: Record<string, ModelConfig>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* OpenAI reasoning model configurations.
|
|
57
|
+
* Includes o1, o3, o4, and GPT-5 reasoning variants.
|
|
58
|
+
*/
|
|
59
|
+
declare const OPENAI_REASONING_MODELS: Record<string, ModelConfig>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Other model configurations (OpenRouter-only models).
|
|
63
|
+
* Includes models that are only available through OpenRouter proxy.
|
|
64
|
+
*/
|
|
65
|
+
declare const OTHER_MODELS: Record<string, ModelConfig>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* xAI Grok model configurations.
|
|
69
|
+
* Includes Grok 4, 3, and 2 variants.
|
|
70
|
+
*/
|
|
71
|
+
declare const XAI_MODELS: Record<string, ModelConfig>;
|
|
72
|
+
|
|
73
|
+
export { ANTHROPIC_MODELS, COPILOT_MODELS, DASHSCOPE_MODELS, DEEPSEEK_MODELS, GOOGLE_MODELS, MOONSHOT_MODELS, OPENAI_DEEP_RESEARCH_MODELS, OPENAI_MODELS, OPENAI_REASONING_MODELS, OTHER_MODELS, XAI_MODELS };
|
package/dist/schemas.cjs
CHANGED
|
@@ -3,18 +3,32 @@
|
|
|
3
3
|
var zod = require('zod');
|
|
4
4
|
|
|
5
5
|
// src/schemas.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
]
|
|
6
|
+
|
|
7
|
+
// src/ModelConfig.ts
|
|
8
|
+
var ReasoningEffort = /* @__PURE__ */ ((ReasoningEffort2) => {
|
|
9
|
+
ReasoningEffort2["XHIGH"] = "xhigh";
|
|
10
|
+
ReasoningEffort2["HIGH"] = "high";
|
|
11
|
+
ReasoningEffort2["MEDIUM"] = "medium";
|
|
12
|
+
ReasoningEffort2["LOW"] = "low";
|
|
13
|
+
ReasoningEffort2["NONE"] = "none";
|
|
14
|
+
return ReasoningEffort2;
|
|
15
|
+
})(ReasoningEffort || {});
|
|
16
|
+
var ModelProvider = /* @__PURE__ */ ((ModelProvider2) => {
|
|
17
|
+
ModelProvider2["ANTHROPIC"] = "anthropic";
|
|
18
|
+
ModelProvider2["OPENAI"] = "openai";
|
|
19
|
+
ModelProvider2["GOOGLE"] = "google";
|
|
20
|
+
ModelProvider2["DEEPSEEK"] = "deepseek";
|
|
21
|
+
ModelProvider2["XAI"] = "xai";
|
|
22
|
+
ModelProvider2["MOONSHOT"] = "moonshot";
|
|
23
|
+
ModelProvider2["DASHSCOPE"] = "dashscope";
|
|
24
|
+
ModelProvider2["COPILOT"] = "copilot";
|
|
25
|
+
ModelProvider2["OTHERS"] = "others";
|
|
26
|
+
return ModelProvider2;
|
|
27
|
+
})(ModelProvider || {});
|
|
28
|
+
|
|
29
|
+
// src/schemas.ts
|
|
30
|
+
var ReasoningEffortSchema = zod.z.nativeEnum(ReasoningEffort);
|
|
31
|
+
var ModelProviderSchema = zod.z.nativeEnum(ModelProvider);
|
|
18
32
|
var ModelCapabilitiesSchema = zod.z.object({
|
|
19
33
|
supportsFunctionCalling: zod.z.boolean(),
|
|
20
34
|
supportsNativeMCPServer: zod.z.boolean(),
|
|
@@ -22,32 +36,32 @@ var ModelCapabilitiesSchema = zod.z.object({
|
|
|
22
36
|
supportsNativeCodeExecution: zod.z.boolean(),
|
|
23
37
|
supportsPromptCaching: zod.z.boolean(),
|
|
24
38
|
supportsAutoPromptCaching: zod.z.boolean(),
|
|
25
|
-
cacheDiscountFactor: zod.z.number()
|
|
39
|
+
cacheDiscountFactor: zod.z.number(),
|
|
26
40
|
supportsReasoning: zod.z.boolean(),
|
|
27
41
|
supportsInterleavedThinking: zod.z.boolean(),
|
|
28
|
-
supportsReasoningEffort: zod.z.boolean(),
|
|
29
42
|
reasoningEffort: ReasoningEffortSchema,
|
|
30
43
|
supportsVision: zod.z.boolean(),
|
|
31
44
|
supportsNativePdf: zod.z.boolean(),
|
|
32
|
-
supportsNativeAudio: zod.z.boolean(),
|
|
33
45
|
supportsAssistantPrefill: zod.z.boolean(),
|
|
34
46
|
supportsPredictiveOutput: zod.z.boolean(),
|
|
35
47
|
supportsTokenCounting: zod.z.boolean(),
|
|
36
48
|
supportsSystemPrompt: zod.z.boolean(),
|
|
37
|
-
supportsIntermDevMsgs: zod.z.boolean()
|
|
49
|
+
supportsIntermDevMsgs: zod.z.boolean(),
|
|
50
|
+
supportsReasoningEffort: zod.z.boolean(),
|
|
51
|
+
supportsNativeAudio: zod.z.boolean()
|
|
38
52
|
});
|
|
39
53
|
var ModelConfigSchema = zod.z.object({
|
|
40
54
|
name: zod.z.string(),
|
|
41
55
|
fullName: zod.z.string(),
|
|
42
56
|
provider: ModelProviderSchema,
|
|
43
|
-
maxOutputTokens: zod.z.number()
|
|
44
|
-
inputPrice: zod.z.number()
|
|
45
|
-
outputPrice: zod.z.number()
|
|
46
|
-
contextWindow: zod.z.number()
|
|
57
|
+
maxOutputTokens: zod.z.number(),
|
|
58
|
+
inputPrice: zod.z.number(),
|
|
59
|
+
outputPrice: zod.z.number(),
|
|
60
|
+
contextWindow: zod.z.number(),
|
|
47
61
|
capabilities: ModelCapabilitiesSchema,
|
|
48
62
|
openRouterOnly: zod.z.boolean(),
|
|
49
63
|
openrouterFullName: zod.z.string().optional(),
|
|
50
|
-
baseUrl: zod.z.string().
|
|
64
|
+
baseUrl: zod.z.string().optional(),
|
|
51
65
|
requiresResponsesAPI: zod.z.boolean().optional()
|
|
52
66
|
});
|
|
53
67
|
var ModelRegistrySchema = zod.z.record(zod.z.string(), ModelConfigSchema);
|
package/dist/schemas.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas.ts"],"names":["z"],"mappings":";;;;;AAWO,IAAM,qBAAA,GAAwBA,MAAE,IAAA,CA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OAAA;AAC3B,CAAC;AAMM,IAAM,iBAAA,GAAoBA,MAAE,MAAA,CAAO;AAAA,EACxC,IAAA,EAAMA,MAAE,MAAA,EAAO;AAAA,EACf,QAAA,EAAUA,MAAE,MAAA,EAAO;AAAA,EACnB,QAAA,EAAU,mBAAA;AAAA,EACV,eAAA,EAAiBA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACrC,UAAA,EAAYA,KAAA,CAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA;AAAA,EAC5B,WAAA,EAAaA,KAAA,CAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA;AAAA,EAC7B,aAAA,EAAeA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACnC,YAAA,EAAc,uBAAA;AAAA,EACd,cAAA,EAAgBA,MAAE,OAAA,EAAQ;AAAA,EAC1B,kBAAA,EAAoBA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACxC,SAASA,KAAA,CAAE,MAAA,EAAO,CAAE,GAAA,GAAM,QAAA,EAAS;AAAA,EACnC,oBAAA,EAAsBA,KAAA,CAAE,OAAA,EAAQ,CAAE,QAAA;AACpC,CAAC;AAMM,IAAM,sBAAsBA,KAAA,CAAE,MAAA,CAAOA,KAAA,CAAE,MAAA,IAAU,iBAAiB","file":"schemas.cjs","sourcesContent":["/**\n * Zod schemas for runtime validation of model configurations.\n * @packageDocumentation\n */\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Enums\n// ============================================================================\n\nexport const ReasoningEffortSchema = z.enum(['xhigh', 'high', 'medium', 'low', 'none']);\n\nexport const ModelProviderSchema = z.enum([\n 'anthropic',\n 'openai',\n 'google',\n 'deepseek',\n 'xai',\n 'moonshot',\n 'dashscope',\n 'copilot',\n 'others',\n]);\n\n// ============================================================================\n// Capabilities\n// ============================================================================\n\nexport const ModelCapabilitiesSchema = z.object({\n supportsFunctionCalling: z.boolean(),\n supportsNativeMCPServer: z.boolean(),\n supportsNativeWebSearch: z.boolean(),\n supportsNativeCodeExecution: z.boolean(),\n supportsPromptCaching: z.boolean(),\n supportsAutoPromptCaching: z.boolean(),\n cacheDiscountFactor: z.number().min(0).max(1),\n supportsReasoning: z.boolean(),\n supportsInterleavedThinking: z.boolean(),\n supportsReasoningEffort: z.boolean(),\n reasoningEffort: ReasoningEffortSchema,\n supportsVision: z.boolean(),\n supportsNativePdf: z.boolean(),\n supportsNativeAudio: z.boolean(),\n supportsAssistantPrefill: z.boolean(),\n supportsPredictiveOutput: z.boolean(),\n supportsTokenCounting: z.boolean(),\n supportsSystemPrompt: z.boolean(),\n supportsIntermDevMsgs: z.boolean(),\n});\n\n// ============================================================================\n// Model Config\n// ============================================================================\n\nexport const ModelConfigSchema = z.object({\n name: z.string(),\n fullName: z.string(),\n provider: ModelProviderSchema,\n maxOutputTokens: z.number().positive(),\n inputPrice: z.number().min(0),\n outputPrice: z.number().min(0),\n contextWindow: z.number().positive(),\n capabilities: ModelCapabilitiesSchema,\n openRouterOnly: z.boolean(),\n openrouterFullName: z.string().optional(),\n baseUrl: z.string().url().optional(),\n requiresResponsesAPI: z.boolean().optional(),\n});\n\n// ============================================================================\n// Registry\n// ============================================================================\n\nexport const ModelRegistrySchema = z.record(z.string(), ModelConfigSchema);\n\n// ============================================================================\n// Inferred Types (for reference)\n// ============================================================================\n\nexport type ModelCapabilitiesZ = z.infer<typeof ModelCapabilitiesSchema>;\nexport type ModelConfigZ = z.infer<typeof ModelConfigSchema>;\nexport type ModelRegistryZ = z.infer<typeof ModelRegistrySchema>;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ModelConfig.ts","../src/schemas.ts"],"names":["ReasoningEffort","ModelProvider","z"],"mappings":";;;;;;;AAkBO,IAAK,eAAA,qBAAAA,gBAAAA,KAAL;AAEL,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AAER,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AAEP,EAAAA,iBA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ent":["/**\n * Configuration types and constants for language model interactions and capabilities.\n * This module provides a comprehensive type system for describing LLM capabilities,\n * pricing, and provider-specific configurations.\n *\n * @packageDocumentation\n */\n\n/**\n * Default context window size in tokens.\n * Used as fallback when model doesn't specify a custom context window.\n */\nexport const DEFAULT_CONTEXT_WINDOW = 128000;\n\n/**\n * Reasoning effort levels for models that support configurable reasoning depth.\n * Higher effort typically results in better reasoning quality but increased latency and cost.\n */\nexport enum ReasoningEffort {\n /** Extra high reasoning effort - maximum depth analysis */\n XHIGH = 'xhigh',\n /** High reasoning effort - thorough analysis */\n HIGH = 'high',\n /** Medium reasoning effort - balanced analysis */\n MEDIUM = 'medium',\n /** Low reasoning effort - quick analysis */\n LOW = 'low',\n /** No explicit reasoning - standard model behavior */\n NONE = 'none',\n}\n\n/**\n * Supported language model providers.\n * Each provider has specific API formats, capabilities, and pricing structures.\n */\nexport enum ModelProvider {\n /** Anthropic (Claude models) */\n ANTHROPIC = 'anthropic',\n /** OpenAI (GPT, o-series models) */\n OPENAI = 'openai',\n /** Google (Gemini models) */\n GOOGLE = 'google',\n /** DeepSeek (V3, R1 models) */\n DEEPSEEK = 'deepseek',\n /** xAI (Grok models) */\n XAI = 'xai',\n /** Moonshot AI (Kimi models) */\n MOONSHOT = 'moonshot',\n /** Alibaba DashScope (Qwen models) */\n DASHSCOPE = 'dashscope',\n /** GitHub Copilot */\n COPILOT = 'copilot',\n /** Other providers (OpenRouter-only models, etc.) */\n OTHERS = 'others',\n}\n\n/**\n * Feature flags defining a model's supported capabilities and behaviors.\n * These capabilities help determine which features can be used with a specific model.\n */\nexport interface ModelCapabilities {\n /** Whether the model supports function/tool calling */\n supportsFunctionCalling: boolean;\n\n /** Whether the model supports native MCP (Model Context Protocol) servers */\n supportsNativeMCPServer: boolean;\n\n /** Whether the model has built-in web search capability */\n supportsNativeWebSearch: boolean;\n\n /** Whether the model can execute code natively (e.g., Python sandbox) */\n supportsNativeCodeExecution: boolean;\n\n /** Whether the model supports explicit prompt caching */\n supportsPromptCaching: boolean;\n\n /** Whether the model automatically caches prompts without explicit markers */\n supportsAutoPromptCaching: boolean;\n\n /**\n * Cost multiplier for cached tokens (0.0-1.0).\n * Lower values mean greater savings when using cached content.\n * Example: 0.1 means cached tokens cost 10% of normal price.\n */\n cacheDiscountFactor: number;\n\n /** Whether the model supports extended reasoning/thinking */\n supportsReasoning: boolean;\n\n /** Whether reasoning can be interleaved with regular output */\n supportsInterleavedThinking: boolean;\n\n /** Whether the model supports configurable reasoning effort levels */\n supportsReasoningEffort: boolean;\n\n /** Default reasoning effort level when reasoning is enabled */\n reasoningEffort: ReasoningEffort;\n\n /** Whether the model can process images */\n supportsVision: boolean;\n\n /** Whether the model can process PDF documents natively */\n supportsNativePdf: boolean;\n\n /** Whether the model can process audio input natively */\n supportsNativeAudio: boolean;\n\n /** Whether the model supports assistant message prefilling */\n supportsAssistantPrefill: boolean;\n\n /** Whether the model supports predictive/speculative output */\n supportsPredictiveOutput: boolean;\n\n /** Whether the model provides accurate token counting */\n supportsTokenCounting: boolean;\n\n /** Whether the model supports system prompts */\n supportsSystemPrompt: boolean;\n\n /** Whether the model supports intermediate developer messages */\n supportsIntermDevMsgs: boolean;\n}\n\n/**\n * Base model capabilities with sensible defaults.\n * Models should spread this and override specific capabilities.\n */\nexport const DEFAULT_MODEL_CAPABILITIES: ModelCapabilities = {\n supportsFunctionCalling: true,\n supportsNativeMCPServer: false,\n supportsNativeWebSearch: false,\n supportsNativeCodeExecution: false,\n supportsPromptCaching: false,\n supportsAutoPromptCaching: false,\n cacheDiscountFactor: 1.0,\n supportsReasoning: false,\n supportsInterleavedThinking: false,\n reasoningEffort: ReasoningEffort.NONE,\n supportsVision: true,\n supportsNativePdf: false,\n supportsAssistantPrefill: false,\n supportsPredictiveOutput: false,\n supportsTokenCounting: false,\n supportsSystemPrompt: true,\n supportsIntermDevMsgs: false,\n supportsReasoningEffort: false,\n supportsNativeAudio: false,\n};\n\n/**\n * Complete configuration for a language model.\n * Contains all metadata needed to work with the model including\n * pricing, capabilities, and provider-specific settings.\n */\nexport interface ModelConfig {\n /**\n * Short identifier for the model (e.g., \"sonnet45\", \"gpt4o\").\n * Used as the key in the registry and for quick reference.\n */\n name: string;\n\n /**\n * Full API model identifier (e.g., \"claude-sonnet-4-5\", \"gpt-4o-2024-11-20\").\n * This is the actual string sent to the provider's API.\n */\n fullName: string;\n\n /** The model's provider */\n provider: ModelProvider;\n\n /** Maximum tokens the model can generate in a single response */\n maxOutputTokens: number;\n\n /** Cost per million input tokens in USD */\n inputPrice: number;\n\n /** Cost per million output tokens in USD */\n outputPrice: number;\n\n /** Maximum context window size in tokens */\n contextWindow: number;\n\n /** Model capability flags */\n capabilities: ModelCapabilities;\n\n /**\n * Whether this model is only available through OpenRouter.\n * When true, direct API access is not available.\n */\n openRouterOnly: boolean;\n\n /**\n * Model identifier for OpenRouter API.\n * Example: \"anthropic/claude-sonnet-4.5\"\n */\n openrouterFullName?: string;\n\n /**\n * Custom base URL for this specific model.\n * Overrides the provider's default endpoint.\n */\n baseUrl?: string;\n\n /**\n * Whether this model requires OpenAI's Responses API format.\n * Used for special models like deep research that bypass standard chat completions.\n */\n requiresResponsesAPI?: boolean;\n}\n","/**\n * Zod v4 validation schemas for llm-zoo types.\n * Requires zod ^4.0.0 as peer dependency.\n *\n * @example\n * ```typescript\n * import { ModelConfigSchema } from 'llm-zoo/schemas';\n *\n * const result = ModelConfigSchema.safeParse(myConfig);\n * if (!result.success) {\n * console.error(result.error);\n * }\n * ```\n */\n\nimport { z } from 'zod';\nimport { ModelProvider, ReasoningEffort } from './ModelConfig';\n\n// ============================================================================\n// Zod v4 Schemas\n// ============================================================================\n\nexport const ReasoningEffortSchema = z.nativeEnum(ReasoningEffort);\n\nexport const ModelProviderSchema = z.nativeEnum(ModelProvider);\n\n/** Feature flags defining model's supported capabilities and behaviors. */\nexport const ModelCapabilitiesSchema = z.object({\n supportsFunctionCalling: z.boolean(),\n supportsNativeMCPServer: z.boolean(),\n supportsNativeWebSearch: z.boolean(),\n supportsNativeCodeExecution: z.boolean(),\n supportsPromptCaching: z.boolean(),\n supportsAutoPromptCaching: z.boolean(),\n cacheDiscountFactor: z.number(),\n supportsReasoning: z.boolean(),\n supportsInterleavedThinking: z.boolean(),\n reasoningEffort: ReasoningEffortSchema,\n supportsVision: z.boolean(),\n supportsNativePdf: z.boolean(),\n supportsAssistantPrefill: z.boolean(),\n supportsPredictiveOutput: z.boolean(),\n supportsTokenCounting: z.boolean(),\n supportsSystemPrompt: z.boolean(),\n supportsIntermDevMsgs: z.boolean(),\n supportsReasoningEffort: z.boolean(),\n supportsNativeAudio: z.boolean(),\n});\n\n/** Complete configuration for a language model instance. */\nexport const ModelConfigSchema = z.object({\n name: z.string(),\n fullName: z.string(),\n provider: ModelProviderSchema,\n maxOutputTokens: z.number(),\n inputPrice: z.number(),\n outputPrice: z.number(),\n contextWindow: z.number(),\n capabilities: ModelCapabilitiesSchema,\n openRouterOnly: z.boolean(),\n openrouterFullName: z.string().optional(),\n baseUrl: z.string().optional(),\n requiresResponsesAPI: z.boolean().optional(),\n});\n\n/** Registry of all model configurations. */\nexport const ModelRegistrySchema = z.record(z.string(), ModelConfigSchema);\n\n// Export inferred types for convenience\nexport type ModelCapabilitiesSchemaType = z.infer<typeof ModelCapabilitiesSchema>;\nexport type ModelConfigSchemaType = z.infer<typeof ModelConfigSchema>;\nexport type ModelRegistrySchemaType = z.infer<typeof ModelRegistrySchema>;\n"]}
|