@earendil-works/pi-ai 0.76.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/models.generated.d.ts +247 -66
  2. package/dist/models.generated.d.ts.map +1 -1
  3. package/dist/models.generated.js +220 -71
  4. package/dist/models.generated.js.map +1 -1
  5. package/dist/providers/amazon-bedrock.d.ts +1 -1
  6. package/dist/providers/amazon-bedrock.d.ts.map +1 -1
  7. package/dist/providers/amazon-bedrock.js +2 -2
  8. package/dist/providers/amazon-bedrock.js.map +1 -1
  9. package/dist/providers/anthropic.d.ts.map +1 -1
  10. package/dist/providers/anthropic.js +15 -8
  11. package/dist/providers/anthropic.js.map +1 -1
  12. package/dist/providers/openai-completions.d.ts.map +1 -1
  13. package/dist/providers/openai-completions.js +9 -0
  14. package/dist/providers/openai-completions.js.map +1 -1
  15. package/dist/providers/openai-responses-shared.d.ts.map +1 -1
  16. package/dist/providers/openai-responses-shared.js +4 -1
  17. package/dist/providers/openai-responses-shared.js.map +1 -1
  18. package/dist/types.d.ts +4 -2
  19. package/dist/types.d.ts.map +1 -1
  20. package/dist/types.js.map +1 -1
  21. package/dist/utils/oauth/device-code.d.ts +9 -7
  22. package/dist/utils/oauth/device-code.d.ts.map +1 -1
  23. package/dist/utils/oauth/device-code.js +8 -7
  24. package/dist/utils/oauth/device-code.js.map +1 -1
  25. package/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  26. package/dist/utils/oauth/github-copilot.js +1 -1
  27. package/dist/utils/oauth/github-copilot.js.map +1 -1
  28. package/dist/utils/oauth/index.d.ts +1 -1
  29. package/dist/utils/oauth/index.d.ts.map +1 -1
  30. package/dist/utils/oauth/index.js +1 -1
  31. package/dist/utils/oauth/index.js.map +1 -1
  32. package/dist/utils/oauth/openai-codex.d.ts +10 -1
  33. package/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  34. package/dist/utils/oauth/openai-codex.js +179 -79
  35. package/dist/utils/oauth/openai-codex.js.map +1 -1
  36. package/package.json +2 -2
@@ -157,6 +157,24 @@ export const MODELS = {
157
157
  contextWindow: 1000000,
158
158
  maxTokens: 128000,
159
159
  },
160
+ "anthropic.claude-opus-4-8": {
161
+ id: "anthropic.claude-opus-4-8",
162
+ name: "Claude Opus 4.8",
163
+ api: "bedrock-converse-stream",
164
+ provider: "amazon-bedrock",
165
+ baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
166
+ reasoning: true,
167
+ thinkingLevelMap: { "xhigh": "xhigh" },
168
+ input: ["text", "image"],
169
+ cost: {
170
+ input: 5,
171
+ output: 25,
172
+ cacheRead: 0.5,
173
+ cacheWrite: 6.25,
174
+ },
175
+ contextWindow: 1000000,
176
+ maxTokens: 128000,
177
+ },
160
178
  "anthropic.claude-sonnet-4-5-20250929-v1:0": {
161
179
  id: "anthropic.claude-sonnet-4-5-20250929-v1:0",
162
180
  name: "Claude Sonnet 4.5",
@@ -226,6 +244,24 @@ export const MODELS = {
226
244
  contextWindow: 1000000,
227
245
  maxTokens: 128000,
228
246
  },
247
+ "au.anthropic.claude-opus-4-8": {
248
+ id: "au.anthropic.claude-opus-4-8",
249
+ name: "Claude Opus 4.8 (AU)",
250
+ api: "bedrock-converse-stream",
251
+ provider: "amazon-bedrock",
252
+ baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
253
+ reasoning: true,
254
+ thinkingLevelMap: { "xhigh": "xhigh" },
255
+ input: ["text", "image"],
256
+ cost: {
257
+ input: 5,
258
+ output: 25,
259
+ cacheRead: 0.5,
260
+ cacheWrite: 6.25,
261
+ },
262
+ contextWindow: 1000000,
263
+ maxTokens: 128000,
264
+ },
229
265
  "au.anthropic.claude-sonnet-4-5-20250929-v1:0": {
230
266
  id: "au.anthropic.claude-sonnet-4-5-20250929-v1:0",
231
267
  name: "Claude Sonnet 4.5 (AU)",
@@ -381,6 +417,24 @@ export const MODELS = {
381
417
  contextWindow: 1000000,
382
418
  maxTokens: 128000,
383
419
  },
420
+ "eu.anthropic.claude-opus-4-8": {
421
+ id: "eu.anthropic.claude-opus-4-8",
422
+ name: "Claude Opus 4.8 (EU)",
423
+ api: "bedrock-converse-stream",
424
+ provider: "amazon-bedrock",
425
+ baseUrl: "https://bedrock-runtime.eu-central-1.amazonaws.com",
426
+ reasoning: true,
427
+ thinkingLevelMap: { "xhigh": "xhigh" },
428
+ input: ["text", "image"],
429
+ cost: {
430
+ input: 5,
431
+ output: 25,
432
+ cacheRead: 0.5,
433
+ cacheWrite: 6.25,
434
+ },
435
+ contextWindow: 1000000,
436
+ maxTokens: 128000,
437
+ },
384
438
  "eu.anthropic.claude-sonnet-4-5-20250929-v1:0": {
385
439
  id: "eu.anthropic.claude-sonnet-4-5-20250929-v1:0",
386
440
  name: "Claude Sonnet 4.5 (EU)",
@@ -485,6 +539,24 @@ export const MODELS = {
485
539
  contextWindow: 1000000,
486
540
  maxTokens: 128000,
487
541
  },
542
+ "global.anthropic.claude-opus-4-8": {
543
+ id: "global.anthropic.claude-opus-4-8",
544
+ name: "Claude Opus 4.8 (Global)",
545
+ api: "bedrock-converse-stream",
546
+ provider: "amazon-bedrock",
547
+ baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
548
+ reasoning: true,
549
+ thinkingLevelMap: { "xhigh": "xhigh" },
550
+ input: ["text", "image"],
551
+ cost: {
552
+ input: 5,
553
+ output: 25,
554
+ cacheRead: 0.5,
555
+ cacheWrite: 6.25,
556
+ },
557
+ contextWindow: 1000000,
558
+ maxTokens: 128000,
559
+ },
488
560
  "global.anthropic.claude-sonnet-4-5-20250929-v1:0": {
489
561
  id: "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
490
562
  name: "Claude Sonnet 4.5 (Global)",
@@ -571,6 +643,24 @@ export const MODELS = {
571
643
  contextWindow: 1000000,
572
644
  maxTokens: 128000,
573
645
  },
646
+ "jp.anthropic.claude-opus-4-8": {
647
+ id: "jp.anthropic.claude-opus-4-8",
648
+ name: "Claude Opus 4.8 (JP)",
649
+ api: "bedrock-converse-stream",
650
+ provider: "amazon-bedrock",
651
+ baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
652
+ reasoning: true,
653
+ thinkingLevelMap: { "xhigh": "xhigh" },
654
+ input: ["text", "image"],
655
+ cost: {
656
+ input: 5,
657
+ output: 25,
658
+ cacheRead: 0.5,
659
+ cacheWrite: 6.25,
660
+ },
661
+ contextWindow: 1000000,
662
+ maxTokens: 128000,
663
+ },
574
664
  "jp.anthropic.claude-sonnet-4-5-20250929-v1:0": {
575
665
  id: "jp.anthropic.claude-sonnet-4-5-20250929-v1:0",
576
666
  name: "Claude Sonnet 4.5 (JP)",
@@ -1270,6 +1360,24 @@ export const MODELS = {
1270
1360
  contextWindow: 1000000,
1271
1361
  maxTokens: 128000,
1272
1362
  },
1363
+ "us.anthropic.claude-opus-4-8": {
1364
+ id: "us.anthropic.claude-opus-4-8",
1365
+ name: "Claude Opus 4.8 (US)",
1366
+ api: "bedrock-converse-stream",
1367
+ provider: "amazon-bedrock",
1368
+ baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
1369
+ reasoning: true,
1370
+ thinkingLevelMap: { "xhigh": "xhigh" },
1371
+ input: ["text", "image"],
1372
+ cost: {
1373
+ input: 5,
1374
+ output: 25,
1375
+ cacheRead: 0.5,
1376
+ cacheWrite: 6.25,
1377
+ },
1378
+ contextWindow: 1000000,
1379
+ maxTokens: 128000,
1380
+ },
1273
1381
  "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
1274
1382
  id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
1275
1383
  name: "Claude Sonnet 4.5 (US)",
@@ -1752,6 +1860,25 @@ export const MODELS = {
1752
1860
  contextWindow: 1000000,
1753
1861
  maxTokens: 128000,
1754
1862
  },
1863
+ "claude-opus-4-8": {
1864
+ id: "claude-opus-4-8",
1865
+ name: "Claude Opus 4.8",
1866
+ api: "anthropic-messages",
1867
+ provider: "anthropic",
1868
+ baseUrl: "https://api.anthropic.com",
1869
+ compat: { "forceAdaptiveThinking": true },
1870
+ reasoning: true,
1871
+ thinkingLevelMap: { "xhigh": "xhigh" },
1872
+ input: ["text", "image"],
1873
+ cost: {
1874
+ input: 5,
1875
+ output: 25,
1876
+ cacheRead: 0.5,
1877
+ cacheWrite: 6.25,
1878
+ },
1879
+ contextWindow: 1000000,
1880
+ maxTokens: 128000,
1881
+ },
1755
1882
  "claude-sonnet-4-0": {
1756
1883
  id: "claude-sonnet-4-0",
1757
1884
  name: "Claude Sonnet 4 (latest)",
@@ -2431,7 +2558,7 @@ export const MODELS = {
2431
2558
  provider: "azure-openai-responses",
2432
2559
  baseUrl: "",
2433
2560
  reasoning: true,
2434
- thinkingLevelMap: { "off": null, "xhigh": "xhigh" },
2561
+ thinkingLevelMap: { "off": null, "xhigh": "xhigh", "minimal": null, "low": null },
2435
2562
  input: ["text", "image"],
2436
2563
  cost: {
2437
2564
  input: 30,
@@ -6757,7 +6884,7 @@ export const MODELS = {
6757
6884
  provider: "openai",
6758
6885
  baseUrl: "https://api.openai.com/v1",
6759
6886
  reasoning: true,
6760
- thinkingLevelMap: { "off": null, "xhigh": "xhigh" },
6887
+ thinkingLevelMap: { "off": null, "xhigh": "xhigh", "minimal": null, "low": null },
6761
6888
  input: ["text", "image"],
6762
6889
  cost: {
6763
6890
  input: 30,
@@ -7122,6 +7249,25 @@ export const MODELS = {
7122
7249
  contextWindow: 1000000,
7123
7250
  maxTokens: 128000,
7124
7251
  },
7252
+ "claude-opus-4-8": {
7253
+ id: "claude-opus-4-8",
7254
+ name: "Claude Opus 4.8",
7255
+ api: "anthropic-messages",
7256
+ provider: "opencode",
7257
+ baseUrl: "https://opencode.ai/zen",
7258
+ compat: { "forceAdaptiveThinking": true },
7259
+ reasoning: true,
7260
+ thinkingLevelMap: { "xhigh": "xhigh" },
7261
+ input: ["text", "image"],
7262
+ cost: {
7263
+ input: 5,
7264
+ output: 25,
7265
+ cacheRead: 0.5,
7266
+ cacheWrite: 6.25,
7267
+ },
7268
+ contextWindow: 1000000,
7269
+ maxTokens: 128000,
7270
+ },
7125
7271
  "claude-sonnet-4": {
7126
7272
  id: "claude-sonnet-4",
7127
7273
  name: "Claude Sonnet 4",
@@ -7558,7 +7704,7 @@ export const MODELS = {
7558
7704
  provider: "opencode",
7559
7705
  baseUrl: "https://opencode.ai/zen/v1",
7560
7706
  reasoning: true,
7561
- thinkingLevelMap: { "off": null, "xhigh": "xhigh" },
7707
+ thinkingLevelMap: { "off": null, "xhigh": "xhigh", "minimal": null, "low": null },
7562
7708
  input: ["text", "image"],
7563
7709
  cost: {
7564
7710
  input: 30,
@@ -7819,7 +7965,9 @@ export const MODELS = {
7819
7965
  api: "openai-completions",
7820
7966
  provider: "opencode-go",
7821
7967
  baseUrl: "https://opencode.ai/zen/go/v1",
7968
+ compat: { "thinkingFormat": "string-thinking" },
7822
7969
  reasoning: true,
7970
+ thinkingLevelMap: { "off": "none" },
7823
7971
  input: ["text", "image"],
7824
7972
  cost: {
7825
7973
  input: 0.95,
@@ -8229,6 +8377,42 @@ export const MODELS = {
8229
8377
  contextWindow: 1000000,
8230
8378
  maxTokens: 128000,
8231
8379
  },
8380
+ "anthropic/claude-opus-4.8": {
8381
+ id: "anthropic/claude-opus-4.8",
8382
+ name: "Anthropic: Claude Opus 4.8",
8383
+ api: "openai-completions",
8384
+ provider: "openrouter",
8385
+ baseUrl: "https://openrouter.ai/api/v1",
8386
+ reasoning: true,
8387
+ thinkingLevelMap: { "xhigh": "xhigh" },
8388
+ input: ["text", "image"],
8389
+ cost: {
8390
+ input: 5,
8391
+ output: 25,
8392
+ cacheRead: 0.5,
8393
+ cacheWrite: 6.25,
8394
+ },
8395
+ contextWindow: 1000000,
8396
+ maxTokens: 128000,
8397
+ },
8398
+ "anthropic/claude-opus-4.8-fast": {
8399
+ id: "anthropic/claude-opus-4.8-fast",
8400
+ name: "Anthropic: Claude Opus 4.8 (Fast)",
8401
+ api: "openai-completions",
8402
+ provider: "openrouter",
8403
+ baseUrl: "https://openrouter.ai/api/v1",
8404
+ reasoning: true,
8405
+ thinkingLevelMap: { "xhigh": "xhigh" },
8406
+ input: ["text", "image"],
8407
+ cost: {
8408
+ input: 10,
8409
+ output: 50,
8410
+ cacheRead: 1,
8411
+ cacheWrite: 12.5,
8412
+ },
8413
+ contextWindow: 1000000,
8414
+ maxTokens: 128000,
8415
+ },
8232
8416
  "anthropic/claude-sonnet-4": {
8233
8417
  id: "anthropic/claude-sonnet-4",
8234
8418
  name: "Anthropic: Claude Sonnet 4",
@@ -8626,9 +8810,9 @@ export const MODELS = {
8626
8810
  api: "openai-completions",
8627
8811
  provider: "openrouter",
8628
8812
  baseUrl: "https://openrouter.ai/api/v1",
8629
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
8813
+ compat: { "requiresReasoningContentOnAssistantMessages": true },
8630
8814
  reasoning: true,
8631
- thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8815
+ thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "xhigh" },
8632
8816
  input: ["text"],
8633
8817
  cost: {
8634
8818
  input: 0.09999999999999999,
@@ -8645,9 +8829,9 @@ export const MODELS = {
8645
8829
  api: "openai-completions",
8646
8830
  provider: "openrouter",
8647
8831
  baseUrl: "https://openrouter.ai/api/v1",
8648
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
8832
+ compat: { "requiresReasoningContentOnAssistantMessages": true },
8649
8833
  reasoning: true,
8650
- thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8834
+ thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "xhigh" },
8651
8835
  input: ["text"],
8652
8836
  cost: {
8653
8837
  input: 0,
@@ -8664,9 +8848,9 @@ export const MODELS = {
8664
8848
  api: "openai-completions",
8665
8849
  provider: "openrouter",
8666
8850
  baseUrl: "https://openrouter.ai/api/v1",
8667
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
8851
+ compat: { "requiresReasoningContentOnAssistantMessages": true },
8668
8852
  reasoning: true,
8669
- thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8853
+ thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "xhigh" },
8670
8854
  input: ["text"],
8671
8855
  cost: {
8672
8856
  input: 0.435,
@@ -10634,7 +10818,7 @@ export const MODELS = {
10634
10818
  provider: "openrouter",
10635
10819
  baseUrl: "https://openrouter.ai/api/v1",
10636
10820
  reasoning: true,
10637
- thinkingLevelMap: { "xhigh": "xhigh" },
10821
+ thinkingLevelMap: { "xhigh": "xhigh", "off": null, "minimal": null, "low": null },
10638
10822
  input: ["text", "image"],
10639
10823
  cost: {
10640
10824
  input: 30,
@@ -11912,13 +12096,13 @@ export const MODELS = {
11912
12096
  reasoning: true,
11913
12097
  input: ["text"],
11914
12098
  cost: {
11915
- input: 0.06599999999999999,
11916
- output: 0.26,
11917
- cacheRead: 0.029,
12099
+ input: 0.063,
12100
+ output: 0.21,
12101
+ cacheRead: 0.020999999999999998,
11918
12102
  cacheWrite: 0,
11919
12103
  },
11920
12104
  contextWindow: 262144,
11921
- maxTokens: 262144,
12105
+ maxTokens: 4096,
11922
12106
  },
11923
12107
  "thedrummer/rocinante-12b": {
11924
12108
  id: "thedrummer/rocinante-12b",
@@ -12151,8 +12335,8 @@ export const MODELS = {
12151
12335
  input: ["text"],
12152
12336
  cost: {
12153
12337
  input: 0.125,
12154
- output: 0.84,
12155
- cacheRead: 0,
12338
+ output: 0.85,
12339
+ cacheRead: 0.06,
12156
12340
  cacheWrite: 0,
12157
12341
  },
12158
12342
  contextWindow: 131072,
@@ -13270,6 +13454,25 @@ export const MODELS = {
13270
13454
  contextWindow: 1000000,
13271
13455
  maxTokens: 128000,
13272
13456
  },
13457
+ "anthropic/claude-opus-4.8": {
13458
+ id: "anthropic/claude-opus-4.8",
13459
+ name: "Claude Opus 4.8",
13460
+ api: "anthropic-messages",
13461
+ provider: "vercel-ai-gateway",
13462
+ baseUrl: "https://ai-gateway.vercel.sh",
13463
+ compat: { "forceAdaptiveThinking": true },
13464
+ reasoning: true,
13465
+ thinkingLevelMap: { "xhigh": "xhigh" },
13466
+ input: ["text", "image"],
13467
+ cost: {
13468
+ input: 5,
13469
+ output: 25,
13470
+ cacheRead: 0.5,
13471
+ cacheWrite: 6.25,
13472
+ },
13473
+ contextWindow: 1000000,
13474
+ maxTokens: 128000,
13475
+ },
13273
13476
  "anthropic/claude-sonnet-4": {
13274
13477
  id: "anthropic/claude-sonnet-4",
13275
13478
  name: "Claude Sonnet 4",
@@ -14870,7 +15073,7 @@ export const MODELS = {
14870
15073
  provider: "vercel-ai-gateway",
14871
15074
  baseUrl: "https://ai-gateway.vercel.sh",
14872
15075
  reasoning: true,
14873
- thinkingLevelMap: { "xhigh": "xhigh" },
15076
+ thinkingLevelMap: { "xhigh": "xhigh", "off": null, "minimal": null, "low": null },
14874
15077
  input: ["text", "image"],
14875
15078
  cost: {
14876
15079
  input: 30,
@@ -15725,24 +15928,6 @@ export const MODELS = {
15725
15928
  },
15726
15929
  },
15727
15930
  "xiaomi-token-plan-ams": {
15728
- "mimo-v2-flash": {
15729
- id: "mimo-v2-flash",
15730
- name: "MiMo-V2-Flash",
15731
- api: "openai-completions",
15732
- provider: "xiaomi-token-plan-ams",
15733
- baseUrl: "https://token-plan-ams.xiaomimimo.com/v1",
15734
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
15735
- reasoning: true,
15736
- input: ["text"],
15737
- cost: {
15738
- input: 0.1,
15739
- output: 0.3,
15740
- cacheRead: 0.01,
15741
- cacheWrite: 0,
15742
- },
15743
- contextWindow: 262144,
15744
- maxTokens: 65536,
15745
- },
15746
15931
  "mimo-v2-omni": {
15747
15932
  id: "mimo-v2-omni",
15748
15933
  name: "MiMo-V2-Omni",
@@ -15817,24 +16002,6 @@ export const MODELS = {
15817
16002
  },
15818
16003
  },
15819
16004
  "xiaomi-token-plan-cn": {
15820
- "mimo-v2-flash": {
15821
- id: "mimo-v2-flash",
15822
- name: "MiMo-V2-Flash",
15823
- api: "openai-completions",
15824
- provider: "xiaomi-token-plan-cn",
15825
- baseUrl: "https://token-plan-cn.xiaomimimo.com/v1",
15826
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
15827
- reasoning: true,
15828
- input: ["text"],
15829
- cost: {
15830
- input: 0.1,
15831
- output: 0.3,
15832
- cacheRead: 0.01,
15833
- cacheWrite: 0,
15834
- },
15835
- contextWindow: 262144,
15836
- maxTokens: 65536,
15837
- },
15838
16005
  "mimo-v2-omni": {
15839
16006
  id: "mimo-v2-omni",
15840
16007
  name: "MiMo-V2-Omni",
@@ -15909,24 +16076,6 @@ export const MODELS = {
15909
16076
  },
15910
16077
  },
15911
16078
  "xiaomi-token-plan-sgp": {
15912
- "mimo-v2-flash": {
15913
- id: "mimo-v2-flash",
15914
- name: "MiMo-V2-Flash",
15915
- api: "openai-completions",
15916
- provider: "xiaomi-token-plan-sgp",
15917
- baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1",
15918
- compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
15919
- reasoning: true,
15920
- input: ["text"],
15921
- cost: {
15922
- input: 0.1,
15923
- output: 0.3,
15924
- cacheRead: 0.01,
15925
- cacheWrite: 0,
15926
- },
15927
- contextWindow: 262144,
15928
- maxTokens: 65536,
15929
- },
15930
16079
  "mimo-v2-omni": {
15931
16080
  id: "mimo-v2-omni",
15932
16081
  name: "MiMo-V2-Omni",