@funkai/models 0.3.2 → 0.3.3
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 +9 -9
- package/CHANGELOG.md +12 -0
- package/README.md +99 -74
- package/dist/index.d.mts +18 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +20 -5
- package/dist/index.mjs.map +1 -1
- package/docs/catalog/providers.md +1 -1
- package/docs/catalog.md +302 -0
- package/docs/cost-tracking.md +144 -0
- package/docs/guides/setup-resolver.md +15 -30
- package/docs/overview.md +16 -72
- package/docs/provider/configuration.md +20 -43
- package/docs/provider/openrouter.md +22 -41
- package/docs/provider/overview.md +19 -33
- package/docs/provider-resolution.md +210 -0
- package/docs/troubleshooting.md +12 -16
- package/package.json +2 -2
- package/src/cost/calculate.ts +6 -0
- package/src/cost/types.ts +4 -0
- package/src/provider/registry.ts +23 -8
- package/src/provider/types.ts +6 -0
- package/tsconfig.json +12 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @funkai/models@0.3.
|
|
2
|
+
> @funkai/models@0.3.3 build /home/runner/work/funkai/funkai/packages/models
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.21.4[22m powered by rolldown [2mv1.0.0-rc.9[22m
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[34mℹ[39m target: [34mnode22[39m
|
|
9
9
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
10
10
|
[34mℹ[39m Build start
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m 6.
|
|
11
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m 6.74 kB[22m [2m│ gzip: 2.54 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[1mproviders/amazon-bedrock.mjs[22m [2m 1.03 kB[22m [2m│ gzip: 0.49 kB[22m
|
|
13
13
|
[34mℹ[39m [2mdist/[22m[1mproviders/google-vertex.mjs[22m [2m 1.02 kB[22m [2m│ gzip: 0.49 kB[22m
|
|
14
14
|
[34mℹ[39m [2mdist/[22m[1mproviders/fireworks-ai.mjs[22m [2m 1.00 kB[22m [2m│ gzip: 0.48 kB[22m
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
[34mℹ[39m [2mdist/[22mamazon-bedrock-Cv9AHQBH.mjs.map [2m 58.94 kB[22m [2m│ gzip: 3.78 kB[22m
|
|
36
36
|
[34mℹ[39m [2mdist/[22mnvidia-COHacuoa.mjs.map [2m 46.52 kB[22m [2m│ gzip: 2.94 kB[22m
|
|
37
37
|
[34mℹ[39m [2mdist/[22mamazon-bedrock-Cv9AHQBH.mjs [2m 36.27 kB[22m [2m│ gzip: 2.77 kB[22m
|
|
38
|
-
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m 31.
|
|
38
|
+
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m 31.12 kB[22m [2m│ gzip: 0.55 kB[22m
|
|
39
39
|
[34mℹ[39m [2mdist/[22mopenai-C0nCfZUq.mjs.map [2m 29.78 kB[22m [2m│ gzip: 2.29 kB[22m
|
|
40
40
|
[34mℹ[39m [2mdist/[22mnvidia-COHacuoa.mjs [2m 27.80 kB[22m [2m│ gzip: 2.16 kB[22m
|
|
41
41
|
[34mℹ[39m [2mdist/[22malibaba-B6q4Ng1R.mjs.map [2m 27.60 kB[22m [2m│ gzip: 2.31 kB[22m
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
[34mℹ[39m [2mdist/[22malibaba-B6q4Ng1R.mjs [2m 16.04 kB[22m [2m│ gzip: 1.46 kB[22m
|
|
50
50
|
[34mℹ[39m [2mdist/[22mhuggingface-DaM1EeLP.mjs.map [2m 14.27 kB[22m [2m│ gzip: 1.62 kB[22m
|
|
51
51
|
[34mℹ[39m [2mdist/[22mgoogle-BypRl349.mjs [2m 13.88 kB[22m [2m│ gzip: 1.19 kB[22m
|
|
52
|
+
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m 12.87 kB[22m [2m│ gzip: 4.02 kB[22m
|
|
52
53
|
[34mℹ[39m [2mdist/[22mgoogle-vertex-DbS-zTGD.mjs [2m 12.42 kB[22m [2m│ gzip: 1.25 kB[22m
|
|
53
54
|
[34mℹ[39m [2mdist/[22mtogetherai-BvcxUfPE.mjs.map [2m 12.26 kB[22m [2m│ gzip: 1.57 kB[22m
|
|
54
55
|
[34mℹ[39m [2mdist/[22mgroq-ei_PerYi.mjs.map [2m 11.99 kB[22m [2m│ gzip: 1.49 kB[22m
|
|
55
|
-
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m 11.78 kB[22m [2m│ gzip: 3.62 kB[22m
|
|
56
56
|
[34mℹ[39m [2mdist/[22mdeepinfra-B0GxUwCG.mjs [2m 11.13 kB[22m [2m│ gzip: 1.26 kB[22m
|
|
57
57
|
[34mℹ[39m [2mdist/[22manthropic-yB7ST97_.mjs [2m 10.72 kB[22m [2m│ gzip: 0.86 kB[22m
|
|
58
58
|
[34mℹ[39m [2mdist/[22mfireworks-ai-DJYvdAi_.mjs.map [2m 10.07 kB[22m [2m│ gzip: 1.37 kB[22m
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
[34mℹ[39m [2mdist/[22mproviders/perplexity.d.mts.map [2m 0.48 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
118
118
|
[34mℹ[39m [2mdist/[22mproviders/cerebras.d.mts.map [2m 0.47 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
119
119
|
[34mℹ[39m [2mdist/[22mproviders/deepseek.d.mts.map [2m 0.39 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
120
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [
|
|
120
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m832.81 kB[22m [2m│ gzip: 41.87 kB[22m
|
|
121
121
|
[34mℹ[39m [2mdist/[22m[32m[1mproviders/openrouter.d.mts[22m[39m [2m233.77 kB[22m [2m│ gzip: 12.37 kB[22m
|
|
122
122
|
[34mℹ[39m [2mdist/[22m[32m[1mproviders/amazon-bedrock.d.mts[22m[39m [2m105.52 kB[22m [2m│ gzip: 5.65 kB[22m
|
|
123
123
|
[34mℹ[39m [2mdist/[22m[32m[1mproviders/nvidia.d.mts[22m[39m [2m 83.05 kB[22m [2m│ gzip: 4.72 kB[22m
|
|
@@ -142,9 +142,9 @@
|
|
|
142
142
|
[34mℹ[39m [2mdist/[22m[32mtypes-DIzolT_s.d.mts[39m [2m 2.58 kB[22m [2m│ gzip: 0.92 kB[22m
|
|
143
143
|
[34mℹ[39m 132 files, total: 2.63 MB
|
|
144
144
|
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugins. Here is a breakdown:
|
|
145
|
-
- rolldown-plugin-dts:fake-js (
|
|
146
|
-
- rolldown-plugin-dts:
|
|
147
|
-
- rolldown-plugin-dts:
|
|
145
|
+
- rolldown-plugin-dts:fake-js (39%)
|
|
146
|
+
- rolldown-plugin-dts:generate (33%)
|
|
147
|
+
- rolldown-plugin-dts:resolver (22%)
|
|
148
148
|
See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
149
149
|
|
|
150
|
-
[32m✔[39m Build complete in [
|
|
150
|
+
[32m✔[39m Build complete in [32m5156ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @funkai/models
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ef51bd7: docs(packages/models): document reasoning token semantics, cost precision, and registry error modes
|
|
8
|
+
|
|
9
|
+
- Document that `reasoningTokens` must be exclusive of `outputTokens` to avoid double-counting
|
|
10
|
+
- Add floating-point imprecision note to `UsageCost` interface
|
|
11
|
+
- Add `@throws` documentation to `createProviderRegistry` resolve function
|
|
12
|
+
- Add `SAFETY` comment explaining double `as` cast in provider resolution
|
|
13
|
+
- Fix file structure: move private `errorMessage` helper after exports
|
|
14
|
+
|
|
3
15
|
## 0.3.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,95 +1,120 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<p><strong>@funkai/models</strong></p>
|
|
3
|
+
<p>Model catalog, provider resolution, and cost calculations for the funkai AI SDK.</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<a href="https://www.npmjs.com/package/@funkai/models"><img src="https://img.shields.io/npm/v/@funkai/models" alt="npm version" /></a>
|
|
6
|
+
<a href="https://github.com/joggrdocs/funkai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/joggrdocs/funkai" alt="License" /></a>
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- :books: **300+ model catalog** — Unified catalog across 20+ providers, sourced from models.dev.
|
|
13
|
+
- :dart: **Type-safe model IDs** — Autocomplete for all cataloged models while accepting arbitrary strings.
|
|
14
|
+
- :electric_plug: **Provider resolution** — Map `"provider/model"` strings to AI SDK `LanguageModel` instances.
|
|
15
|
+
- :moneybag: **Cost calculation** — Calculate USD cost from token usage and per-token pricing.
|
|
16
|
+
- :package: **Subpath imports** — Per-provider imports for filtered model lists and typed IDs with zero-bundle overhead.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @funkai/models
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Look up a model
|
|
6
27
|
|
|
7
28
|
```ts
|
|
8
|
-
import { model
|
|
29
|
+
import { model } from "@funkai/models";
|
|
30
|
+
|
|
31
|
+
const gpt = model("gpt-4.1");
|
|
32
|
+
|
|
33
|
+
if (gpt) {
|
|
34
|
+
console.log(gpt.name); // "GPT-4.1"
|
|
35
|
+
console.log(gpt.contextWindow); // 1047576
|
|
36
|
+
console.log(gpt.pricing.input); // cost per input token in USD
|
|
37
|
+
console.log(gpt.capabilities); // { reasoning, toolCall, ... }
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Filter models
|
|
9
42
|
|
|
10
|
-
|
|
43
|
+
```ts
|
|
44
|
+
import { models } from "@funkai/models";
|
|
11
45
|
|
|
12
46
|
const reasoning = models((m) => m.capabilities.reasoning);
|
|
47
|
+
const vision = models((m) => m.modalities.input.includes("image"));
|
|
48
|
+
const cheap = models((m) => m.capabilities.toolCall).toSorted(
|
|
49
|
+
(a, b) => a.pricing.input - b.pricing.input,
|
|
50
|
+
);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Resolve providers
|
|
13
54
|
|
|
14
|
-
|
|
15
|
-
|
|
55
|
+
```ts
|
|
56
|
+
import { createProviderRegistry } from "@funkai/models";
|
|
57
|
+
import { createOpenAI } from "@ai-sdk/openai";
|
|
58
|
+
import { anthropic } from "@ai-sdk/anthropic";
|
|
59
|
+
|
|
60
|
+
const registry = createProviderRegistry({
|
|
61
|
+
providers: {
|
|
62
|
+
openai: createOpenAI({ apiKey: process.env.OPENAI_API_KEY }),
|
|
63
|
+
anthropic,
|
|
64
|
+
},
|
|
16
65
|
});
|
|
17
|
-
|
|
66
|
+
|
|
67
|
+
// Returns a LanguageModel — pass directly to agent()
|
|
68
|
+
const lm = registry("openai/gpt-4.1");
|
|
18
69
|
```
|
|
19
70
|
|
|
20
|
-
|
|
71
|
+
### Calculate costs
|
|
21
72
|
|
|
22
|
-
|
|
73
|
+
```ts
|
|
74
|
+
import { model, calculateCost } from "@funkai/models";
|
|
75
|
+
|
|
76
|
+
const m = model("gpt-4.1");
|
|
77
|
+
if (m) {
|
|
78
|
+
const cost = calculateCost(
|
|
79
|
+
{
|
|
80
|
+
inputTokens: 1000,
|
|
81
|
+
outputTokens: 500,
|
|
82
|
+
totalTokens: 1500,
|
|
83
|
+
cacheReadTokens: 0,
|
|
84
|
+
cacheWriteTokens: 0,
|
|
85
|
+
reasoningTokens: 0,
|
|
86
|
+
},
|
|
87
|
+
m.pricing,
|
|
88
|
+
);
|
|
89
|
+
console.log(`Total: $${cost.total.toFixed(6)}`);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
23
92
|
|
|
24
|
-
|
|
25
|
-
| -------- | ---------- | ------------------------------------------------ |
|
|
26
|
-
| `model` | `function` | Look up a single model definition by ID |
|
|
27
|
-
| `models` | `function` | Return all models, optionally filtered |
|
|
28
|
-
| `MODELS` | `const` | Complete readonly array of all model definitions |
|
|
93
|
+
## API
|
|
29
94
|
|
|
30
|
-
|
|
95
|
+
| Export | Description |
|
|
96
|
+
| ------------------------ | ------------------------------------------------------ |
|
|
97
|
+
| `model(id)` | Look up a single model definition by ID |
|
|
98
|
+
| `models(filter?)` | Return all models, optionally filtered by a predicate |
|
|
99
|
+
| `MODELS` | Complete readonly array of all model definitions |
|
|
100
|
+
| `createProviderRegistry` | Create a registry that resolves model IDs to providers |
|
|
101
|
+
| `calculateCost` | Calculate USD cost from token usage and pricing |
|
|
31
102
|
|
|
32
|
-
|
|
33
|
-
| --------------------- | ---------- | ----------------------------------------------------- |
|
|
34
|
-
| `createModelResolver` | `function` | Create a resolver with provider mappings and fallback |
|
|
35
|
-
| `openrouter` | `function` | Cached OpenRouter model resolver (reads env API key) |
|
|
36
|
-
| `createOpenRouter` | `function` | Create a new OpenRouter provider instance |
|
|
103
|
+
## Subpath Exports
|
|
37
104
|
|
|
38
|
-
|
|
105
|
+
Per-provider subpath imports give access to filtered model lists and typed IDs:
|
|
39
106
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
107
|
+
```ts
|
|
108
|
+
import { openAIModels, openAIModel } from "@funkai/models/openai";
|
|
109
|
+
import { anthropicModels } from "@funkai/models/anthropic";
|
|
110
|
+
```
|
|
43
111
|
|
|
44
|
-
|
|
112
|
+
Available for: `openai`, `anthropic`, `google`, `google-vertex`, `mistral`, `amazon-bedrock`, `groq`, `deepseek`, `xai`, `cohere`, `fireworks-ai`, `togetherai`, `deepinfra`, `cerebras`, `perplexity`, `openrouter`, `llama`, `alibaba`, `nvidia`, `huggingface`, `inception`.
|
|
45
113
|
|
|
46
|
-
|
|
47
|
-
| --------------------- | ------ | ------------------------------------------------- |
|
|
48
|
-
| `ModelDefinition` | `type` | Full model metadata with pricing and capabilities |
|
|
49
|
-
| `ModelId` | `type` | Model identifier with autocomplete support |
|
|
50
|
-
| `KnownModelId` | `type` | Union of all cataloged model IDs |
|
|
51
|
-
| `ModelPricing` | `type` | Per-token pricing rates in USD |
|
|
52
|
-
| `ModelCapabilities` | `type` | Boolean capability flags (reasoning, tools, etc.) |
|
|
53
|
-
| `ModelModalities` | `type` | Input/output modality descriptors |
|
|
54
|
-
| `ModelResolver` | `type` | Function that resolves model ID to LanguageModel |
|
|
55
|
-
| `ModelResolverConfig` | `type` | Configuration for `createModelResolver` |
|
|
56
|
-
| `LanguageModel` | `type` | AI SDK language model instance (v3) |
|
|
57
|
-
| `TokenUsage` | `type` | Token counts from a model invocation |
|
|
58
|
-
| `UsageCost` | `type` | Breakdown of cost in USD |
|
|
114
|
+
## Documentation
|
|
59
115
|
|
|
60
|
-
|
|
116
|
+
For comprehensive documentation, see the [Models concept](/concepts/models) and [`model()` reference](/reference/models/model).
|
|
117
|
+
|
|
118
|
+
## License
|
|
61
119
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
| Import Path | Exports |
|
|
65
|
-
| ------------------------------- | --------------------------------------------------- |
|
|
66
|
-
| `@funkai/models` | Full API (catalog, provider, cost) |
|
|
67
|
-
| `@funkai/models/openai` | `openAIModels`, `openAIModel()`, `OpenAIModelId` |
|
|
68
|
-
| `@funkai/models/anthropic` | `anthropicModels`, `anthropicModel()`, etc. |
|
|
69
|
-
| `@funkai/models/google` | `googleModels`, `googleModel()`, etc. |
|
|
70
|
-
| `@funkai/models/google-vertex` | `googleVertexModels`, `googleVertexModel()`, etc. |
|
|
71
|
-
| `@funkai/models/mistral` | `mistralModels`, `mistralModel()`, etc. |
|
|
72
|
-
| `@funkai/models/amazon-bedrock` | `amazonBedrockModels`, `amazonBedrockModel()`, etc. |
|
|
73
|
-
| `@funkai/models/groq` | `groqModels`, `groqModel()`, etc. |
|
|
74
|
-
| `@funkai/models/deepseek` | `deepseekModels`, `deepseekModel()`, etc. |
|
|
75
|
-
| `@funkai/models/xai` | `xaiModels`, `xaiModel()`, etc. |
|
|
76
|
-
| `@funkai/models/cohere` | `cohereModels`, `cohereModel()`, etc. |
|
|
77
|
-
| `@funkai/models/fireworks-ai` | `fireworksAIModels`, `fireworksAIModel()`, etc. |
|
|
78
|
-
| `@funkai/models/togetherai` | `togetheraiModels`, `togetheraiModel()`, etc. |
|
|
79
|
-
| `@funkai/models/deepinfra` | `deepinfraModels`, `deepinfraModel()`, etc. |
|
|
80
|
-
| `@funkai/models/cerebras` | `cerebrasModels`, `cerebrasModel()`, etc. |
|
|
81
|
-
| `@funkai/models/perplexity` | `perplexityModels`, `perplexityModel()`, etc. |
|
|
82
|
-
| `@funkai/models/openrouter` | `openrouterModels`, `openrouterModel()`, etc. |
|
|
83
|
-
| `@funkai/models/llama` | `llamaModels`, `llamaModel()`, etc. |
|
|
84
|
-
| `@funkai/models/alibaba` | `alibabaModels`, `alibabaModel()`, etc. |
|
|
85
|
-
| `@funkai/models/nvidia` | `nvidiaModels`, `nvidiaModel()`, etc. |
|
|
86
|
-
| `@funkai/models/huggingface` | `huggingfaceModels`, `huggingfaceModel()`, etc. |
|
|
87
|
-
| `@funkai/models/inception` | `inceptionModels`, `inceptionModel()`, etc. |
|
|
88
|
-
|
|
89
|
-
## References
|
|
90
|
-
|
|
91
|
-
- [Overview](docs/overview.md)
|
|
92
|
-
- [Model Catalog](docs/catalog/overview.md)
|
|
93
|
-
- [Provider Resolution](docs/provider/overview.md)
|
|
94
|
-
- [Cost Calculation](docs/cost/overview.md)
|
|
95
|
-
- [Troubleshooting](docs/troubleshooting.md)
|
|
120
|
+
[MIT](https://github.com/joggrdocs/funkai/blob/main/LICENSE)
|
package/dist/index.d.mts
CHANGED
|
@@ -30120,6 +30120,12 @@ type LanguageModel = Extract<LanguageModel$1, {
|
|
|
30120
30120
|
* Base token counts shared by raw tracking records and final output.
|
|
30121
30121
|
*
|
|
30122
30122
|
* All fields are resolved `number` (0 when absent).
|
|
30123
|
+
*
|
|
30124
|
+
* **Reasoning token semantics**: `reasoningTokens` must be **exclusive** of
|
|
30125
|
+
* `outputTokens`. Some providers include reasoning tokens inside the output
|
|
30126
|
+
* token count — if so, callers must deduct reasoning tokens from
|
|
30127
|
+
* `outputTokens` before constructing this type to avoid double-counting in
|
|
30128
|
+
* cost calculations.
|
|
30123
30129
|
*/
|
|
30124
30130
|
interface TokenUsage {
|
|
30125
30131
|
/** Number of input (prompt) tokens. */
|
|
@@ -30190,6 +30196,8 @@ type ProviderRegistry = (modelId: ModelId) => LanguageModel;
|
|
|
30190
30196
|
*
|
|
30191
30197
|
* @param config - Provider mappings.
|
|
30192
30198
|
* @returns A resolver function that maps model IDs to {@link LanguageModel} instances.
|
|
30199
|
+
* @throws {Error} If the model ID is empty, missing the `provider/model` format,
|
|
30200
|
+
* or the underlying AI SDK registry fails to resolve the provider or model.
|
|
30193
30201
|
*
|
|
30194
30202
|
* @example
|
|
30195
30203
|
* ```typescript
|
|
@@ -30216,6 +30224,10 @@ declare function createProviderRegistry(config: ProviderRegistryConfig): Provide
|
|
|
30216
30224
|
*
|
|
30217
30225
|
* Each field is the dollar cost for that token category.
|
|
30218
30226
|
* All fields are non-negative numbers. Fields that don't apply are `0`.
|
|
30227
|
+
*
|
|
30228
|
+
* **Note**: Values may exhibit floating-point imprecision inherent to
|
|
30229
|
+
* JavaScript `number` (IEEE 754 double-precision) arithmetic. Do not rely
|
|
30230
|
+
* on exact equality comparisons against expected cost values.
|
|
30219
30231
|
*/
|
|
30220
30232
|
interface UsageCost {
|
|
30221
30233
|
/** Cost for input tokens. */
|
|
@@ -30239,6 +30251,12 @@ interface UsageCost {
|
|
|
30239
30251
|
* Multiplies each token count by the corresponding per-token pricing rate.
|
|
30240
30252
|
* Optional pricing fields (cache) default to `0` when absent.
|
|
30241
30253
|
*
|
|
30254
|
+
* **Reasoning token semantics**: `reasoningTokens` in {@link TokenUsage} are
|
|
30255
|
+
* expected to be **exclusive** of `outputTokens` — they are billed separately.
|
|
30256
|
+
* If your provider includes reasoning tokens _within_ the `outputTokens` count,
|
|
30257
|
+
* you must deduct them before passing usage to this function to avoid
|
|
30258
|
+
* double-counting output costs.
|
|
30259
|
+
*
|
|
30242
30260
|
* @param usage - Token counts from a model invocation.
|
|
30243
30261
|
* @param pricing - Per-token pricing rates for the model.
|
|
30244
30262
|
* @returns A {@link UsageCost} with per-field and total costs in USD.
|
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/registry.ts","../src/cost/types.ts","../src/cost/calculate.ts"],"mappings":";;;;;cAqCa,QAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBG,KAAA,CAAM,EAAA,EAAI,OAAA,GAAU,eAAA;;;;;;;;;;;;;;iBAiBpB,MAAA,CAAO,MAAA,IAAU,CAAA,EAAG,eAAA,wBAAuC,eAAA;;;;;;;AD1B3E;;;;;;;KExBY,aAAA,GAAgB,OAAA,CAAQ,eAAA;EAAqB,oBAAA;AAAA;;;;;;UAOxC,UAAA;;WAEN,WAAA;;WAGA,YAAA;;WAGA,WAAA;;WAGA,eAAA;;WAGA,gBAAA;;WAGA,eAAA;AAAA;;;;;AFAX;;;KGnBK,WAAA,GAAc,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;;;;;;;;AHlDxE;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"}
|
|
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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AAe,SAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -90,11 +90,6 @@ function models(filter) {
|
|
|
90
90
|
}
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region src/provider/registry.ts
|
|
93
|
-
/** @private */
|
|
94
|
-
function errorMessage(error) {
|
|
95
|
-
if (error instanceof Error) return error.message;
|
|
96
|
-
return String(error);
|
|
97
|
-
}
|
|
98
93
|
/**
|
|
99
94
|
* Create a provider registry that resolves `provider/model` string IDs
|
|
100
95
|
* to AI SDK {@link LanguageModel} instances.
|
|
@@ -105,6 +100,8 @@ function errorMessage(error) {
|
|
|
105
100
|
*
|
|
106
101
|
* @param config - Provider mappings.
|
|
107
102
|
* @returns A resolver function that maps model IDs to {@link LanguageModel} instances.
|
|
103
|
+
* @throws {Error} If the model ID is empty, missing the `provider/model` format,
|
|
104
|
+
* or the underlying AI SDK registry fails to resolve the provider or model.
|
|
108
105
|
*
|
|
109
106
|
* @example
|
|
110
107
|
* ```typescript
|
|
@@ -135,6 +132,18 @@ function createProviderRegistry(config) {
|
|
|
135
132
|
}
|
|
136
133
|
};
|
|
137
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Extract a human-readable message from an unknown error value.
|
|
137
|
+
*
|
|
138
|
+
* @param error - The caught error value.
|
|
139
|
+
* @returns The error message string.
|
|
140
|
+
*
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
function errorMessage(error) {
|
|
144
|
+
if (error instanceof Error) return error.message;
|
|
145
|
+
return String(error);
|
|
146
|
+
}
|
|
138
147
|
//#endregion
|
|
139
148
|
//#region src/cost/calculate.ts
|
|
140
149
|
/**
|
|
@@ -143,6 +152,12 @@ function createProviderRegistry(config) {
|
|
|
143
152
|
* Multiplies each token count by the corresponding per-token pricing rate.
|
|
144
153
|
* Optional pricing fields (cache) default to `0` when absent.
|
|
145
154
|
*
|
|
155
|
+
* **Reasoning token semantics**: `reasoningTokens` in {@link TokenUsage} are
|
|
156
|
+
* expected to be **exclusive** of `outputTokens` — they are billed separately.
|
|
157
|
+
* If your provider includes reasoning tokens _within_ the `outputTokens` count,
|
|
158
|
+
* you must deduct them before passing usage to this function to avoid
|
|
159
|
+
* double-counting output costs.
|
|
160
|
+
*
|
|
146
161
|
* @param usage - Token counts from a model invocation.
|
|
147
162
|
* @param pricing - Per-token pricing rates for the model.
|
|
148
163
|
* @returns A {@link UsageCost} with per-field and total costs in USD.
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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\n/** @private */\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/** @private */\nfunction errorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\n}\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 if (!modelId.includes(\"/\")) {\n throw new Error(\n `Invalid model ID \"${modelId}\": expected \"provider/model\" format (e.g. \"openai/gpt-4.1\")`,\n );\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 try {\n return inner.languageModel(modelId as `${string}/${string}`) as LanguageModel;\n } catch (error) {\n throw new Error(`Failed to resolve model \"${modelId}\": ${errorMessage(error)}`, {\n cause: error,\n });\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,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;C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{"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\n/** @private */\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 * @throws {Error} If the model ID is empty, missing the `provider/model` format,\n * or the underlying AI SDK registry fails to resolve the provider or model.\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 if (!modelId.includes(\"/\")) {\n throw new Error(\n `Invalid model ID \"${modelId}\": expected \"provider/model\" format (e.g. \"openai/gpt-4.1\")`,\n );\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 try {\n // SAFETY: The first cast (`as \\`${string}/${string}\\``) is safe because we\n // Validated above that `modelId` contains `/`. The second cast (`as\n // LanguageModel`) narrows from the AI SDK's broader LanguageModel union to\n // The v3 specification, which is the only version we support.\n return inner.languageModel(modelId as `${string}/${string}`) as LanguageModel;\n } catch (error) {\n throw new Error(`Failed to resolve model \"${modelId}\": ${errorMessage(error)}`, {\n cause: error,\n });\n }\n };\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Extract a human-readable message from an unknown error value.\n *\n * @param error - The caught error value.\n * @returns The error message string.\n *\n * @private\n */\nfunction errorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\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 * **Reasoning token semantics**: `reasoningTokens` in {@link TokenUsage} are\n * expected to be **exclusive** of `outputTokens` — they are billed separately.\n * If your provider includes reasoning tokens _within_ the `outputTokens` count,\n * you must deduct them before passing usage to this function to avoid\n * double-counting output costs.\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,GA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Ac;CACnE,MAAM,YAAY,MAAM,mBAAmB,QAAQ,aAAa;AAGhE,QAAO;EAAE;EAAO;EAAQ;EAAW;EAAY;EAAW,OAF5C,QAAQ,SAAS,YAAY,aAAa;EAES"}
|
|
@@ -56,7 +56,7 @@ const withReasoning = anthropicModels.filter((m) => m.capabilities.reasoning);
|
|
|
56
56
|
|
|
57
57
|
## Model ID Format
|
|
58
58
|
|
|
59
|
-
Model IDs in the catalog use the format `<provider-native-id>` (e.g. `"gpt-4.1"`, `"claude-sonnet-4-20250514"`). When used with `
|
|
59
|
+
Model IDs in the catalog use the format `<provider-native-id>` (e.g. `"gpt-4.1"`, `"claude-sonnet-4-20250514"`). When used with `createProviderRegistry()`, prefix them with the provider slug: `"openai/gpt-4.1"`, `"anthropic/claude-sonnet-4-20250514"`.
|
|
60
60
|
|
|
61
61
|
## Data Source
|
|
62
62
|
|