@funkai/models 0.2.1 → 0.3.1
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/.turbo/turbo-build.log +35 -36
- package/CHANGELOG.md +18 -0
- package/dist/alibaba-B6q4Ng1R.mjs.map +1 -1
- package/dist/amazon-bedrock-Cv9AHQBH.mjs.map +1 -1
- package/dist/anthropic-yB7ST97_.mjs.map +1 -1
- package/dist/cerebras-COfl7XM-.mjs.map +1 -1
- package/dist/cohere-B7TgO0hT.mjs.map +1 -1
- package/dist/deepinfra-B0GxUwCG.mjs.map +1 -1
- package/dist/deepseek-D64ZEsvS.mjs.map +1 -1
- package/dist/fireworks-ai-DJYvdAi_.mjs.map +1 -1
- package/dist/google-BypRl349.mjs.map +1 -1
- package/dist/google-vertex-DbS-zTGD.mjs.map +1 -1
- package/dist/groq-ei_PerYi.mjs.map +1 -1
- package/dist/huggingface-DaM1EeLP.mjs.map +1 -1
- package/dist/inception-CspEzqNV.mjs.map +1 -1
- package/dist/index.d.mts +41 -87
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +20 -115
- package/dist/index.mjs.map +1 -1
- package/dist/llama-Cf3-koap.mjs.map +1 -1
- package/dist/mistral-BI9MdAO4.mjs.map +1 -1
- package/dist/nvidia-COHacuoa.mjs.map +1 -1
- package/dist/openai-C0nCfZUq.mjs.map +1 -1
- package/dist/openrouter-DSFzxKQb.mjs.map +1 -1
- package/dist/perplexity-zeZ2WlBU.mjs.map +1 -1
- package/dist/providers/alibaba.d.mts +1 -1
- package/dist/providers/amazon-bedrock.d.mts +1 -1
- package/dist/providers/anthropic.d.mts +1 -1
- package/dist/providers/cerebras.d.mts +1 -1
- package/dist/providers/cohere.d.mts +1 -1
- package/dist/providers/deepinfra.d.mts +1 -1
- package/dist/providers/deepseek.d.mts +1 -1
- package/dist/providers/fireworks-ai.d.mts +1 -1
- package/dist/providers/google-vertex.d.mts +1 -1
- package/dist/providers/google.d.mts +1 -1
- package/dist/providers/groq.d.mts +1 -1
- package/dist/providers/huggingface.d.mts +1 -1
- package/dist/providers/inception.d.mts +1 -1
- package/dist/providers/llama.d.mts +1 -1
- package/dist/providers/mistral.d.mts +1 -1
- package/dist/providers/nvidia.d.mts +1 -1
- package/dist/providers/openai.d.mts +1 -1
- package/dist/providers/openrouter.d.mts +1 -1
- package/dist/providers/perplexity.d.mts +1 -1
- package/dist/providers/togetherai.d.mts +1 -1
- package/dist/providers/xai.d.mts +1 -1
- package/dist/togetherai-BvcxUfPE.mjs.map +1 -1
- package/dist/{types-DjdaZckF.d.mts → types-DIzolT_s.d.mts} +61 -21
- package/dist/types-DIzolT_s.d.mts.map +1 -0
- package/dist/xai-fSuAkQJo.mjs.map +1 -1
- package/package.json +7 -6
- package/scripts/generate-models.ts +152 -83
- package/src/catalog/index.test.ts +8 -20
- package/src/catalog/index.ts +4 -1
- package/src/catalog/providers/alibaba.ts +91 -91
- package/src/catalog/providers/amazon-bedrock.ts +205 -185
- package/src/catalog/providers/anthropic.ts +87 -62
- package/src/catalog/providers/cerebras.ts +9 -9
- package/src/catalog/providers/cohere.ts +16 -16
- package/src/catalog/providers/deepinfra.ts +71 -71
- package/src/catalog/providers/deepseek.ts +3 -3
- package/src/catalog/providers/fireworks-ai.ts +36 -36
- package/src/catalog/providers/google-vertex.ts +62 -62
- package/src/catalog/providers/google.ts +69 -69
- package/src/catalog/providers/groq.ts +24 -24
- package/src/catalog/providers/huggingface.ts +52 -52
- package/src/catalog/providers/inception.ts +9 -9
- package/src/catalog/providers/index.ts +1 -0
- package/src/catalog/providers/llama.ts +7 -7
- package/src/catalog/providers/mistral.ts +60 -60
- package/src/catalog/providers/nvidia.ts +84 -84
- package/src/catalog/providers/openai.ts +115 -115
- package/src/catalog/providers/openrouter.ts +448 -433
- package/src/catalog/providers/perplexity.ts +9 -9
- package/src/catalog/providers/togetherai.ts +47 -47
- package/src/catalog/providers/xai.ts +49 -49
- package/src/catalog/types.ts +60 -20
- package/src/cost/calculate.test.ts +11 -19
- package/src/index.ts +2 -8
- package/src/provider/index.ts +2 -8
- package/src/provider/registry.test.ts +87 -0
- package/src/provider/registry.ts +93 -0
- package/src/provider/types.ts +1 -1
- package/tsconfig.json +2 -1
- package/tsdown.config.ts +7 -4
- package/dist/types-DjdaZckF.d.mts.map +0 -1
- package/src/provider/openrouter.test.ts +0 -125
- package/src/provider/openrouter.ts +0 -110
- package/src/provider/resolver.test.ts +0 -138
- package/src/provider/resolver.ts +0 -125
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { i as ModelPricing, n as ModelDefinition, r as ModelModalities, t as ModelCapabilities } from "./types-
|
|
2
|
-
import {
|
|
1
|
+
import { i as ModelPricing, n as ModelDefinition, r as ModelModalities, t as ModelCapabilities } from "./types-DIzolT_s.mjs";
|
|
2
|
+
import { LanguageModel as LanguageModel$1, createProviderRegistry as createProviderRegistry$1 } from "ai";
|
|
3
3
|
import { LiteralUnion } from "type-fest";
|
|
4
|
-
import { LanguageModel as LanguageModel$1 } from "ai";
|
|
5
4
|
|
|
6
5
|
//#region src/catalog/providers/index.d.ts
|
|
7
6
|
declare const MODELS$1: readonly [{
|
|
@@ -30137,124 +30136,79 @@ interface TokenUsage {
|
|
|
30137
30136
|
readonly reasoningTokens: number;
|
|
30138
30137
|
}
|
|
30139
30138
|
//#endregion
|
|
30140
|
-
//#region src/provider/
|
|
30139
|
+
//#region src/provider/registry.d.ts
|
|
30141
30140
|
/**
|
|
30142
|
-
*
|
|
30141
|
+
* Extract the provider type accepted by the AI SDK's `createProviderRegistry`.
|
|
30143
30142
|
*
|
|
30144
|
-
*
|
|
30145
|
-
* no explicit `apiKey` is provided in the options.
|
|
30146
|
-
*
|
|
30147
|
-
* @param options - Provider settings forwarded to `@openrouter/ai-sdk-provider`.
|
|
30148
|
-
* @returns A configured {@link OpenRouterProvider} instance.
|
|
30149
|
-
*
|
|
30150
|
-
* @example
|
|
30151
|
-
* ```typescript
|
|
30152
|
-
* const openrouter = createOpenRouter({ apiKey: 'sk-...' })
|
|
30153
|
-
* const m = openrouter('openai/gpt-5.2-codex')
|
|
30154
|
-
* ```
|
|
30143
|
+
* @private
|
|
30155
30144
|
*/
|
|
30156
|
-
|
|
30145
|
+
type AIProviders = Parameters<typeof createProviderRegistry$1>[0];
|
|
30157
30146
|
/**
|
|
30158
|
-
*
|
|
30159
|
-
*
|
|
30160
|
-
* Resolves the API key from the environment and returns a ready-to-use
|
|
30161
|
-
* {@link LanguageModel} that can be passed directly to AI SDK functions.
|
|
30162
|
-
*
|
|
30163
|
-
* The provider instance is cached at module scope and reused across
|
|
30164
|
-
* calls. If `OPENROUTER_API_KEY` changes at runtime, the cache is
|
|
30165
|
-
* invalidated and a new provider is created.
|
|
30166
|
-
*
|
|
30167
|
-
* @param modelId - A model identifier (e.g. `"openai/gpt-5.2-codex"`).
|
|
30168
|
-
* @returns A configured {@link LanguageModel} instance.
|
|
30169
|
-
*
|
|
30170
|
-
* @example
|
|
30171
|
-
* ```typescript
|
|
30172
|
-
* const m = openrouter('openai/gpt-5.2-codex')
|
|
30173
|
-
* ```
|
|
30147
|
+
* Configuration for {@link createProviderRegistry}.
|
|
30174
30148
|
*/
|
|
30175
|
-
|
|
30176
|
-
//#endregion
|
|
30177
|
-
//#region src/provider/resolver.d.ts
|
|
30178
|
-
/**
|
|
30179
|
-
* A function that resolves a provider-specific model name to a {@link LanguageModel}.
|
|
30180
|
-
*
|
|
30181
|
-
* @example
|
|
30182
|
-
* ```typescript
|
|
30183
|
-
* import { createOpenAI } from '@ai-sdk/openai'
|
|
30184
|
-
*
|
|
30185
|
-
* const factory: ProviderFactory = createOpenAI({ apiKey: '...' })
|
|
30186
|
-
* const model = factory('gpt-4.1')
|
|
30187
|
-
* ```
|
|
30188
|
-
*/
|
|
30189
|
-
type ProviderFactory = (modelName: string) => LanguageModel;
|
|
30190
|
-
/**
|
|
30191
|
-
* Mapping from provider prefix (e.g. `"openai"`, `"anthropic"`) to a factory
|
|
30192
|
-
* that creates {@link LanguageModel} instances for that provider.
|
|
30193
|
-
*/
|
|
30194
|
-
type ProviderMap = Readonly<Record<string, ProviderFactory>>;
|
|
30195
|
-
/**
|
|
30196
|
-
* Configuration for {@link createModelResolver}.
|
|
30197
|
-
*/
|
|
30198
|
-
interface ModelResolverConfig {
|
|
30149
|
+
interface ProviderRegistryConfig {
|
|
30199
30150
|
/**
|
|
30200
|
-
*
|
|
30151
|
+
* AI SDK provider instances keyed by prefix.
|
|
30201
30152
|
*
|
|
30202
30153
|
* When a model ID like `"openai/gpt-4.1"` is resolved, the prefix
|
|
30203
|
-
* `"openai"` is extracted and looked up in this map.
|
|
30204
|
-
* factory receives the model portion (`"gpt-4.1"`).
|
|
30205
|
-
*/
|
|
30206
|
-
readonly providers?: ProviderMap;
|
|
30207
|
-
/**
|
|
30208
|
-
* A fallback factory used when no mapped provider matches.
|
|
30209
|
-
*
|
|
30210
|
-
* Receives the full model ID string. Useful for routing unmapped
|
|
30211
|
-
* providers through an aggregator like OpenRouter.
|
|
30154
|
+
* `"openai"` is extracted and looked up in this map.
|
|
30212
30155
|
*
|
|
30213
30156
|
* @example
|
|
30214
30157
|
* ```typescript
|
|
30215
|
-
* import {
|
|
30158
|
+
* import { createOpenAI } from '@ai-sdk/openai'
|
|
30159
|
+
* import { anthropic } from '@ai-sdk/anthropic'
|
|
30216
30160
|
*
|
|
30217
|
-
* const
|
|
30218
|
-
* providers: {
|
|
30219
|
-
*
|
|
30161
|
+
* const registry = createProviderRegistry({
|
|
30162
|
+
* providers: {
|
|
30163
|
+
* openai: createOpenAI({ apiKey: '...' }),
|
|
30164
|
+
* anthropic,
|
|
30165
|
+
* },
|
|
30220
30166
|
* })
|
|
30221
30167
|
* ```
|
|
30222
30168
|
*/
|
|
30223
|
-
readonly
|
|
30169
|
+
readonly providers: AIProviders;
|
|
30224
30170
|
}
|
|
30225
30171
|
/**
|
|
30226
30172
|
* A function that resolves a model ID to a {@link LanguageModel} instance.
|
|
30173
|
+
*
|
|
30174
|
+
* @param modelId - Catalog model identifier in `provider/model` format.
|
|
30175
|
+
* @returns The resolved AI SDK {@link LanguageModel}.
|
|
30176
|
+
*
|
|
30177
|
+
* @example
|
|
30178
|
+
* ```typescript
|
|
30179
|
+
* const model = registry("openai/gpt-4.1");
|
|
30180
|
+
* ```
|
|
30227
30181
|
*/
|
|
30228
|
-
type
|
|
30182
|
+
type ProviderRegistry = (modelId: ModelId) => LanguageModel;
|
|
30229
30183
|
/**
|
|
30230
|
-
* Create a
|
|
30184
|
+
* Create a provider registry that resolves `provider/model` string IDs
|
|
30185
|
+
* to AI SDK {@link LanguageModel} instances.
|
|
30231
30186
|
*
|
|
30232
|
-
*
|
|
30233
|
-
*
|
|
30234
|
-
*
|
|
30235
|
-
* 3. Otherwise, the fallback is called with the full ID (if configured)
|
|
30236
|
-
* 4. If no fallback, an error is thrown
|
|
30187
|
+
* Thin wrapper around the AI SDK's `createProviderRegistry` that uses
|
|
30188
|
+
* `/` as the separator instead of `:`, matching the model ID format used
|
|
30189
|
+
* throughout the funkai catalog (e.g. `"openai/gpt-4.1"`).
|
|
30237
30190
|
*
|
|
30238
|
-
* @param config - Provider mappings
|
|
30191
|
+
* @param config - Provider mappings.
|
|
30239
30192
|
* @returns A resolver function that maps model IDs to {@link LanguageModel} instances.
|
|
30240
30193
|
*
|
|
30241
30194
|
* @example
|
|
30242
30195
|
* ```typescript
|
|
30243
30196
|
* import { createOpenAI } from '@ai-sdk/openai'
|
|
30244
|
-
* import {
|
|
30197
|
+
* import { anthropic } from '@ai-sdk/anthropic'
|
|
30198
|
+
* import { createProviderRegistry } from '@funkai/models'
|
|
30245
30199
|
*
|
|
30246
|
-
* const
|
|
30200
|
+
* const registry = createProviderRegistry({
|
|
30247
30201
|
* providers: {
|
|
30248
30202
|
* openai: createOpenAI({ apiKey: '...' }),
|
|
30249
|
-
* anthropic
|
|
30203
|
+
* anthropic,
|
|
30250
30204
|
* },
|
|
30251
30205
|
* })
|
|
30252
30206
|
*
|
|
30253
|
-
* const m1 =
|
|
30254
|
-
* const m2 =
|
|
30207
|
+
* const m1 = registry('openai/gpt-4.1')
|
|
30208
|
+
* const m2 = registry('anthropic/claude-sonnet-4')
|
|
30255
30209
|
* ```
|
|
30256
30210
|
*/
|
|
30257
|
-
declare function
|
|
30211
|
+
declare function createProviderRegistry(config: ProviderRegistryConfig): ProviderRegistry;
|
|
30258
30212
|
//#endregion
|
|
30259
30213
|
//#region src/cost/types.d.ts
|
|
30260
30214
|
/**
|
|
@@ -30310,5 +30264,5 @@ interface UsageCost {
|
|
|
30310
30264
|
*/
|
|
30311
30265
|
declare function calculateCost(usage: TokenUsage, pricing: ModelPricing): UsageCost;
|
|
30312
30266
|
//#endregion
|
|
30313
|
-
export { type KnownModelId, type LanguageModel, MODELS, type ModelCapabilities, type ModelDefinition, type ModelId, type ModelModalities, type ModelPricing, type
|
|
30267
|
+
export { type KnownModelId, type LanguageModel, MODELS, type ModelCapabilities, type ModelDefinition, type ModelId, type ModelModalities, type ModelPricing, type ProviderRegistry, type ProviderRegistryConfig, type TokenUsage, type UsageCost, calculateCost, createProviderRegistry, model, models };
|
|
30314
30268
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/catalog/providers/index.ts","../src/catalog/index.ts","../src/provider/types.ts","../src/provider/openrouter.ts","../src/provider/resolver.ts","../src/cost/types.ts","../src/cost/calculate.ts"],"mappings":";;;;;;cAoCa,QAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,SAAA;;WAGA,UAAA;;WAGA,SAAA;;WAGA,KAAA;AAAA;;;;;;ALaX;;;;;;;;;;;;;;;;;;;;;;;;;;iBMHgB,aAAA,CAAc,KAAA,EAAO,UAAA,EAAY,OAAA,EAAS,YAAA,GAAe,SAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/catalog/providers/index.ts","../src/catalog/index.ts","../src/provider/types.ts","../src/provider/registry.ts","../src/cost/types.ts","../src/cost/calculate.ts"],"mappings":";;;;;cAqCa,QAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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c,UAAA,QAAkB,wBAAA;;;;UAKpB,sBAAA;;;;;;;;;;;;;;;;;;;;WAoBN,SAAA,EAAW,WAAA;AAAA;;;;;;;;;;;;KAcV,gBAAA,IAAoB,OAAA,EAAS,OAAA,KAAY,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BrC,sBAAA,CAAuB,MAAA,EAAQ,sBAAA,GAAyB,gBAAA;;;;;;;;AH1CxE;UI/BiB,SAAA;;WAEN,KAAA;;WAGA,MAAA;;WAGA,SAAA;;WAGA,UAAA;;WAGA,SAAA;;WAGA,KAAA;AAAA;;;;;AJcX;;;;;;;;;;;;;;;;;;;;;;;;;;;iBKJgB,aAAA,CAAc,KAAA,EAAO,UAAA,EAAY,OAAA,EAAS,YAAA,GAAe,SAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { t as OPENROUTER_MODELS } from "./openrouter-DSFzxKQb.mjs";
|
|
|
19
19
|
import { t as PERPLEXITY_MODELS } from "./perplexity-zeZ2WlBU.mjs";
|
|
20
20
|
import { t as TOGETHERAI_MODELS } from "./togetherai-BvcxUfPE.mjs";
|
|
21
21
|
import { t as XAI_MODELS } from "./xai-fSuAkQJo.mjs";
|
|
22
|
-
import {
|
|
22
|
+
import { createProviderRegistry as createProviderRegistry$1 } from "ai";
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/catalog/index.ts
|
|
25
25
|
/**
|
|
@@ -84,139 +84,44 @@ function model(id) {
|
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
86
|
function models(filter) {
|
|
87
|
-
|
|
87
|
+
if (filter) return MODELS.filter(filter);
|
|
88
|
+
return MODELS;
|
|
88
89
|
}
|
|
89
90
|
//#endregion
|
|
90
|
-
//#region src/provider/
|
|
91
|
+
//#region src/provider/registry.ts
|
|
91
92
|
/**
|
|
92
|
-
* Create
|
|
93
|
+
* Create a provider registry that resolves `provider/model` string IDs
|
|
94
|
+
* to AI SDK {@link LanguageModel} instances.
|
|
93
95
|
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
+
* Thin wrapper around the AI SDK's `createProviderRegistry` that uses
|
|
97
|
+
* `/` as the separator instead of `:`, matching the model ID format used
|
|
98
|
+
* throughout the funkai catalog (e.g. `"openai/gpt-4.1"`).
|
|
96
99
|
*
|
|
97
|
-
* @param
|
|
98
|
-
* @returns A configured {@link OpenRouterProvider} instance.
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```typescript
|
|
102
|
-
* const openrouter = createOpenRouter({ apiKey: 'sk-...' })
|
|
103
|
-
* const m = openrouter('openai/gpt-5.2-codex')
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
function createOpenRouter(options) {
|
|
107
|
-
const apiKey = resolveApiKey(options);
|
|
108
|
-
return createOpenRouter$1({
|
|
109
|
-
...options,
|
|
110
|
-
apiKey
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @private
|
|
115
|
-
*/
|
|
116
|
-
function resolveApiKey(options) {
|
|
117
|
-
if (options != null && options.apiKey != null) return options.apiKey;
|
|
118
|
-
return getOpenRouterApiKey();
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Create a cached OpenRouter model resolver.
|
|
122
|
-
*
|
|
123
|
-
* The returned function caches the underlying provider and invalidates
|
|
124
|
-
* when the API key changes at runtime.
|
|
125
|
-
*
|
|
126
|
-
* @returns A function that resolves a model ID to a {@link LanguageModel}.
|
|
127
|
-
*
|
|
128
|
-
* @private
|
|
129
|
-
*/
|
|
130
|
-
function createCachedOpenRouter() {
|
|
131
|
-
const cache = {
|
|
132
|
-
provider: void 0,
|
|
133
|
-
apiKey: void 0
|
|
134
|
-
};
|
|
135
|
-
return (modelId) => {
|
|
136
|
-
const apiKey = getOpenRouterApiKey();
|
|
137
|
-
if (!cache.provider || cache.apiKey !== apiKey) {
|
|
138
|
-
cache.provider = createOpenRouter$1({ apiKey });
|
|
139
|
-
cache.apiKey = apiKey;
|
|
140
|
-
}
|
|
141
|
-
return cache.provider(modelId);
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Shorthand for creating a single OpenRouter language model.
|
|
146
|
-
*
|
|
147
|
-
* Resolves the API key from the environment and returns a ready-to-use
|
|
148
|
-
* {@link LanguageModel} that can be passed directly to AI SDK functions.
|
|
149
|
-
*
|
|
150
|
-
* The provider instance is cached at module scope and reused across
|
|
151
|
-
* calls. If `OPENROUTER_API_KEY` changes at runtime, the cache is
|
|
152
|
-
* invalidated and a new provider is created.
|
|
153
|
-
*
|
|
154
|
-
* @param modelId - A model identifier (e.g. `"openai/gpt-5.2-codex"`).
|
|
155
|
-
* @returns A configured {@link LanguageModel} instance.
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* ```typescript
|
|
159
|
-
* const m = openrouter('openai/gpt-5.2-codex')
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
const openrouter = createCachedOpenRouter();
|
|
163
|
-
/**
|
|
164
|
-
* Read the OpenRouter API key from the environment.
|
|
165
|
-
*
|
|
166
|
-
* @throws {Error} If `OPENROUTER_API_KEY` is not set.
|
|
167
|
-
*
|
|
168
|
-
* @private
|
|
169
|
-
*/
|
|
170
|
-
function getOpenRouterApiKey() {
|
|
171
|
-
const apiKey = process.env.OPENROUTER_API_KEY;
|
|
172
|
-
if (!apiKey) throw new Error("OPENROUTER_API_KEY environment variable is required. Set it in your .env file or environment.");
|
|
173
|
-
return apiKey;
|
|
174
|
-
}
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region src/provider/resolver.ts
|
|
177
|
-
/**
|
|
178
|
-
* Create a model resolver with configurable provider mappings.
|
|
179
|
-
*
|
|
180
|
-
* When a model ID like `"openai/gpt-4.1"` is resolved:
|
|
181
|
-
* 1. The provider prefix (`"openai"`) is extracted
|
|
182
|
-
* 2. If a direct provider is mapped for that prefix, it receives the model portion (`"gpt-4.1"`)
|
|
183
|
-
* 3. Otherwise, the fallback is called with the full ID (if configured)
|
|
184
|
-
* 4. If no fallback, an error is thrown
|
|
185
|
-
*
|
|
186
|
-
* @param config - Provider mappings and fallback configuration.
|
|
100
|
+
* @param config - Provider mappings.
|
|
187
101
|
* @returns A resolver function that maps model IDs to {@link LanguageModel} instances.
|
|
188
102
|
*
|
|
189
103
|
* @example
|
|
190
104
|
* ```typescript
|
|
191
105
|
* import { createOpenAI } from '@ai-sdk/openai'
|
|
192
|
-
* import {
|
|
106
|
+
* import { anthropic } from '@ai-sdk/anthropic'
|
|
107
|
+
* import { createProviderRegistry } from '@funkai/models'
|
|
193
108
|
*
|
|
194
|
-
* const
|
|
109
|
+
* const registry = createProviderRegistry({
|
|
195
110
|
* providers: {
|
|
196
111
|
* openai: createOpenAI({ apiKey: '...' }),
|
|
197
|
-
* anthropic
|
|
112
|
+
* anthropic,
|
|
198
113
|
* },
|
|
199
114
|
* })
|
|
200
115
|
*
|
|
201
|
-
* const m1 =
|
|
202
|
-
* const m2 =
|
|
116
|
+
* const m1 = registry('openai/gpt-4.1')
|
|
117
|
+
* const m2 = registry('anthropic/claude-sonnet-4')
|
|
203
118
|
* ```
|
|
204
119
|
*/
|
|
205
|
-
function
|
|
206
|
-
const
|
|
207
|
-
const fallback = config?.fallback;
|
|
120
|
+
function createProviderRegistry(config) {
|
|
121
|
+
const inner = createProviderRegistry$1(config.providers, { separator: "/" });
|
|
208
122
|
return (modelId) => {
|
|
209
123
|
if (!modelId.trim()) throw new Error("Cannot resolve model: model ID is empty");
|
|
210
|
-
|
|
211
|
-
if (slashIndex === -1) {
|
|
212
|
-
if (fallback) return fallback(modelId);
|
|
213
|
-
throw new Error(`Cannot resolve model "${modelId}": no provider prefix and no fallback configured`);
|
|
214
|
-
}
|
|
215
|
-
const prefix = modelId.slice(0, slashIndex);
|
|
216
|
-
const factory = providers[prefix];
|
|
217
|
-
if (factory) return factory(modelId.slice(slashIndex + 1));
|
|
218
|
-
if (fallback) return fallback(modelId);
|
|
219
|
-
throw new Error(`Cannot resolve model "${modelId}": no provider mapped for "${prefix}" and no fallback configured`);
|
|
124
|
+
return inner.languageModel(modelId);
|
|
220
125
|
};
|
|
221
126
|
}
|
|
222
127
|
//#endregion
|
|
@@ -266,6 +171,6 @@ function calculateCost(usage, pricing) {
|
|
|
266
171
|
};
|
|
267
172
|
}
|
|
268
173
|
//#endregion
|
|
269
|
-
export { MODELS, calculateCost,
|
|
174
|
+
export { MODELS, calculateCost, createProviderRegistry, model, models };
|
|
270
175
|
|
|
271
176
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["MODELS","GENERATED_MODELS","baseCreateOpenRouter"],"sources":["../src/catalog/providers/index.ts","../src/catalog/index.ts","../src/provider/openrouter.ts","../src/provider/resolver.ts","../src/cost/calculate.ts"],"sourcesContent":["// ──────────────────────────────────────────────────────────────\n// ███████╗██╗ ██╗███╗ ██╗██╗ ██╗ █████╗ ██╗\n// ██╔════╝██║ ██║████╗ ██║██║ ██╔╝██╔══██╗██║\n// █████╗ ██║ ██║██╔██╗ ██║█████╔╝ ███████║██║\n// ██╔══╝ ██║ ██║██║╚██╗██║██╔═██╗ ██╔══██║██║\n// ██║ ╚██████╔╝██║ ╚████║██║ ██╗██║ ██║██║\n// ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝\n//\n// AUTO-GENERATED — DO NOT EDIT\n// Source: https://models.dev\n// Update: pnpm --filter=@funkai/models generate:models\n// ──────────────────────────────────────────────────────────────\n\nimport type { ModelDefinition } from \"../types.js\";\nimport { ALIBABA_MODELS } from \"./alibaba.js\";\nimport { AMAZON_BEDROCK_MODELS } from \"./amazon-bedrock.js\";\nimport { ANTHROPIC_MODELS } from \"./anthropic.js\";\nimport { CEREBRAS_MODELS } from \"./cerebras.js\";\nimport { COHERE_MODELS } from \"./cohere.js\";\nimport { DEEPINFRA_MODELS } from \"./deepinfra.js\";\nimport { DEEPSEEK_MODELS } from \"./deepseek.js\";\nimport { FIREWORKS_AI_MODELS } from \"./fireworks-ai.js\";\nimport { GOOGLE_VERTEX_MODELS } from \"./google-vertex.js\";\nimport { GOOGLE_MODELS } from \"./google.js\";\nimport { GROQ_MODELS } from \"./groq.js\";\nimport { HUGGINGFACE_MODELS } from \"./huggingface.js\";\nimport { INCEPTION_MODELS } from \"./inception.js\";\nimport { LLAMA_MODELS } from \"./llama.js\";\nimport { MISTRAL_MODELS } from \"./mistral.js\";\nimport { NVIDIA_MODELS } from \"./nvidia.js\";\nimport { OPENAI_MODELS } from \"./openai.js\";\nimport { OPENROUTER_MODELS } from \"./openrouter.js\";\nimport { PERPLEXITY_MODELS } from \"./perplexity.js\";\nimport { TOGETHERAI_MODELS } from \"./togetherai.js\";\nimport { XAI_MODELS } from \"./xai.js\";\n\nexport const MODELS = [\n ...OPENAI_MODELS,\n ...ANTHROPIC_MODELS,\n ...GOOGLE_MODELS,\n ...GOOGLE_VERTEX_MODELS,\n ...MISTRAL_MODELS,\n ...AMAZON_BEDROCK_MODELS,\n ...GROQ_MODELS,\n ...DEEPSEEK_MODELS,\n ...XAI_MODELS,\n ...COHERE_MODELS,\n ...FIREWORKS_AI_MODELS,\n ...TOGETHERAI_MODELS,\n ...DEEPINFRA_MODELS,\n ...CEREBRAS_MODELS,\n ...PERPLEXITY_MODELS,\n ...OPENROUTER_MODELS,\n ...LLAMA_MODELS,\n ...ALIBABA_MODELS,\n ...NVIDIA_MODELS,\n ...HUGGINGFACE_MODELS,\n ...INCEPTION_MODELS,\n] as const satisfies readonly ModelDefinition[];\n","import type { LiteralUnion } from \"type-fest\";\n\nimport type { ModelCapabilities, ModelDefinition, ModelModalities, ModelPricing } from \"./types.js\";\nimport { MODELS as GENERATED_MODELS } from \"@/catalog/providers/index.js\";\n\nexport type { ModelCapabilities, ModelDefinition, ModelModalities, ModelPricing };\n\n/**\n * Known model identifiers from the generated catalog.\n */\nexport type KnownModelId = (typeof GENERATED_MODELS)[number][\"id\"];\n\n/**\n * A model identifier that suggests known models but accepts any string.\n *\n * Provides autocomplete for cataloged models while allowing arbitrary\n * model IDs for new or custom models not yet in the catalog.\n */\nexport type ModelId = LiteralUnion<KnownModelId, string>;\n\n/**\n * All supported models with pricing and capability data.\n */\nexport const MODELS = GENERATED_MODELS satisfies readonly ModelDefinition[];\n\nconst MODEL_INDEX = new Map<string, ModelDefinition>(MODELS.map((m) => [m.id, m]));\n\n/**\n * Look up a model definition by its identifier.\n *\n * Returns `null` when the ID is not in the catalog — callers should\n * handle missing models gracefully (e.g. custom or newly released models).\n *\n * @param id - The model identifier to look up.\n * @returns The matching model definition, or `null`.\n *\n * @example\n * ```typescript\n * const m = model('gpt-4.1')\n * if (m) {\n * console.log(m.pricing.input)\n * console.log(m.capabilities.reasoning)\n * }\n * ```\n */\nexport function model(id: ModelId): ModelDefinition | null {\n return MODEL_INDEX.get(id) ?? null;\n}\n\n/**\n * Return supported model definitions, optionally filtered.\n *\n * @param filter - Optional predicate to filter models.\n * @returns A readonly array of matching model definitions.\n *\n * @example\n * ```typescript\n * const all = models()\n * const reasoning = models((m) => m.capabilities.reasoning)\n * const vision = models((m) => m.modalities.input.includes('image'))\n * ```\n */\nexport function models(filter?: (m: ModelDefinition) => boolean): readonly ModelDefinition[] {\n return filter ? MODELS.filter(filter) : MODELS;\n}\n","import {\n createOpenRouter as baseCreateOpenRouter,\n type OpenRouterProvider,\n type OpenRouterProviderSettings,\n} from \"@openrouter/ai-sdk-provider\";\n\nimport type { ModelId } from \"@/catalog/index.js\";\nimport type { LanguageModel } from \"@/provider/types.js\";\n\n/**\n * Create an OpenRouter provider instance with automatic API key resolution.\n *\n * Falls back to the `OPENROUTER_API_KEY` environment variable when\n * no explicit `apiKey` is provided in the options.\n *\n * @param options - Provider settings forwarded to `@openrouter/ai-sdk-provider`.\n * @returns A configured {@link OpenRouterProvider} instance.\n *\n * @example\n * ```typescript\n * const openrouter = createOpenRouter({ apiKey: 'sk-...' })\n * const m = openrouter('openai/gpt-5.2-codex')\n * ```\n */\nexport function createOpenRouter(options?: OpenRouterProviderSettings): OpenRouterProvider {\n const apiKey = resolveApiKey(options);\n return baseCreateOpenRouter({\n ...options,\n apiKey,\n });\n}\n\n// ---------------------------------------------------------------------------\n// Private helpers\n// ---------------------------------------------------------------------------\n\n/**\n * @private\n */\nfunction resolveApiKey(options: OpenRouterProviderSettings | undefined): string {\n if (options != null && options.apiKey != null) {\n return options.apiKey;\n }\n return getOpenRouterApiKey();\n}\n\n/**\n * Create a cached OpenRouter model resolver.\n *\n * The returned function caches the underlying provider and invalidates\n * when the API key changes at runtime.\n *\n * @returns A function that resolves a model ID to a {@link LanguageModel}.\n *\n * @private\n */\n// Cache mutation is safe: JS is single-threaded and baseCreateOpenRouter is synchronous.\n// If this were refactored to async initialization, a lock or re-architecture would be needed.\nfunction createCachedOpenRouter(): (modelId: ModelId) => LanguageModel {\n const cache: { provider: OpenRouterProvider | undefined; apiKey: string | undefined } = {\n provider: undefined,\n apiKey: undefined,\n };\n return (modelId: ModelId): LanguageModel => {\n const apiKey = getOpenRouterApiKey();\n if (!cache.provider || cache.apiKey !== apiKey) {\n cache.provider = baseCreateOpenRouter({ apiKey });\n cache.apiKey = apiKey;\n }\n return cache.provider(modelId);\n };\n}\n\n/**\n * Shorthand for creating a single OpenRouter language model.\n *\n * Resolves the API key from the environment and returns a ready-to-use\n * {@link LanguageModel} that can be passed directly to AI SDK functions.\n *\n * The provider instance is cached at module scope and reused across\n * calls. If `OPENROUTER_API_KEY` changes at runtime, the cache is\n * invalidated and a new provider is created.\n *\n * @param modelId - A model identifier (e.g. `\"openai/gpt-5.2-codex\"`).\n * @returns A configured {@link LanguageModel} instance.\n *\n * @example\n * ```typescript\n * const m = openrouter('openai/gpt-5.2-codex')\n * ```\n */\nexport const openrouter: (modelId: ModelId) => LanguageModel = createCachedOpenRouter();\n\n/**\n * Read the OpenRouter API key from the environment.\n *\n * @throws {Error} If `OPENROUTER_API_KEY` is not set.\n *\n * @private\n */\nfunction getOpenRouterApiKey(): string {\n const apiKey = process.env.OPENROUTER_API_KEY;\n if (!apiKey) {\n throw new Error(\n \"OPENROUTER_API_KEY environment variable is required. \" +\n \"Set it in your .env file or environment.\",\n );\n }\n return apiKey;\n}\n","import type { ModelId } from \"@/catalog/index.js\";\nimport type { LanguageModel } from \"@/provider/types.js\";\n\n/**\n * A function that resolves a provider-specific model name to a {@link LanguageModel}.\n *\n * @example\n * ```typescript\n * import { createOpenAI } from '@ai-sdk/openai'\n *\n * const factory: ProviderFactory = createOpenAI({ apiKey: '...' })\n * const model = factory('gpt-4.1')\n * ```\n */\nexport type ProviderFactory = (modelName: string) => LanguageModel;\n\n/**\n * Mapping from provider prefix (e.g. `\"openai\"`, `\"anthropic\"`) to a factory\n * that creates {@link LanguageModel} instances for that provider.\n */\nexport type ProviderMap = Readonly<Record<string, ProviderFactory>>;\n\n/**\n * Configuration for {@link createModelResolver}.\n */\nexport interface ModelResolverConfig {\n /**\n * Direct AI SDK provider mappings by prefix.\n *\n * When a model ID like `\"openai/gpt-4.1\"` is resolved, the prefix\n * `\"openai\"` is extracted and looked up in this map. If found, the\n * factory receives the model portion (`\"gpt-4.1\"`).\n */\n readonly providers?: ProviderMap;\n\n /**\n * A fallback factory used when no mapped provider matches.\n *\n * Receives the full model ID string. Useful for routing unmapped\n * providers through an aggregator like OpenRouter.\n *\n * @example\n * ```typescript\n * import { openrouter } from '@funkai/models'\n *\n * const resolve = createModelResolver({\n * providers: { openai: createOpenAI({ apiKey: '...' }) },\n * fallback: openrouter,\n * })\n * ```\n */\n readonly fallback?: (modelId: string) => LanguageModel;\n}\n\n/**\n * A function that resolves a model ID to a {@link LanguageModel} instance.\n */\nexport type ModelResolver = (modelId: ModelId) => LanguageModel;\n\n/**\n * Create a model resolver with configurable provider mappings.\n *\n * When a model ID like `\"openai/gpt-4.1\"` is resolved:\n * 1. The provider prefix (`\"openai\"`) is extracted\n * 2. If a direct provider is mapped for that prefix, it receives the model portion (`\"gpt-4.1\"`)\n * 3. Otherwise, the fallback is called with the full ID (if configured)\n * 4. If no fallback, an error is thrown\n *\n * @param config - Provider mappings and fallback configuration.\n * @returns A resolver function that maps model IDs to {@link LanguageModel} instances.\n *\n * @example\n * ```typescript\n * import { createOpenAI } from '@ai-sdk/openai'\n * import { createAnthropic } from '@ai-sdk/anthropic'\n *\n * const resolve = createModelResolver({\n * providers: {\n * openai: createOpenAI({ apiKey: '...' }),\n * anthropic: createAnthropic({ apiKey: '...' }),\n * },\n * })\n *\n * const m1 = resolve('openai/gpt-4.1') // uses @ai-sdk/openai directly\n * const m2 = resolve('anthropic/claude-sonnet-4') // uses @ai-sdk/anthropic directly\n * ```\n */\nexport function createModelResolver(config?: ModelResolverConfig): ModelResolver {\n const providers = config?.providers ?? {};\n const fallback = config?.fallback;\n\n return (modelId: ModelId): LanguageModel => {\n if (!modelId.trim()) {\n throw new Error(\"Cannot resolve model: model ID is empty\");\n }\n\n const slashIndex = modelId.indexOf(\"/\");\n\n if (slashIndex === -1) {\n if (fallback) {\n return fallback(modelId);\n }\n throw new Error(\n `Cannot resolve model \"${modelId}\": no provider prefix and no fallback configured`,\n );\n }\n\n const prefix = modelId.slice(0, slashIndex);\n // eslint-disable-next-line security/detect-object-injection -- Prefix extracted from user model ID, used as record key lookup\n const factory = providers[prefix];\n\n if (factory) {\n const modelName = modelId.slice(slashIndex + 1);\n return factory(modelName);\n }\n\n if (fallback) {\n return fallback(modelId);\n }\n\n throw new Error(\n `Cannot resolve model \"${modelId}\": no provider mapped for \"${prefix}\" and no fallback configured`,\n );\n };\n}\n","import type { UsageCost } from \"./types.js\";\nimport type { ModelPricing } from \"@/catalog/types.js\";\nimport type { TokenUsage } from \"@/provider/types.js\";\n\n/**\n * Calculate the dollar cost from token usage and model pricing.\n *\n * Multiplies each token count by the corresponding per-token pricing rate.\n * Optional pricing fields (cache) default to `0` when absent.\n *\n * @param usage - Token counts from a model invocation.\n * @param pricing - Per-token pricing rates for the model.\n * @returns A {@link UsageCost} with per-field and total costs in USD.\n *\n * @example\n * ```typescript\n * import { calculateCost, model } from '@funkai/models'\n *\n * const usage: TokenUsage = {\n * inputTokens: 1000,\n * outputTokens: 500,\n * totalTokens: 1500,\n * cacheReadTokens: 200,\n * cacheWriteTokens: 0,\n * reasoningTokens: 0,\n * }\n * const m = model('gpt-4.1')\n * if (m) {\n * const cost = calculateCost(usage, m.pricing)\n * console.log(cost.total) // 0.006\n * }\n * ```\n */\nexport function calculateCost(usage: TokenUsage, pricing: ModelPricing): UsageCost {\n const input = usage.inputTokens * pricing.input;\n const output = usage.outputTokens * pricing.output;\n const cacheRead = usage.cacheReadTokens * (pricing.cacheRead ?? 0);\n const cacheWrite = usage.cacheWriteTokens * (pricing.cacheWrite ?? 0);\n const reasoning = usage.reasoningTokens * (pricing.reasoning ?? 0);\n const total = input + output + cacheRead + cacheWrite + reasoning;\n\n return { input, output, cacheRead, cacheWrite, reasoning, total };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ACuBA,MAAa,SDaS;CACpB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;ACjCD,MAAM,cAAc,IAAI,IAA6B,OAAO,KAAK,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;AAoBlF,SAAgB,MAAM,IAAqC;AACzD,QAAO,YAAY,IAAI,GAAG,IAAI;;;;;;;;;;;;;;;AAgBhC,SAAgB,OAAO,QAAsE;AAC3F,QAAO,SAAS,OAAO,OAAO,OAAO,GAAG;;;;;;;;;;;;;;;;;;;ACvC1C,SAAgB,iBAAi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B,QAAQ,6BAA6B,OAAO,8BACtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzFL,SAAgB,cAAc,OAAmB,SAAkC;CACjF,MAAM,QAAQ,MAAM,cAAc,QAAQ;CAC1C,MAAM,SAAS,MAAM,eAAe,QAAQ;CAC5C,MAAM,YAAY,MAAM,mBAAmB,QAAQ,aAAa;CAChE,MAAM,aAAa,MAAM,oBAAoB,QAAQ,cAAc;CACnE,MAAM,YAAY,MAAM,mBAAmB,QAAQ,aAAa;AAGhE,QAAO;EAAE;EAAO;EAAQ;EAAW;EAAY;EAAW,OAF5C,QAAQ,SAAS,YAAY,aAAa;EAES"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["MODELS","GENERATED_MODELS","baseCreateProviderRegistry"],"sources":["../src/catalog/providers/index.ts","../src/catalog/index.ts","../src/provider/registry.ts","../src/cost/calculate.ts"],"sourcesContent":["// ──────────────────────────────────────────────────────────────\n// ███████╗██╗ ██╗███╗ ██╗██╗ ██╗ █████╗ ██╗\n// ██╔════╝██║ ██║████╗ ██║██║ ██╔╝██╔══██╗██║\n// █████╗ ██║ ██║██╔██╗ ██║█████╔╝ ███████║██║\n// ██╔══╝ ██║ ██║██║╚██╗██║██╔═██╗ ██╔══██║██║\n// ██║ ╚██████╔╝██║ ╚████║██║ ██╗██║ ██║██║\n// ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝\n//\n// AUTO-GENERATED — DO NOT EDIT\n// Source: https://models.dev\n// Update: pnpm --filter=@funkai/models generate:models\n// ──────────────────────────────────────────────────────────────\n\n// oxlint-disable eslint-plugin-import/max-dependencies\nimport type { ModelDefinition } from \"../types.js\";\nimport { ALIBABA_MODELS } from \"./alibaba.js\";\nimport { AMAZON_BEDROCK_MODELS } from \"./amazon-bedrock.js\";\nimport { ANTHROPIC_MODELS } from \"./anthropic.js\";\nimport { CEREBRAS_MODELS } from \"./cerebras.js\";\nimport { COHERE_MODELS } from \"./cohere.js\";\nimport { DEEPINFRA_MODELS } from \"./deepinfra.js\";\nimport { DEEPSEEK_MODELS } from \"./deepseek.js\";\nimport { FIREWORKS_AI_MODELS } from \"./fireworks-ai.js\";\nimport { GOOGLE_VERTEX_MODELS } from \"./google-vertex.js\";\nimport { GOOGLE_MODELS } from \"./google.js\";\nimport { GROQ_MODELS } from \"./groq.js\";\nimport { HUGGINGFACE_MODELS } from \"./huggingface.js\";\nimport { INCEPTION_MODELS } from \"./inception.js\";\nimport { LLAMA_MODELS } from \"./llama.js\";\nimport { MISTRAL_MODELS } from \"./mistral.js\";\nimport { NVIDIA_MODELS } from \"./nvidia.js\";\nimport { OPENAI_MODELS } from \"./openai.js\";\nimport { OPENROUTER_MODELS } from \"./openrouter.js\";\nimport { PERPLEXITY_MODELS } from \"./perplexity.js\";\nimport { TOGETHERAI_MODELS } from \"./togetherai.js\";\nimport { XAI_MODELS } from \"./xai.js\";\n\nexport const MODELS = [\n ...OPENAI_MODELS,\n ...ANTHROPIC_MODELS,\n ...GOOGLE_MODELS,\n ...GOOGLE_VERTEX_MODELS,\n ...MISTRAL_MODELS,\n ...AMAZON_BEDROCK_MODELS,\n ...GROQ_MODELS,\n ...DEEPSEEK_MODELS,\n ...XAI_MODELS,\n ...COHERE_MODELS,\n ...FIREWORKS_AI_MODELS,\n ...TOGETHERAI_MODELS,\n ...DEEPINFRA_MODELS,\n ...CEREBRAS_MODELS,\n ...PERPLEXITY_MODELS,\n ...OPENROUTER_MODELS,\n ...LLAMA_MODELS,\n ...ALIBABA_MODELS,\n ...NVIDIA_MODELS,\n ...HUGGINGFACE_MODELS,\n ...INCEPTION_MODELS,\n] as const satisfies readonly ModelDefinition[];\n","import type { LiteralUnion } from \"type-fest\";\n\nimport type { ModelCapabilities, ModelDefinition, ModelModalities, ModelPricing } from \"./types.js\";\nimport { MODELS as GENERATED_MODELS } from \"@/catalog/providers/index.js\";\n\nexport type { ModelCapabilities, ModelDefinition, ModelModalities, ModelPricing };\n\n/**\n * Known model identifiers from the generated catalog.\n */\nexport type KnownModelId = (typeof GENERATED_MODELS)[number][\"id\"];\n\n/**\n * A model identifier that suggests known models but accepts any string.\n *\n * Provides autocomplete for cataloged models while allowing arbitrary\n * model IDs for new or custom models not yet in the catalog.\n */\nexport type ModelId = LiteralUnion<KnownModelId, string>;\n\n/**\n * All supported models with pricing and capability data.\n */\nexport const MODELS = GENERATED_MODELS satisfies readonly ModelDefinition[];\n\nconst MODEL_INDEX = new Map<string, ModelDefinition>(MODELS.map((m) => [m.id, m]));\n\n/**\n * Look up a model definition by its identifier.\n *\n * Returns `null` when the ID is not in the catalog — callers should\n * handle missing models gracefully (e.g. custom or newly released models).\n *\n * @param id - The model identifier to look up.\n * @returns The matching model definition, or `null`.\n *\n * @example\n * ```typescript\n * const m = model('gpt-4.1')\n * if (m) {\n * console.log(m.pricing.input)\n * console.log(m.capabilities.reasoning)\n * }\n * ```\n */\nexport function model(id: ModelId): ModelDefinition | null {\n return MODEL_INDEX.get(id) ?? null;\n}\n\n/**\n * Return supported model definitions, optionally filtered.\n *\n * @param filter - Optional predicate to filter models.\n * @returns A readonly array of matching model definitions.\n *\n * @example\n * ```typescript\n * const all = models()\n * const reasoning = models((m) => m.capabilities.reasoning)\n * const vision = models((m) => m.modalities.input.includes('image'))\n * ```\n */\nexport function models(filter?: (m: ModelDefinition) => boolean): readonly ModelDefinition[] {\n if (filter) {\n return MODELS.filter(filter);\n }\n return MODELS;\n}\n","import { createProviderRegistry as baseCreateProviderRegistry } from \"ai\";\n\nimport type { ModelId } from \"@/catalog/index.js\";\nimport type { LanguageModel } from \"@/provider/types.js\";\n\n/**\n * Extract the provider type accepted by the AI SDK's `createProviderRegistry`.\n *\n * @private\n */\ntype AIProviders = Parameters<typeof baseCreateProviderRegistry>[0];\n\n/**\n * Configuration for {@link createProviderRegistry}.\n */\nexport interface ProviderRegistryConfig {\n /**\n * AI SDK provider instances keyed by prefix.\n *\n * When a model ID like `\"openai/gpt-4.1\"` is resolved, the prefix\n * `\"openai\"` is extracted and looked up in this map.\n *\n * @example\n * ```typescript\n * import { createOpenAI } from '@ai-sdk/openai'\n * import { anthropic } from '@ai-sdk/anthropic'\n *\n * const registry = createProviderRegistry({\n * providers: {\n * openai: createOpenAI({ apiKey: '...' }),\n * anthropic,\n * },\n * })\n * ```\n */\n readonly providers: AIProviders;\n}\n\n/**\n * A function that resolves a model ID to a {@link LanguageModel} instance.\n *\n * @param modelId - Catalog model identifier in `provider/model` format.\n * @returns The resolved AI SDK {@link LanguageModel}.\n *\n * @example\n * ```typescript\n * const model = registry(\"openai/gpt-4.1\");\n * ```\n */\nexport type ProviderRegistry = (modelId: ModelId) => LanguageModel;\n\n/**\n * Create a provider registry that resolves `provider/model` string IDs\n * to AI SDK {@link LanguageModel} instances.\n *\n * Thin wrapper around the AI SDK's `createProviderRegistry` that uses\n * `/` as the separator instead of `:`, matching the model ID format used\n * throughout the funkai catalog (e.g. `\"openai/gpt-4.1\"`).\n *\n * @param config - Provider mappings.\n * @returns A resolver function that maps model IDs to {@link LanguageModel} instances.\n *\n * @example\n * ```typescript\n * import { createOpenAI } from '@ai-sdk/openai'\n * import { anthropic } from '@ai-sdk/anthropic'\n * import { createProviderRegistry } from '@funkai/models'\n *\n * const registry = createProviderRegistry({\n * providers: {\n * openai: createOpenAI({ apiKey: '...' }),\n * anthropic,\n * },\n * })\n *\n * const m1 = registry('openai/gpt-4.1')\n * const m2 = registry('anthropic/claude-sonnet-4')\n * ```\n */\nexport function createProviderRegistry(config: ProviderRegistryConfig): ProviderRegistry {\n const inner = baseCreateProviderRegistry(config.providers, {\n separator: \"/\",\n });\n\n return (modelId: ModelId): LanguageModel => {\n if (!modelId.trim()) {\n throw new Error(\"Cannot resolve model: model ID is empty\");\n }\n // Cast needed: AI SDK overloads expect `provider/model` template literal,\n // But our ModelId is a branded string union. The runtime validates the format.\n return inner.languageModel(modelId as `${string}/${string}`) as LanguageModel;\n };\n}\n","import type { UsageCost } from \"./types.js\";\nimport type { ModelPricing } from \"@/catalog/types.js\";\nimport type { TokenUsage } from \"@/provider/types.js\";\n\n/**\n * Calculate the dollar cost from token usage and model pricing.\n *\n * Multiplies each token count by the corresponding per-token pricing rate.\n * Optional pricing fields (cache) default to `0` when absent.\n *\n * @param usage - Token counts from a model invocation.\n * @param pricing - Per-token pricing rates for the model.\n * @returns A {@link UsageCost} with per-field and total costs in USD.\n *\n * @example\n * ```typescript\n * import { calculateCost, model } from '@funkai/models'\n *\n * const usage: TokenUsage = {\n * inputTokens: 1000,\n * outputTokens: 500,\n * totalTokens: 1500,\n * cacheReadTokens: 200,\n * cacheWriteTokens: 0,\n * reasoningTokens: 0,\n * }\n * const m = model('gpt-4.1')\n * if (m) {\n * const cost = calculateCost(usage, m.pricing)\n * console.log(cost.total) // 0.006\n * }\n * ```\n */\nexport function calculateCost(usage: TokenUsage, pricing: ModelPricing): UsageCost {\n const input = usage.inputTokens * pricing.input;\n const output = usage.outputTokens * pricing.output;\n const cacheRead = usage.cacheReadTokens * (pricing.cacheRead ?? 0);\n const cacheWrite = usage.cacheWriteTokens * (pricing.cacheWrite ?? 0);\n const reasoning = usage.reasoningTokens * (pricing.reasoning ?? 0);\n const total = input + output + cacheRead + cacheWrite + reasoning;\n\n return { input, output, cacheRead, cacheWrite, reasoning, total };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ACuBA,MAAa,SDcS;CACpB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AClCD,MAAM,cAAc,IAAI,IAA6B,OAAO,KAAK,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;AAoBlF,SAAgB,MAAM,IAAqC;AACzD,QAAO,YAAY,IAAI,GAAG,IAAI;;;;;;;;;;;;;;;AAgBhC,SAAgB,OAAO,QAAsE;AAC3F,KAAI,OACF,QAAO,OAAO,OAAO,OAAO;AAE9B,QAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACaT,SAAgB,uBAAuB,QAAkD;CACvF,MAAM,QAAQE,yBAA2B,OAAO,WAAW,EACzD,WAAW,KACZ,CAAC;AAEF,SAAQ,YAAoC;AAC1C,MAAI,CAAC,QAAQ,MAAM,CACjB,OAAM,IAAI,MAAM,0CAA0C;AAI5D,SAAO,MAAM,cAAc,QAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzDhE,SAAgB,cAAc,OAAmB,SAAkC;CACjF,MAAM,QAAQ,MAAM,cAAc,QAAQ;CAC1C,MAAM,SAAS,MAAM,eAAe,QAAQ;CAC5C,MAAM,YAAY,MAAM,mBAAmB,QAAQ,aAAa;CAChE,MAAM,aAAa,MAAM,oBAAoB,QAAQ,cAAc;CACnE,MAAM,YAAY,MAAM,mBAAmB,QAAQ,aAAa;AAGhE,QAAO;EAAE;EAAO;EAAQ;EAAW;EAAY;EAAW,OAF5C,QAAQ,SAAS,YAAY,aAAa;EAES"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llama-Cf3-koap.mjs","names":[],"sources":["../src/catalog/providers/llama.ts"],"sourcesContent":["// ──────────────────────────────────────────────────────────────\n// ███████╗██╗ ██╗███╗ ██╗██╗ ██╗ █████╗ ██╗\n// ██╔════╝██║ ██║████╗ ██║██║ ██╔╝██╔══██╗██║\n// █████╗ ██║ ██║██╔██╗ ██║█████╔╝ ███████║██║\n// ██╔══╝ ██║ ██║██║╚██╗██║██╔═██╗ ██╔══██║██║\n// ██║ ╚██████╔╝██║ ╚████║██║ ██╗██║ ██║██║\n// ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝\n//\n// AUTO-GENERATED — DO NOT EDIT\n// Source: https://models.dev\n// Update: pnpm --filter=@funkai/models generate:models\n// ──────────────────────────────────────────────────────────────\n\nimport type { ModelDefinition } from \"../types.js\";\n\nexport const LLAMA_MODELS = [\n {\n id: \"cerebras-llama-4-maverick-17b-128e-instruct\",\n name: \"Cerebras-Llama-4-Maverick-17B-128E-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow:
|
|
1
|
+
{"version":3,"file":"llama-Cf3-koap.mjs","names":[],"sources":["../src/catalog/providers/llama.ts"],"sourcesContent":["// ──────────────────────────────────────────────────────────────\n// ███████╗██╗ ██╗███╗ ██╗██╗ ██╗ █████╗ ██╗\n// ██╔════╝██║ ██║████╗ ██║██║ ██╔╝██╔══██╗██║\n// █████╗ ██║ ██║██╔██╗ ██║█████╔╝ ███████║██║\n// ██╔══╝ ██║ ██║██║╚██╗██║██╔═██╗ ██╔══██║██║\n// ██║ ╚██████╔╝██║ ╚████║██║ ██╗██║ ██║██║\n// ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝\n//\n// AUTO-GENERATED — DO NOT EDIT\n// Source: https://models.dev\n// Update: pnpm --filter=@funkai/models generate:models\n// ──────────────────────────────────────────────────────────────\n\nimport type { ModelDefinition } from \"../types.js\";\n\nexport const LLAMA_MODELS = [\n {\n id: \"cerebras-llama-4-maverick-17b-128e-instruct\",\n name: \"Cerebras-Llama-4-Maverick-17B-128E-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"llama-4-scout-17b-16e-instruct-fp8\",\n name: \"Llama-4-Scout-17B-16E-Instruct-FP8\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\", \"image\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"llama-3.3-8b-instruct\",\n name: \"Llama-3.3-8B-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"groq-llama-4-maverick-17b-128e-instruct\",\n name: \"Groq-Llama-4-Maverick-17B-128E-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"llama-3.3-70b-instruct\",\n name: \"Llama-3.3-70B-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"cerebras-llama-4-scout-17b-16e-instruct\",\n name: \"Cerebras-Llama-4-Scout-17B-16E-Instruct\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true, structuredOutput: false },\n },\n {\n id: \"llama-4-maverick-17b-128e-instruct-fp8\",\n name: \"Llama-4-Maverick-17B-128E-Instruct-FP8\",\n provider: \"llama\",\n family: \"llama\",\n pricing: { input: 0, output: 0 },\n contextWindow: 128_000,\n maxOutput: 4096,\n modalities: { input: [\"text\", \"image\"], output: [\"text\"] },\n capabilities: { reasoning: false, toolCall: true, attachment: true,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