@earendil-works/pi-ai 0.80.5 → 0.80.6

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 (103) hide show
  1. package/README.md +4 -2
  2. package/dist/api/anthropic-messages.d.ts.map +1 -1
  3. package/dist/api/anthropic-messages.js +7 -4
  4. package/dist/api/anthropic-messages.js.map +1 -1
  5. package/dist/api/azure-openai-responses.d.ts +1 -1
  6. package/dist/api/azure-openai-responses.d.ts.map +1 -1
  7. package/dist/api/azure-openai-responses.js.map +1 -1
  8. package/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  9. package/dist/api/bedrock-converse-stream.js +5 -4
  10. package/dist/api/bedrock-converse-stream.js.map +1 -1
  11. package/dist/api/google-generative-ai.d.ts.map +1 -1
  12. package/dist/api/google-generative-ai.js.map +1 -1
  13. package/dist/api/google-vertex.d.ts.map +1 -1
  14. package/dist/api/google-vertex.js.map +1 -1
  15. package/dist/api/openai-codex-responses.d.ts +1 -1
  16. package/dist/api/openai-codex-responses.d.ts.map +1 -1
  17. package/dist/api/openai-codex-responses.js.map +1 -1
  18. package/dist/api/openai-completions.d.ts +1 -1
  19. package/dist/api/openai-completions.d.ts.map +1 -1
  20. package/dist/api/openai-completions.js.map +1 -1
  21. package/dist/api/openai-responses-shared.d.ts.map +1 -1
  22. package/dist/api/openai-responses-shared.js +6 -4
  23. package/dist/api/openai-responses-shared.js.map +1 -1
  24. package/dist/api/openai-responses.d.ts +1 -1
  25. package/dist/api/openai-responses.d.ts.map +1 -1
  26. package/dist/api/openai-responses.js.map +1 -1
  27. package/dist/api/simple-options.d.ts +1 -1
  28. package/dist/api/simple-options.d.ts.map +1 -1
  29. package/dist/api/simple-options.js +1 -1
  30. package/dist/api/simple-options.js.map +1 -1
  31. package/dist/models.d.ts.map +1 -1
  32. package/dist/models.generated.d.ts +240 -67
  33. package/dist/models.generated.d.ts.map +1 -1
  34. package/dist/models.js +15 -6
  35. package/dist/models.js.map +1 -1
  36. package/dist/providers/amazon-bedrock.models.d.ts +62 -5
  37. package/dist/providers/amazon-bedrock.models.d.ts.map +1 -1
  38. package/dist/providers/amazon-bedrock.models.js +32 -20
  39. package/dist/providers/amazon-bedrock.models.js.map +1 -1
  40. package/dist/providers/anthropic.models.d.ts +11 -1
  41. package/dist/providers/anthropic.models.d.ts.map +1 -1
  42. package/dist/providers/anthropic.models.js +6 -4
  43. package/dist/providers/anthropic.models.js.map +1 -1
  44. package/dist/providers/azure-openai-responses.models.d.ts +3 -21
  45. package/dist/providers/azure-openai-responses.models.d.ts.map +1 -1
  46. package/dist/providers/azure-openai-responses.models.js +3 -21
  47. package/dist/providers/azure-openai-responses.models.js.map +1 -1
  48. package/dist/providers/cloudflare-ai-gateway.models.d.ts +11 -1
  49. package/dist/providers/cloudflare-ai-gateway.models.d.ts.map +1 -1
  50. package/dist/providers/cloudflare-ai-gateway.models.js +6 -4
  51. package/dist/providers/cloudflare-ai-gateway.models.js.map +1 -1
  52. package/dist/providers/deepseek.models.d.ts +2 -2
  53. package/dist/providers/deepseek.models.d.ts.map +1 -1
  54. package/dist/providers/deepseek.models.js +2 -2
  55. package/dist/providers/deepseek.models.js.map +1 -1
  56. package/dist/providers/fireworks.models.d.ts +2 -2
  57. package/dist/providers/fireworks.models.d.ts.map +1 -1
  58. package/dist/providers/fireworks.models.js +2 -2
  59. package/dist/providers/fireworks.models.js.map +1 -1
  60. package/dist/providers/github-copilot.models.d.ts +8 -2
  61. package/dist/providers/github-copilot.models.d.ts.map +1 -1
  62. package/dist/providers/github-copilot.models.js +5 -4
  63. package/dist/providers/github-copilot.models.js.map +1 -1
  64. package/dist/providers/openai-codex.models.d.ts +38 -0
  65. package/dist/providers/openai-codex.models.d.ts.map +1 -1
  66. package/dist/providers/openai-codex.models.js +14 -9
  67. package/dist/providers/openai-codex.models.js.map +1 -1
  68. package/dist/providers/openai.models.d.ts +52 -21
  69. package/dist/providers/openai.models.d.ts.map +1 -1
  70. package/dist/providers/openai.models.js +13 -24
  71. package/dist/providers/openai.models.js.map +1 -1
  72. package/dist/providers/opencode-go.models.d.ts +3 -3
  73. package/dist/providers/opencode-go.models.d.ts.map +1 -1
  74. package/dist/providers/opencode-go.models.js +3 -3
  75. package/dist/providers/opencode-go.models.js.map +1 -1
  76. package/dist/providers/opencode.models.d.ts +14 -4
  77. package/dist/providers/opencode.models.d.ts.map +1 -1
  78. package/dist/providers/opencode.models.js +9 -7
  79. package/dist/providers/opencode.models.js.map +1 -1
  80. package/dist/providers/openrouter.models.d.ts +20 -1
  81. package/dist/providers/openrouter.models.d.ts.map +1 -1
  82. package/dist/providers/openrouter.models.js +24 -22
  83. package/dist/providers/openrouter.models.js.map +1 -1
  84. package/dist/providers/vercel-ai-gateway.models.d.ts +12 -2
  85. package/dist/providers/vercel-ai-gateway.models.d.ts.map +1 -1
  86. package/dist/providers/vercel-ai-gateway.models.js +8 -6
  87. package/dist/providers/vercel-ai-gateway.models.js.map +1 -1
  88. package/dist/providers/zai-coding-cn.models.d.ts +1 -1
  89. package/dist/providers/zai-coding-cn.models.d.ts.map +1 -1
  90. package/dist/providers/zai-coding-cn.models.js +1 -1
  91. package/dist/providers/zai-coding-cn.models.js.map +1 -1
  92. package/dist/providers/zai.models.d.ts +1 -1
  93. package/dist/providers/zai.models.d.ts.map +1 -1
  94. package/dist/providers/zai.models.js +1 -1
  95. package/dist/providers/zai.models.js.map +1 -1
  96. package/dist/types.d.ts +16 -7
  97. package/dist/types.d.ts.map +1 -1
  98. package/dist/types.js.map +1 -1
  99. package/dist/utils/estimate.d.ts +3 -3
  100. package/dist/utils/estimate.d.ts.map +1 -1
  101. package/dist/utils/estimate.js +17 -9
  102. package/dist/utils/estimate.js.map +1 -1
  103. package/package.json +1 -1
@@ -279,7 +279,7 @@ export const OPENROUTER_MODELS = {
279
279
  baseUrl: "https://openrouter.ai/api/v1",
280
280
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
281
281
  reasoning: true,
282
- thinkingLevelMap: { "xhigh": "max" },
282
+ thinkingLevelMap: { "max": "max" },
283
283
  input: ["text", "image"],
284
284
  cost: {
285
285
  input: 5,
@@ -298,7 +298,7 @@ export const OPENROUTER_MODELS = {
298
298
  baseUrl: "https://openrouter.ai/api/v1",
299
299
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
300
300
  reasoning: true,
301
- thinkingLevelMap: { "xhigh": "xhigh" },
301
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
302
302
  input: ["text", "image"],
303
303
  cost: {
304
304
  input: 5,
@@ -317,7 +317,7 @@ export const OPENROUTER_MODELS = {
317
317
  baseUrl: "https://openrouter.ai/api/v1",
318
318
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
319
319
  reasoning: true,
320
- thinkingLevelMap: { "xhigh": "xhigh" },
320
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
321
321
  input: ["text", "image"],
322
322
  cost: {
323
323
  input: 30,
@@ -336,7 +336,7 @@ export const OPENROUTER_MODELS = {
336
336
  baseUrl: "https://openrouter.ai/api/v1",
337
337
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
338
338
  reasoning: true,
339
- thinkingLevelMap: { "xhigh": "xhigh" },
339
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
340
340
  input: ["text", "image"],
341
341
  cost: {
342
342
  input: 5,
@@ -355,7 +355,7 @@ export const OPENROUTER_MODELS = {
355
355
  baseUrl: "https://openrouter.ai/api/v1",
356
356
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
357
357
  reasoning: true,
358
- thinkingLevelMap: { "xhigh": "xhigh" },
358
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
359
359
  input: ["text", "image"],
360
360
  cost: {
361
361
  input: 10,
@@ -410,6 +410,7 @@ export const OPENROUTER_MODELS = {
410
410
  baseUrl: "https://openrouter.ai/api/v1",
411
411
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
412
412
  reasoning: true,
413
+ thinkingLevelMap: { "max": "max" },
413
414
  input: ["text", "image"],
414
415
  cost: {
415
416
  input: 3,
@@ -428,6 +429,7 @@ export const OPENROUTER_MODELS = {
428
429
  baseUrl: "https://openrouter.ai/api/v1",
429
430
  compat: { "thinkingFormat": "openrouter", "cacheControlFormat": "anthropic" },
430
431
  reasoning: true,
432
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
431
433
  input: ["text", "image"],
432
434
  cost: {
433
435
  input: 2,
@@ -788,7 +790,7 @@ export const OPENROUTER_MODELS = {
788
790
  baseUrl: "https://openrouter.ai/api/v1",
789
791
  compat: { "supportsDeveloperRole": false, "thinkingFormat": "openrouter", "requiresReasoningContentOnAssistantMessages": true },
790
792
  reasoning: true,
791
- thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "xhigh" },
793
+ thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "max": null, "xhigh": "xhigh" },
792
794
  input: ["text"],
793
795
  cost: {
794
796
  input: 0.09,
@@ -807,7 +809,7 @@ export const OPENROUTER_MODELS = {
807
809
  baseUrl: "https://openrouter.ai/api/v1",
808
810
  compat: { "supportsDeveloperRole": false, "thinkingFormat": "openrouter", "requiresReasoningContentOnAssistantMessages": true },
809
811
  reasoning: true,
810
- thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "xhigh" },
812
+ thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "max": null, "xhigh": "xhigh" },
811
813
  input: ["text"],
812
814
  cost: {
813
815
  input: 0.435,
@@ -1483,7 +1485,7 @@ export const OPENROUTER_MODELS = {
1483
1485
  cacheWrite: 0,
1484
1486
  },
1485
1487
  contextWindow: 1048576,
1486
- maxTokens: 512000,
1488
+ maxTokens: 131072,
1487
1489
  },
1488
1490
  "mistralai/codestral-2508": {
1489
1491
  id: "mistralai/codestral-2508",
@@ -1873,9 +1875,9 @@ export const OPENROUTER_MODELS = {
1873
1875
  reasoning: true,
1874
1876
  input: ["text", "image"],
1875
1877
  cost: {
1876
- input: 0.65,
1878
+ input: 0.66,
1877
1879
  output: 3.41,
1878
- cacheRead: 0.14,
1880
+ cacheRead: 0.15,
1879
1881
  cacheWrite: 0,
1880
1882
  },
1881
1883
  contextWindow: 262144,
@@ -2801,7 +2803,7 @@ export const OPENROUTER_MODELS = {
2801
2803
  baseUrl: "https://openrouter.ai/api/v1",
2802
2804
  compat: { "thinkingFormat": "openrouter" },
2803
2805
  reasoning: true,
2804
- thinkingLevelMap: { "xhigh": "xhigh" },
2806
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2805
2807
  input: ["text", "image"],
2806
2808
  cost: {
2807
2809
  input: 1,
@@ -2820,7 +2822,7 @@ export const OPENROUTER_MODELS = {
2820
2822
  baseUrl: "https://openrouter.ai/api/v1",
2821
2823
  compat: { "thinkingFormat": "openrouter" },
2822
2824
  reasoning: true,
2823
- thinkingLevelMap: { "xhigh": "xhigh" },
2825
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2824
2826
  input: ["text", "image"],
2825
2827
  cost: {
2826
2828
  input: 1,
@@ -2839,7 +2841,7 @@ export const OPENROUTER_MODELS = {
2839
2841
  baseUrl: "https://openrouter.ai/api/v1",
2840
2842
  compat: { "thinkingFormat": "openrouter" },
2841
2843
  reasoning: true,
2842
- thinkingLevelMap: { "xhigh": "xhigh" },
2844
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2843
2845
  input: ["text", "image"],
2844
2846
  cost: {
2845
2847
  input: 5,
@@ -2858,7 +2860,7 @@ export const OPENROUTER_MODELS = {
2858
2860
  baseUrl: "https://openrouter.ai/api/v1",
2859
2861
  compat: { "thinkingFormat": "openrouter" },
2860
2862
  reasoning: true,
2861
- thinkingLevelMap: { "xhigh": "xhigh" },
2863
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2862
2864
  input: ["text", "image"],
2863
2865
  cost: {
2864
2866
  input: 5,
@@ -2877,7 +2879,7 @@ export const OPENROUTER_MODELS = {
2877
2879
  baseUrl: "https://openrouter.ai/api/v1",
2878
2880
  compat: { "thinkingFormat": "openrouter" },
2879
2881
  reasoning: true,
2880
- thinkingLevelMap: { "xhigh": "xhigh" },
2882
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2881
2883
  input: ["text", "image"],
2882
2884
  cost: {
2883
2885
  input: 2.5,
@@ -2896,7 +2898,7 @@ export const OPENROUTER_MODELS = {
2896
2898
  baseUrl: "https://openrouter.ai/api/v1",
2897
2899
  compat: { "thinkingFormat": "openrouter" },
2898
2900
  reasoning: true,
2899
- thinkingLevelMap: { "xhigh": "xhigh" },
2901
+ thinkingLevelMap: { "xhigh": "xhigh", "max": "max" },
2900
2902
  input: ["text", "image"],
2901
2903
  cost: {
2902
2904
  input: 2.5,
@@ -4682,13 +4684,13 @@ export const OPENROUTER_MODELS = {
4682
4684
  thinkingLevelMap: { "xhigh": "xhigh" },
4683
4685
  input: ["text"],
4684
4686
  cost: {
4685
- input: 0.54,
4686
- output: 1.76,
4687
- cacheRead: 0.1,
4687
+ input: 0.532,
4688
+ output: 1.672,
4689
+ cacheRead: 0.0988,
4688
4690
  cacheWrite: 0,
4689
4691
  },
4690
4692
  contextWindow: 1048576,
4691
- maxTokens: 101376,
4693
+ maxTokens: 131072,
4692
4694
  },
4693
4695
  "z-ai/glm-5v-turbo": {
4694
4696
  id: "z-ai/glm-5v-turbo",
@@ -4826,9 +4828,9 @@ export const OPENROUTER_MODELS = {
4826
4828
  reasoning: true,
4827
4829
  input: ["text", "image"],
4828
4830
  cost: {
4829
- input: 0.65,
4831
+ input: 0.66,
4830
4832
  output: 3.41,
4831
- cacheRead: 0.14,
4833
+ cacheRead: 0.15,
4832
4834
  cacheWrite: 0,
4833
4835
  },
4834
4836
  contextWindow: 262144,