@mariozechner/pi-ai 0.13.2 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/models.generated.d.ts +30 -30
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +101 -101
- package/dist/models.generated.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +0 -8
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +0 -8
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/openai-completions.d.ts +1 -1
- package/dist/providers/openai-completions.d.ts.map +1 -1
- package/dist/providers/openai-completions.js +65 -28
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/openai-responses.d.ts +1 -1
- package/dist/providers/openai-responses.d.ts.map +1 -1
- package/dist/providers/openai-responses.js +4 -9
- package/dist/providers/openai-responses.js.map +1 -1
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +4 -2
- package/dist/stream.js.map +1 -1
- package/dist/types.d.ts +17 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/validation.d.ts +8 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +14 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +4 -4
package/dist/models.generated.js
CHANGED
|
@@ -1988,6 +1988,23 @@ export const MODELS = {
|
|
|
1988
1988
|
},
|
|
1989
1989
|
},
|
|
1990
1990
|
openrouter: {
|
|
1991
|
+
"relace/relace-search": {
|
|
1992
|
+
id: "relace/relace-search",
|
|
1993
|
+
name: "Relace: Relace Search",
|
|
1994
|
+
api: "openai-completions",
|
|
1995
|
+
provider: "openrouter",
|
|
1996
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
1997
|
+
reasoning: false,
|
|
1998
|
+
input: ["text"],
|
|
1999
|
+
cost: {
|
|
2000
|
+
input: 1,
|
|
2001
|
+
output: 3,
|
|
2002
|
+
cacheRead: 0,
|
|
2003
|
+
cacheWrite: 0,
|
|
2004
|
+
},
|
|
2005
|
+
contextWindow: 256000,
|
|
2006
|
+
maxTokens: 128000,
|
|
2007
|
+
},
|
|
1991
2008
|
"openai/gpt-5.1-codex-max": {
|
|
1992
2009
|
id: "openai/gpt-5.1-codex-max",
|
|
1993
2010
|
name: "OpenAI: GPT-5.1-Codex-Max",
|
|
@@ -2150,13 +2167,13 @@ export const MODELS = {
|
|
|
2150
2167
|
reasoning: true,
|
|
2151
2168
|
input: ["text"],
|
|
2152
2169
|
cost: {
|
|
2153
|
-
input: 0.
|
|
2154
|
-
output: 0.
|
|
2155
|
-
cacheRead: 0.
|
|
2170
|
+
input: 0.26,
|
|
2171
|
+
output: 0.39,
|
|
2172
|
+
cacheRead: 0.19999999999999998,
|
|
2156
2173
|
cacheWrite: 0,
|
|
2157
2174
|
},
|
|
2158
2175
|
contextWindow: 163840,
|
|
2159
|
-
maxTokens:
|
|
2176
|
+
maxTokens: 65536,
|
|
2160
2177
|
},
|
|
2161
2178
|
"prime-intellect/intellect-3": {
|
|
2162
2179
|
id: "prime-intellect/intellect-3",
|
|
@@ -2643,13 +2660,13 @@ export const MODELS = {
|
|
|
2643
2660
|
reasoning: false,
|
|
2644
2661
|
input: ["text", "image"],
|
|
2645
2662
|
cost: {
|
|
2646
|
-
input: 0.
|
|
2647
|
-
output:
|
|
2663
|
+
input: 0.14,
|
|
2664
|
+
output: 1,
|
|
2648
2665
|
cacheRead: 0,
|
|
2649
2666
|
cacheWrite: 0,
|
|
2650
2667
|
},
|
|
2651
|
-
contextWindow:
|
|
2652
|
-
maxTokens:
|
|
2668
|
+
contextWindow: 131072,
|
|
2669
|
+
maxTokens: 131072,
|
|
2653
2670
|
},
|
|
2654
2671
|
"openai/gpt-5-pro": {
|
|
2655
2672
|
id: "openai/gpt-5-pro",
|
|
@@ -3238,13 +3255,13 @@ export const MODELS = {
|
|
|
3238
3255
|
reasoning: true,
|
|
3239
3256
|
input: ["text"],
|
|
3240
3257
|
cost: {
|
|
3241
|
-
input: 0,
|
|
3242
|
-
output: 0,
|
|
3258
|
+
input: 0.19999999999999998,
|
|
3259
|
+
output: 0.7999999999999999,
|
|
3243
3260
|
cacheRead: 0,
|
|
3244
3261
|
cacheWrite: 0,
|
|
3245
3262
|
},
|
|
3246
|
-
contextWindow:
|
|
3247
|
-
maxTokens:
|
|
3263
|
+
contextWindow: 163840,
|
|
3264
|
+
maxTokens: 163840,
|
|
3248
3265
|
},
|
|
3249
3266
|
"openai/gpt-4o-audio-preview": {
|
|
3250
3267
|
id: "openai/gpt-4o-audio-preview",
|
|
@@ -3482,7 +3499,7 @@ export const MODELS = {
|
|
|
3482
3499
|
cacheWrite: 0,
|
|
3483
3500
|
},
|
|
3484
3501
|
contextWindow: 131072,
|
|
3485
|
-
maxTokens:
|
|
3502
|
+
maxTokens: 128000,
|
|
3486
3503
|
},
|
|
3487
3504
|
"openai/gpt-oss-20b": {
|
|
3488
3505
|
id: "openai/gpt-oss-20b",
|
|
@@ -3960,23 +3977,6 @@ export const MODELS = {
|
|
|
3960
3977
|
contextWindow: 131072,
|
|
3961
3978
|
maxTokens: 4096,
|
|
3962
3979
|
},
|
|
3963
|
-
"mistralai/magistral-medium-2506:thinking": {
|
|
3964
|
-
id: "mistralai/magistral-medium-2506:thinking",
|
|
3965
|
-
name: "Mistral: Magistral Medium 2506 (thinking)",
|
|
3966
|
-
api: "openai-completions",
|
|
3967
|
-
provider: "openrouter",
|
|
3968
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
3969
|
-
reasoning: true,
|
|
3970
|
-
input: ["text"],
|
|
3971
|
-
cost: {
|
|
3972
|
-
input: 2,
|
|
3973
|
-
output: 5,
|
|
3974
|
-
cacheRead: 0,
|
|
3975
|
-
cacheWrite: 0,
|
|
3976
|
-
},
|
|
3977
|
-
contextWindow: 40960,
|
|
3978
|
-
maxTokens: 40000,
|
|
3979
|
-
},
|
|
3980
3980
|
"google/gemini-2.5-pro-preview": {
|
|
3981
3981
|
id: "google/gemini-2.5-pro-preview",
|
|
3982
3982
|
name: "Google: Gemini 2.5 Pro Preview 06-05",
|
|
@@ -4003,8 +4003,8 @@ export const MODELS = {
|
|
|
4003
4003
|
reasoning: true,
|
|
4004
4004
|
input: ["text"],
|
|
4005
4005
|
cost: {
|
|
4006
|
-
input: 0.
|
|
4007
|
-
output:
|
|
4006
|
+
input: 0.39999999999999997,
|
|
4007
|
+
output: 1.75,
|
|
4008
4008
|
cacheRead: 0,
|
|
4009
4009
|
cacheWrite: 0,
|
|
4010
4010
|
},
|
|
@@ -4496,13 +4496,13 @@ export const MODELS = {
|
|
|
4496
4496
|
reasoning: false,
|
|
4497
4497
|
input: ["text", "image"],
|
|
4498
4498
|
cost: {
|
|
4499
|
-
input: 0.
|
|
4500
|
-
output: 0.
|
|
4499
|
+
input: 0.03,
|
|
4500
|
+
output: 0.11,
|
|
4501
4501
|
cacheRead: 0,
|
|
4502
4502
|
cacheWrite: 0,
|
|
4503
4503
|
},
|
|
4504
|
-
contextWindow:
|
|
4505
|
-
maxTokens:
|
|
4504
|
+
contextWindow: 96000,
|
|
4505
|
+
maxTokens: 96000,
|
|
4506
4506
|
},
|
|
4507
4507
|
"qwen/qwq-32b": {
|
|
4508
4508
|
id: "qwen/qwq-32b",
|
|
@@ -5150,34 +5150,34 @@ export const MODELS = {
|
|
|
5150
5150
|
contextWindow: 32768,
|
|
5151
5151
|
maxTokens: 4096,
|
|
5152
5152
|
},
|
|
5153
|
-
"cohere/command-r-
|
|
5154
|
-
id: "cohere/command-r-
|
|
5155
|
-
name: "Cohere: Command R
|
|
5153
|
+
"cohere/command-r-08-2024": {
|
|
5154
|
+
id: "cohere/command-r-08-2024",
|
|
5155
|
+
name: "Cohere: Command R (08-2024)",
|
|
5156
5156
|
api: "openai-completions",
|
|
5157
5157
|
provider: "openrouter",
|
|
5158
5158
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5159
5159
|
reasoning: false,
|
|
5160
5160
|
input: ["text"],
|
|
5161
5161
|
cost: {
|
|
5162
|
-
input:
|
|
5163
|
-
output:
|
|
5162
|
+
input: 0.15,
|
|
5163
|
+
output: 0.6,
|
|
5164
5164
|
cacheRead: 0,
|
|
5165
5165
|
cacheWrite: 0,
|
|
5166
5166
|
},
|
|
5167
5167
|
contextWindow: 128000,
|
|
5168
5168
|
maxTokens: 4000,
|
|
5169
5169
|
},
|
|
5170
|
-
"cohere/command-r-08-2024": {
|
|
5171
|
-
id: "cohere/command-r-08-2024",
|
|
5172
|
-
name: "Cohere: Command R (08-2024)",
|
|
5170
|
+
"cohere/command-r-plus-08-2024": {
|
|
5171
|
+
id: "cohere/command-r-plus-08-2024",
|
|
5172
|
+
name: "Cohere: Command R+ (08-2024)",
|
|
5173
5173
|
api: "openai-completions",
|
|
5174
5174
|
provider: "openrouter",
|
|
5175
5175
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5176
5176
|
reasoning: false,
|
|
5177
5177
|
input: ["text"],
|
|
5178
5178
|
cost: {
|
|
5179
|
-
input:
|
|
5180
|
-
output:
|
|
5179
|
+
input: 2.5,
|
|
5180
|
+
output: 10,
|
|
5181
5181
|
cacheRead: 0,
|
|
5182
5182
|
cacheWrite: 0,
|
|
5183
5183
|
},
|
|
@@ -5252,38 +5252,38 @@ export const MODELS = {
|
|
|
5252
5252
|
contextWindow: 131072,
|
|
5253
5253
|
maxTokens: 16384,
|
|
5254
5254
|
},
|
|
5255
|
-
"meta-llama/llama-3.1-
|
|
5256
|
-
id: "meta-llama/llama-3.1-
|
|
5257
|
-
name: "Meta: Llama 3.1
|
|
5255
|
+
"meta-llama/llama-3.1-405b-instruct": {
|
|
5256
|
+
id: "meta-llama/llama-3.1-405b-instruct",
|
|
5257
|
+
name: "Meta: Llama 3.1 405B Instruct",
|
|
5258
5258
|
api: "openai-completions",
|
|
5259
5259
|
provider: "openrouter",
|
|
5260
5260
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5261
5261
|
reasoning: false,
|
|
5262
5262
|
input: ["text"],
|
|
5263
5263
|
cost: {
|
|
5264
|
-
input:
|
|
5265
|
-
output:
|
|
5264
|
+
input: 3.5,
|
|
5265
|
+
output: 3.5,
|
|
5266
5266
|
cacheRead: 0,
|
|
5267
5267
|
cacheWrite: 0,
|
|
5268
5268
|
},
|
|
5269
|
-
contextWindow:
|
|
5269
|
+
contextWindow: 130815,
|
|
5270
5270
|
maxTokens: 4096,
|
|
5271
5271
|
},
|
|
5272
|
-
"meta-llama/llama-3.1-
|
|
5273
|
-
id: "meta-llama/llama-3.1-
|
|
5274
|
-
name: "Meta: Llama 3.1
|
|
5272
|
+
"meta-llama/llama-3.1-70b-instruct": {
|
|
5273
|
+
id: "meta-llama/llama-3.1-70b-instruct",
|
|
5274
|
+
name: "Meta: Llama 3.1 70B Instruct",
|
|
5275
5275
|
api: "openai-completions",
|
|
5276
5276
|
provider: "openrouter",
|
|
5277
5277
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5278
5278
|
reasoning: false,
|
|
5279
5279
|
input: ["text"],
|
|
5280
5280
|
cost: {
|
|
5281
|
-
input:
|
|
5282
|
-
output:
|
|
5281
|
+
input: 0.39999999999999997,
|
|
5282
|
+
output: 0.39999999999999997,
|
|
5283
5283
|
cacheRead: 0,
|
|
5284
5284
|
cacheWrite: 0,
|
|
5285
5285
|
},
|
|
5286
|
-
contextWindow:
|
|
5286
|
+
contextWindow: 131072,
|
|
5287
5287
|
maxTokens: 4096,
|
|
5288
5288
|
},
|
|
5289
5289
|
"mistralai/mistral-nemo": {
|
|
@@ -5303,9 +5303,9 @@ export const MODELS = {
|
|
|
5303
5303
|
contextWindow: 131072,
|
|
5304
5304
|
maxTokens: 16384,
|
|
5305
5305
|
},
|
|
5306
|
-
"openai/gpt-4o-mini": {
|
|
5307
|
-
id: "openai/gpt-4o-mini",
|
|
5308
|
-
name: "OpenAI: GPT-4o-mini",
|
|
5306
|
+
"openai/gpt-4o-mini-2024-07-18": {
|
|
5307
|
+
id: "openai/gpt-4o-mini-2024-07-18",
|
|
5308
|
+
name: "OpenAI: GPT-4o-mini (2024-07-18)",
|
|
5309
5309
|
api: "openai-completions",
|
|
5310
5310
|
provider: "openrouter",
|
|
5311
5311
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
@@ -5320,9 +5320,9 @@ export const MODELS = {
|
|
|
5320
5320
|
contextWindow: 128000,
|
|
5321
5321
|
maxTokens: 16384,
|
|
5322
5322
|
},
|
|
5323
|
-
"openai/gpt-4o-mini
|
|
5324
|
-
id: "openai/gpt-4o-mini
|
|
5325
|
-
name: "OpenAI: GPT-4o-mini
|
|
5323
|
+
"openai/gpt-4o-mini": {
|
|
5324
|
+
id: "openai/gpt-4o-mini",
|
|
5325
|
+
name: "OpenAI: GPT-4o-mini",
|
|
5326
5326
|
api: "openai-completions",
|
|
5327
5327
|
provider: "openrouter",
|
|
5328
5328
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
@@ -5422,6 +5422,23 @@ export const MODELS = {
|
|
|
5422
5422
|
contextWindow: 128000,
|
|
5423
5423
|
maxTokens: 4096,
|
|
5424
5424
|
},
|
|
5425
|
+
"openai/gpt-4o-2024-05-13": {
|
|
5426
|
+
id: "openai/gpt-4o-2024-05-13",
|
|
5427
|
+
name: "OpenAI: GPT-4o (2024-05-13)",
|
|
5428
|
+
api: "openai-completions",
|
|
5429
|
+
provider: "openrouter",
|
|
5430
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
5431
|
+
reasoning: false,
|
|
5432
|
+
input: ["text", "image"],
|
|
5433
|
+
cost: {
|
|
5434
|
+
input: 5,
|
|
5435
|
+
output: 15,
|
|
5436
|
+
cacheRead: 0,
|
|
5437
|
+
cacheWrite: 0,
|
|
5438
|
+
},
|
|
5439
|
+
contextWindow: 128000,
|
|
5440
|
+
maxTokens: 4096,
|
|
5441
|
+
},
|
|
5425
5442
|
"openai/gpt-4o": {
|
|
5426
5443
|
id: "openai/gpt-4o",
|
|
5427
5444
|
name: "OpenAI: GPT-4o",
|
|
@@ -5456,22 +5473,22 @@ export const MODELS = {
|
|
|
5456
5473
|
contextWindow: 128000,
|
|
5457
5474
|
maxTokens: 64000,
|
|
5458
5475
|
},
|
|
5459
|
-
"
|
|
5460
|
-
id: "
|
|
5461
|
-
name: "
|
|
5476
|
+
"meta-llama/llama-3-70b-instruct": {
|
|
5477
|
+
id: "meta-llama/llama-3-70b-instruct",
|
|
5478
|
+
name: "Meta: Llama 3 70B Instruct",
|
|
5462
5479
|
api: "openai-completions",
|
|
5463
5480
|
provider: "openrouter",
|
|
5464
5481
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5465
5482
|
reasoning: false,
|
|
5466
|
-
input: ["text"
|
|
5483
|
+
input: ["text"],
|
|
5467
5484
|
cost: {
|
|
5468
|
-
input:
|
|
5469
|
-
output:
|
|
5485
|
+
input: 0.3,
|
|
5486
|
+
output: 0.39999999999999997,
|
|
5470
5487
|
cacheRead: 0,
|
|
5471
5488
|
cacheWrite: 0,
|
|
5472
5489
|
},
|
|
5473
|
-
contextWindow:
|
|
5474
|
-
maxTokens:
|
|
5490
|
+
contextWindow: 8192,
|
|
5491
|
+
maxTokens: 16384,
|
|
5475
5492
|
},
|
|
5476
5493
|
"meta-llama/llama-3-8b-instruct": {
|
|
5477
5494
|
id: "meta-llama/llama-3-8b-instruct",
|
|
@@ -5490,23 +5507,6 @@ export const MODELS = {
|
|
|
5490
5507
|
contextWindow: 8192,
|
|
5491
5508
|
maxTokens: 16384,
|
|
5492
5509
|
},
|
|
5493
|
-
"meta-llama/llama-3-70b-instruct": {
|
|
5494
|
-
id: "meta-llama/llama-3-70b-instruct",
|
|
5495
|
-
name: "Meta: Llama 3 70B Instruct",
|
|
5496
|
-
api: "openai-completions",
|
|
5497
|
-
provider: "openrouter",
|
|
5498
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
5499
|
-
reasoning: false,
|
|
5500
|
-
input: ["text"],
|
|
5501
|
-
cost: {
|
|
5502
|
-
input: 0.3,
|
|
5503
|
-
output: 0.39999999999999997,
|
|
5504
|
-
cacheRead: 0,
|
|
5505
|
-
cacheWrite: 0,
|
|
5506
|
-
},
|
|
5507
|
-
contextWindow: 8192,
|
|
5508
|
-
maxTokens: 16384,
|
|
5509
|
-
},
|
|
5510
5510
|
"mistralai/mixtral-8x22b-instruct": {
|
|
5511
5511
|
id: "mistralai/mixtral-8x22b-instruct",
|
|
5512
5512
|
name: "Mistral: Mixtral 8x22B Instruct",
|
|
@@ -5592,38 +5592,38 @@ export const MODELS = {
|
|
|
5592
5592
|
contextWindow: 128000,
|
|
5593
5593
|
maxTokens: 4096,
|
|
5594
5594
|
},
|
|
5595
|
-
"openai/gpt-
|
|
5596
|
-
id: "openai/gpt-
|
|
5597
|
-
name: "OpenAI: GPT-
|
|
5595
|
+
"openai/gpt-3.5-turbo-0613": {
|
|
5596
|
+
id: "openai/gpt-3.5-turbo-0613",
|
|
5597
|
+
name: "OpenAI: GPT-3.5 Turbo (older v0613)",
|
|
5598
5598
|
api: "openai-completions",
|
|
5599
5599
|
provider: "openrouter",
|
|
5600
5600
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5601
5601
|
reasoning: false,
|
|
5602
5602
|
input: ["text"],
|
|
5603
5603
|
cost: {
|
|
5604
|
-
input:
|
|
5605
|
-
output:
|
|
5604
|
+
input: 1,
|
|
5605
|
+
output: 2,
|
|
5606
5606
|
cacheRead: 0,
|
|
5607
5607
|
cacheWrite: 0,
|
|
5608
5608
|
},
|
|
5609
|
-
contextWindow:
|
|
5609
|
+
contextWindow: 4095,
|
|
5610
5610
|
maxTokens: 4096,
|
|
5611
5611
|
},
|
|
5612
|
-
"openai/gpt-
|
|
5613
|
-
id: "openai/gpt-
|
|
5614
|
-
name: "OpenAI: GPT-
|
|
5612
|
+
"openai/gpt-4-turbo-preview": {
|
|
5613
|
+
id: "openai/gpt-4-turbo-preview",
|
|
5614
|
+
name: "OpenAI: GPT-4 Turbo Preview",
|
|
5615
5615
|
api: "openai-completions",
|
|
5616
5616
|
provider: "openrouter",
|
|
5617
5617
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
5618
5618
|
reasoning: false,
|
|
5619
5619
|
input: ["text"],
|
|
5620
5620
|
cost: {
|
|
5621
|
-
input:
|
|
5622
|
-
output:
|
|
5621
|
+
input: 10,
|
|
5622
|
+
output: 30,
|
|
5623
5623
|
cacheRead: 0,
|
|
5624
5624
|
cacheWrite: 0,
|
|
5625
5625
|
},
|
|
5626
|
-
contextWindow:
|
|
5626
|
+
contextWindow: 128000,
|
|
5627
5627
|
maxTokens: 4096,
|
|
5628
5628
|
},
|
|
5629
5629
|
"mistralai/mistral-tiny": {
|