@bastani/pi-ai 0.9.71-alpha.1 → 0.9.72-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/CHANGELOG.md +64 -1
  2. package/README.md +78 -8
  3. package/dist/api/anthropic-messages.d.ts.map +1 -1
  4. package/dist/api/anthropic-messages.js +50 -10
  5. package/dist/api/anthropic-messages.js.map +1 -1
  6. package/dist/api/azure-openai-responses.d.ts.map +1 -1
  7. package/dist/api/azure-openai-responses.js +7 -2
  8. package/dist/api/azure-openai-responses.js.map +1 -1
  9. package/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  10. package/dist/api/bedrock-converse-stream.js +28 -1
  11. package/dist/api/bedrock-converse-stream.js.map +1 -1
  12. package/dist/api/bedrock-converse-stream.lazy.d.ts +7 -0
  13. package/dist/api/bedrock-converse-stream.lazy.d.ts.map +1 -1
  14. package/dist/api/bedrock-converse-stream.lazy.js +18 -5
  15. package/dist/api/bedrock-converse-stream.lazy.js.map +1 -1
  16. package/dist/api/google-generative-ai.d.ts +3 -1
  17. package/dist/api/google-generative-ai.d.ts.map +1 -1
  18. package/dist/api/google-generative-ai.js +4 -2
  19. package/dist/api/google-generative-ai.js.map +1 -1
  20. package/dist/api/google-shared.d.ts +10 -2
  21. package/dist/api/google-shared.d.ts.map +1 -1
  22. package/dist/api/google-shared.js +31 -9
  23. package/dist/api/google-shared.js.map +1 -1
  24. package/dist/api/google-vertex.d.ts +3 -1
  25. package/dist/api/google-vertex.d.ts.map +1 -1
  26. package/dist/api/google-vertex.js +4 -2
  27. package/dist/api/google-vertex.js.map +1 -1
  28. package/dist/api/lazy.d.ts +2 -2
  29. package/dist/api/lazy.d.ts.map +1 -1
  30. package/dist/api/lazy.js +10 -9
  31. package/dist/api/lazy.js.map +1 -1
  32. package/dist/api/mistral-conversations.d.ts.map +1 -1
  33. package/dist/api/mistral-conversations.js +12 -1
  34. package/dist/api/mistral-conversations.js.map +1 -1
  35. package/dist/api/openai-codex-responses.d.ts.map +1 -1
  36. package/dist/api/openai-codex-responses.js +6 -1
  37. package/dist/api/openai-codex-responses.js.map +1 -1
  38. package/dist/api/openai-completions.d.ts +2 -1
  39. package/dist/api/openai-completions.d.ts.map +1 -1
  40. package/dist/api/openai-completions.js +112 -15
  41. package/dist/api/openai-completions.js.map +1 -1
  42. package/dist/api/openai-images-options.d.ts +107 -0
  43. package/dist/api/openai-images-options.d.ts.map +1 -0
  44. package/dist/api/openai-images-options.js +106 -0
  45. package/dist/api/openai-images-options.js.map +1 -0
  46. package/dist/api/openai-images.d.ts +3 -11
  47. package/dist/api/openai-images.d.ts.map +1 -1
  48. package/dist/api/openai-images.js +117 -16
  49. package/dist/api/openai-images.js.map +1 -1
  50. package/dist/api/openai-responses-shared.js +6 -2
  51. package/dist/api/openai-responses-shared.js.map +1 -1
  52. package/dist/api/openai-responses.d.ts.map +1 -1
  53. package/dist/api/openai-responses.js +29 -7
  54. package/dist/api/openai-responses.js.map +1 -1
  55. package/dist/auth/oauth/load.d.ts.map +1 -1
  56. package/dist/auth/oauth/load.js +5 -2
  57. package/dist/auth/oauth/load.js.map +1 -1
  58. package/dist/env-api-keys.d.ts.map +1 -1
  59. package/dist/env-api-keys.js +1 -0
  60. package/dist/env-api-keys.js.map +1 -1
  61. package/dist/image-generation-error.d.ts +203 -0
  62. package/dist/image-generation-error.d.ts.map +1 -0
  63. package/dist/image-generation-error.js +441 -0
  64. package/dist/image-generation-error.js.map +1 -0
  65. package/dist/index.d.ts +4 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +4 -0
  68. package/dist/index.js.map +1 -1
  69. package/dist/lazy-bedrock-provider.d.ts +10 -0
  70. package/dist/lazy-bedrock-provider.d.ts.map +1 -0
  71. package/dist/lazy-bedrock-provider.js +13 -0
  72. package/dist/lazy-bedrock-provider.js.map +1 -0
  73. package/dist/lazy-oauth.d.ts +10 -0
  74. package/dist/lazy-oauth.d.ts.map +1 -0
  75. package/dist/lazy-oauth.js +23 -0
  76. package/dist/lazy-oauth.js.map +1 -0
  77. package/dist/models.d.ts.map +1 -1
  78. package/dist/models.generated.d.ts +4 -0
  79. package/dist/models.generated.d.ts.map +1 -1
  80. package/dist/models.generated.js +4 -0
  81. package/dist/models.generated.js.map +1 -1
  82. package/dist/models.js +8 -8
  83. package/dist/models.js.map +1 -1
  84. package/dist/providers/all.d.ts.map +1 -1
  85. package/dist/providers/all.js +2 -0
  86. package/dist/providers/all.js.map +1 -1
  87. package/dist/providers/azure.d.ts.map +1 -1
  88. package/dist/providers/azure.js +2 -2
  89. package/dist/providers/azure.js.map +1 -1
  90. package/dist/providers/compat-schema.d.ts +15 -0
  91. package/dist/providers/compat-schema.d.ts.map +1 -1
  92. package/dist/providers/compat-schema.js +19 -1
  93. package/dist/providers/compat-schema.js.map +1 -1
  94. package/dist/providers/data/.manifest.json +1 -1
  95. package/dist/providers/data/anthropic.json +1 -1
  96. package/dist/providers/data/azure.json +1 -1
  97. package/dist/providers/data/baseten.json +1 -1
  98. package/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  99. package/dist/providers/data/fireworks.json +1 -1
  100. package/dist/providers/data/github-copilot.json +1 -1
  101. package/dist/providers/data/google-vertex.json +1 -1
  102. package/dist/providers/data/google.json +1 -1
  103. package/dist/providers/data/nvidia.json +1 -1
  104. package/dist/providers/data/openai-images.json +1 -1
  105. package/dist/providers/data/opencode-go.json +1 -1
  106. package/dist/providers/data/opencode.json +1 -1
  107. package/dist/providers/data/openrouter.json +1 -1
  108. package/dist/providers/data/qwen-token-plan-individual-cn.json +1 -0
  109. package/dist/providers/data/qwen-token-plan-individual.json +1 -1
  110. package/dist/providers/data/together.json +1 -1
  111. package/dist/providers/data/vercel-ai-gateway.json +1 -1
  112. package/dist/providers/github-copilot-capabilities.d.ts +67 -0
  113. package/dist/providers/github-copilot-capabilities.d.ts.map +1 -0
  114. package/dist/providers/github-copilot-capabilities.js +81 -0
  115. package/dist/providers/github-copilot-capabilities.js.map +1 -0
  116. package/dist/providers/github-copilot-errors.d.ts +243 -0
  117. package/dist/providers/github-copilot-errors.d.ts.map +1 -0
  118. package/dist/providers/github-copilot-errors.js +720 -0
  119. package/dist/providers/github-copilot-errors.js.map +1 -0
  120. package/dist/providers/github-copilot.d.ts +1 -2
  121. package/dist/providers/github-copilot.d.ts.map +1 -1
  122. package/dist/providers/github-copilot.js +29 -4
  123. package/dist/providers/github-copilot.js.map +1 -1
  124. package/dist/providers/openai-codex.js +1 -1
  125. package/dist/providers/openai-codex.js.map +1 -1
  126. package/dist/providers/qwen-token-plan-individual-cn.d.ts +3 -0
  127. package/dist/providers/qwen-token-plan-individual-cn.d.ts.map +1 -0
  128. package/dist/providers/qwen-token-plan-individual-cn.js +15 -0
  129. package/dist/providers/qwen-token-plan-individual-cn.js.map +1 -0
  130. package/dist/providers/qwen-token-plan-individual-cn.models.d.ts +5 -0
  131. package/dist/providers/qwen-token-plan-individual-cn.models.d.ts.map +1 -0
  132. package/dist/providers/qwen-token-plan-individual-cn.models.js +8 -0
  133. package/dist/providers/qwen-token-plan-individual-cn.models.js.map +1 -0
  134. package/dist/types.d.ts +29 -3
  135. package/dist/types.d.ts.map +1 -1
  136. package/dist/types.js.map +1 -1
  137. package/dist/utils/error-body.d.ts +8 -0
  138. package/dist/utils/error-body.d.ts.map +1 -1
  139. package/dist/utils/error-body.js +28 -1
  140. package/dist/utils/error-body.js.map +1 -1
  141. package/dist/utils/model-operations.d.ts.map +1 -1
  142. package/dist/utils/model-operations.js +6 -0
  143. package/dist/utils/model-operations.js.map +1 -1
  144. package/dist/utils/overflow.d.ts +4 -0
  145. package/dist/utils/overflow.d.ts.map +1 -1
  146. package/dist/utils/overflow.js +16 -3
  147. package/dist/utils/overflow.js.map +1 -1
  148. package/dist/utils/provider-retry.d.ts +2 -0
  149. package/dist/utils/provider-retry.d.ts.map +1 -1
  150. package/dist/utils/provider-retry.js +2 -0
  151. package/dist/utils/provider-retry.js.map +1 -1
  152. package/dist/utils/retry.d.ts +3 -1
  153. package/dist/utils/retry.d.ts.map +1 -1
  154. package/dist/utils/retry.js +9 -0
  155. package/dist/utils/retry.js.map +1 -1
  156. package/dist/utils/thinking-off.d.ts +23 -0
  157. package/dist/utils/thinking-off.d.ts.map +1 -0
  158. package/dist/utils/thinking-off.js +51 -0
  159. package/dist/utils/thinking-off.js.map +1 -0
  160. package/dist/utils/version.d.ts +1 -1
  161. package/dist/utils/version.js +1 -1
  162. package/dist/utils/version.js.map +1 -1
  163. package/package.json +9 -1
@@ -71,6 +71,8 @@ export declare const OpenAICompletionsCompatSchema: Type.TObject<{
71
71
  maxTokensField: Type.TOptional<Type.TUnion<[Type.TLiteral<"max_completion_tokens">, Type.TLiteral<"max_tokens">]>>;
72
72
  requiresToolResultName: Type.TOptional<Type.TBoolean>;
73
73
  requiresAssistantAfterToolResult: Type.TOptional<Type.TBoolean>;
74
+ requiresNonNullAssistantContent: Type.TOptional<Type.TBoolean>;
75
+ requiresToolsWithToolHistory: Type.TOptional<Type.TBoolean>;
74
76
  requiresThinkingAsText: Type.TOptional<Type.TBoolean>;
75
77
  requiresReasoningContentOnAssistantMessages: Type.TOptional<Type.TBoolean>;
76
78
  thinkingFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openrouter">, Type.TLiteral<"deepseek">, Type.TLiteral<"together">, Type.TLiteral<"baseten">, Type.TLiteral<"zai">, Type.TLiteral<"qwen">, Type.TLiteral<"chat-template">, Type.TLiteral<"qwen-chat-template">, Type.TLiteral<"string-thinking">, Type.TLiteral<"ant-ling">]>>;
@@ -130,6 +132,7 @@ export declare const OpenAICompletionsCompatSchema: Type.TObject<{
130
132
  cacheControlFormat: Type.TOptional<Type.TLiteral<"anthropic">>;
131
133
  sendSessionAffinityHeaders: Type.TOptional<Type.TBoolean>;
132
134
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
135
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
133
136
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
134
137
  vllmPriority: Type.TOptional<Type.TNumber>;
135
138
  }>;
@@ -137,6 +140,7 @@ export declare const OpenAIResponsesCompatSchema: Type.TObject<{
137
140
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
138
141
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
139
142
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
143
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
140
144
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
141
145
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
142
146
  supportsOpenAIGrammarTools: Type.TOptional<Type.TBoolean>;
@@ -207,6 +211,8 @@ export declare const CompatSchemasByApi: {
207
211
  maxTokensField: Type.TOptional<Type.TUnion<[Type.TLiteral<"max_completion_tokens">, Type.TLiteral<"max_tokens">]>>;
208
212
  requiresToolResultName: Type.TOptional<Type.TBoolean>;
209
213
  requiresAssistantAfterToolResult: Type.TOptional<Type.TBoolean>;
214
+ requiresNonNullAssistantContent: Type.TOptional<Type.TBoolean>;
215
+ requiresToolsWithToolHistory: Type.TOptional<Type.TBoolean>;
210
216
  requiresThinkingAsText: Type.TOptional<Type.TBoolean>;
211
217
  requiresReasoningContentOnAssistantMessages: Type.TOptional<Type.TBoolean>;
212
218
  thinkingFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openrouter">, Type.TLiteral<"deepseek">, Type.TLiteral<"together">, Type.TLiteral<"baseten">, Type.TLiteral<"zai">, Type.TLiteral<"qwen">, Type.TLiteral<"chat-template">, Type.TLiteral<"qwen-chat-template">, Type.TLiteral<"string-thinking">, Type.TLiteral<"ant-ling">]>>;
@@ -266,6 +272,7 @@ export declare const CompatSchemasByApi: {
266
272
  cacheControlFormat: Type.TOptional<Type.TLiteral<"anthropic">>;
267
273
  sendSessionAffinityHeaders: Type.TOptional<Type.TBoolean>;
268
274
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
275
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
269
276
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
270
277
  vllmPriority: Type.TOptional<Type.TNumber>;
271
278
  }>;
@@ -273,6 +280,7 @@ export declare const CompatSchemasByApi: {
273
280
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
274
281
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
275
282
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
283
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
276
284
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
277
285
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
278
286
  supportsOpenAIGrammarTools: Type.TOptional<Type.TBoolean>;
@@ -286,6 +294,7 @@ export declare const CompatSchemasByApi: {
286
294
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
287
295
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
288
296
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
297
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
289
298
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
290
299
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
291
300
  supportsOpenAIGrammarTools: Type.TOptional<Type.TBoolean>;
@@ -299,6 +308,7 @@ export declare const CompatSchemasByApi: {
299
308
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
300
309
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
301
310
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
311
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
302
312
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
303
313
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
304
314
  supportsOpenAIGrammarTools: Type.TOptional<Type.TBoolean>;
@@ -371,6 +381,8 @@ export declare const ProviderCompatSchema: Type.TObject<MergedCompatProperties<(
371
381
  maxTokensField: Type.TOptional<Type.TUnion<[Type.TLiteral<"max_completion_tokens">, Type.TLiteral<"max_tokens">]>>;
372
382
  requiresToolResultName: Type.TOptional<Type.TBoolean>;
373
383
  requiresAssistantAfterToolResult: Type.TOptional<Type.TBoolean>;
384
+ requiresNonNullAssistantContent: Type.TOptional<Type.TBoolean>;
385
+ requiresToolsWithToolHistory: Type.TOptional<Type.TBoolean>;
374
386
  requiresThinkingAsText: Type.TOptional<Type.TBoolean>;
375
387
  requiresReasoningContentOnAssistantMessages: Type.TOptional<Type.TBoolean>;
376
388
  thinkingFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openrouter">, Type.TLiteral<"deepseek">, Type.TLiteral<"together">, Type.TLiteral<"baseten">, Type.TLiteral<"zai">, Type.TLiteral<"qwen">, Type.TLiteral<"chat-template">, Type.TLiteral<"qwen-chat-template">, Type.TLiteral<"string-thinking">, Type.TLiteral<"ant-ling">]>>;
@@ -430,12 +442,14 @@ export declare const ProviderCompatSchema: Type.TObject<MergedCompatProperties<(
430
442
  cacheControlFormat: Type.TOptional<Type.TLiteral<"anthropic">>;
431
443
  sendSessionAffinityHeaders: Type.TOptional<Type.TBoolean>;
432
444
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
445
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
433
446
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
434
447
  vllmPriority: Type.TOptional<Type.TNumber>;
435
448
  } | {
436
449
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
437
450
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
438
451
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
452
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
439
453
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
440
454
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
441
455
  supportsOpenAIGrammarTools: Type.TOptional<Type.TBoolean>;
@@ -491,6 +505,7 @@ export declare const ProviderCompatSchema: Type.TObject<MergedCompatProperties<(
491
505
  supportsDeveloperRole: Type.TOptional<Type.TBoolean>;
492
506
  supportsMidConvoSystemMessages: Type.TOptional<Type.TBoolean>;
493
507
  sessionAffinityFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"openai">, Type.TLiteral<"openai-nosession">, Type.TLiteral<"openrouter">]>>;
508
+ promptCacheKeyMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
494
509
  supportsMidConvoEffort: Type.TOptional<Type.TBoolean>;
495
510
  supportsLongCacheRetention: Type.TOptional<Type.TBoolean>;
496
511
  supportsStrictMode: Type.TOptional<Type.TBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"compat-schema.d.ts","sourceRoot":"","sources":["../../src/providers/compat-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAuB,IAAI,EAAE,MAAM,SAAS,CAAC;AAOnF,eAAO,MAAM,2BAA2B,wGAEtC,CAAC;AASH,eAAO,MAAM,8BAA8B,kIAGzC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;IAavC,CAAC;AAWH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGnC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;EAkBtC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;EAO/C,CAAC;AAUF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4KzC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EA8DvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GzC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;EAkB/B,CAAC;AAEF,eAAO,MAAM,gCAAgC;;EAS5C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;EAcjC,CAAC;AA6CF,KAAK,mBAAmB,CAAC,KAAK,IAAI,CAAC,KAAK,SAAS,OAAO,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAClG,KAAK,EAAE,MAAM,YAAY,KACrB,IAAI,GACN,YAAY,GAC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AM,wBAAwB,GAAG,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC/E,+CAA+C;AAC/C,MAAM,WAAW,iBAAkB,SAAQ,MAAM,CAAC,OAAO,uBAAuB,CAAC;CAAG;AACpF,6CAA6C;AAC7C,MAAM,WAAW,oBAAqB,SAAQ,MAAM,CAAC,OAAO,0BAA0B,CAAC;CAAG;AAC1F,mFAAmF;AACnF,MAAM,WAAW,6BAA8B,SAAQ,MAAM,CAAC,OAAO,mCAAmC,CAAC;CAAG;AAE5G,qEAAqE;AACrE,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,OAAO,6BAA6B,CAAC;CAAG;AAChG,wDAAwD;AACxD,MAAM,WAAW,qBAAsB,SAAQ,MAAM,CAAC,OAAO,2BAA2B,CAAC;CAAG;AAC5F,qEAAqE;AACrE,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,OAAO,6BAA6B,CAAC;CAAG;AAChG,wDAAwD;AACxD,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAC5E,uDAAuD;AACvD,MAAM,WAAW,0BAA2B,SAAQ,MAAM,CAAC,OAAO,gCAAgC,CAAC;CAAG;AACtG,6DAA6D;AAC7D,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,OAAO,qBAAqB,CAAC;CAAG"}
@@ -105,6 +105,9 @@ function optionalCompatBoolean(options) {
105
105
  function optionalSessionAffinityFormat(options) {
106
106
  return Type.Optional(sessionAffinityFormat(options));
107
107
  }
108
+ function optionalPromptCacheKeyMode(options) {
109
+ return Type.Optional(Type.Union([Type.Literal("auto"), Type.Literal("enabled"), Type.Literal("disabled")], options));
110
+ }
108
111
  export const OpenAICompletionsCompatSchema = Type.Object({
109
112
  supportsStore: Type.Optional(Type.Boolean({
110
113
  description: "Whether the provider supports the store field. Default: auto-detected from URL.",
@@ -138,6 +141,12 @@ export const OpenAICompletionsCompatSchema = Type.Object({
138
141
  requiresAssistantAfterToolResult: Type.Optional(Type.Boolean({
139
142
  description: "Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL.",
140
143
  })),
144
+ requiresNonNullAssistantContent: Type.Optional(Type.Boolean({
145
+ description: 'Whether replayed assistant messages with no text (e.g. tool-call-only messages) must send "" instead of null content. Default: false.',
146
+ })),
147
+ requiresToolsWithToolHistory: Type.Optional(Type.Boolean({
148
+ description: 'Whether requests without tools must send "tools": [] when the conversation contains tool calls or tool results. Needed by some proxies in front of Anthropic, such as older LiteLLM versions. Default: false, the field is omitted.',
149
+ })),
141
150
  requiresThinkingAsText: Type.Optional(Type.Boolean({
142
151
  description: "Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL.",
143
152
  })),
@@ -203,6 +212,9 @@ export const OpenAICompletionsCompatSchema = Type.Object({
203
212
  sessionAffinityFormat: optionalSessionAffinityFormat({
204
213
  description: "Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.",
205
214
  }),
215
+ promptCacheKeyMode: optionalPromptCacheKeyMode({
216
+ description: "Controls the prompt_cache_key request field. auto sends it to api.openai.com, or with long cache retention when supportsLongCacheRetention is true; enabled sends it whenever caching is active, for compatible proxies; disabled never sends it. Default: auto.",
217
+ }),
206
218
  supportsLongCacheRetention: optionalCompatBoolean({
207
219
  description: 'Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL.',
208
220
  }),
@@ -223,7 +235,10 @@ export const OpenAIResponsesCompatSchema = Type.Object({
223
235
  default: false,
224
236
  }),
225
237
  sessionAffinityFormat: optionalSessionAffinityFormat({
226
- description: "Session-affinity header format. openai sends session_id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.",
238
+ description: "Session-affinity header format. openai sends session-id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.",
239
+ }),
240
+ promptCacheKeyMode: optionalPromptCacheKeyMode({
241
+ description: "Controls the prompt_cache_key request field. auto and enabled send it whenever caching is active; disabled never sends it, for compatible proxies that reject it. Default: auto.",
227
242
  }),
228
243
  supportsLongCacheRetention: optionalCompatBoolean({
229
244
  description: 'Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models.',
@@ -363,6 +378,9 @@ const ProviderCompatPropertyOverrides = {
363
378
  sessionAffinityFormat: optionalSessionAffinityFormat({
364
379
  description: "Session-affinity header format. Defaults are API-specific or auto-detected.",
365
380
  }),
381
+ promptCacheKeyMode: optionalPromptCacheKeyMode({
382
+ description: "Controls the prompt_cache_key request field for openai-completions and openai-responses: auto keeps each API's default, enabled sends it whenever caching is active, disabled never sends it. Default: auto.",
383
+ }),
366
384
  supportsMidConvoEffort: optionalCompatBoolean({
367
385
  description: "Whether thinking level changes are sent inside the conversation instead of changing the request's effort, so a change keeps the prompt cache. Used by the anthropic-messages and openai-responses APIs.",
368
386
  default: false,
@@ -1 +1 @@
1
- {"version":3,"file":"compat-schema.js","sourceRoot":"","sources":["../../src/providers/compat-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,IAAI,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,SAAS,qBAAqB,CAAC,OAAwB;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACpH,CAAC;A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AAC;IACF,CAAC;IAED,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,EAAuD,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,oBAAoB,EAAE,6BAA6B;IACnD,kBAAkB,EAAE,2BAA2B;IAC/C,wBAAwB,EAAE,2BAA2B;IACrD,wBAAwB,EAAE,2BAA2B;IACrD,oBAAoB,EAAE,6BAA6B;IACnD,yBAAyB,EAAE,mBAAmB;IAC9C,uBAAuB,EAAE,gCAAgC;IACzD,qBAAqB,EAAE,qBAAqB;IAC5C,kCAAkC,EAAE,qBAAqB;CAChD,CAAC;AAEX,MAAM,wBAAwB,GAAG,qBAAqB,CACrD,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAClF,+BAA+B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACzE,WAAW,EAAE,6CAA6C;IAC1D,oBAAoB,EAAE,IAAI;CAC1B,CAAC,CAAC","sourcesContent":["import { type Static, type TProperties, type TSchemaOptions, Type } from \"typebox\";\nimport { ModelCostSchema } from \"./model-schema.ts\";\n\nfunction sessionAffinityFormat(options?: TSchemaOptions) {\n\treturn Type.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")], options);\n}\n\nexport const SessionAffinityFormatSchema = sessionAffinityFormat({\n\tdescription: \"Session-affinity header format used to route related requests consistently.\",\n});\n\nfunction thinkingTokenBudgetField(options?: TSchemaOptions) {\n\treturn Type.Union(\n\t\t[Type.Literal(\"thinking_token_budget\"), Type.Literal(\"thinking_budget\"), Type.Literal(\"thinking_budget_tokens\")],\n\t\toptions,\n\t);\n}\n\nexport const ThinkingTokenBudgetFieldSchema = thinkingTokenBudgetField({\n\tdescription:\n\t\t'Top-level request field name used by OpenAI-compatible endpoints to cap reasoning tokens. \"thinking_token_budget\" is used by vLLM, \"thinking_budget\" by Qwen, DashScope, or SGLang, and \"thinking_budget_tokens\" by llama.cpp.',\n});\n\nexport const ChatTemplateKwargValueSchema = Type.Union([\n\tType.String(),\n\tType.Number(),\n\tType.Boolean(),\n\tType.Null(),\n\tType.Object({\n\t\t$var: Type.Union([\n\t\t\tType.Literal(\"thinking.enabled\"),\n\t\t\tType.Literal(\"thinking.effort\"),\n\t\t\tType.Literal(\"thinking.budget\"),\n\t\t]),\n\t\tomitWhenOff: Type.Optional(Type.Boolean()),\n\t}),\n]);\n\nfunction percentileCutoffs(metric: string) {\n\treturn Type.Object({\n\t\tp50: Type.Optional(Type.Number({ description: `${metric} at the 50th percentile.` })),\n\t\tp75: Type.Optional(Type.Number({ description: `${metric} at the 75th percentile.` })),\n\t\tp90: Type.Optional(Type.Number({ description: `${metric} at the 90th percentile.` })),\n\t\tp99: Type.Optional(Type.Number({ description: `${metric} at the 99th percentile.` })),\n\t});\n}\n\nexport const OpenRouterRoutingSchema = Type.Object(\n\t{\n\t\tallow_fallbacks: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to allow backup providers to serve requests.\", default: true }),\n\t\t),\n\t\trequire_parameters: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether to filter providers to only those that support all parameters in the request.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tdata_collection: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"deny\"), Type.Literal(\"allow\")], {\n\t\t\t\tdescription:\n\t\t\t\t\t'Data collection setting. \"allow\": allow providers that may store or train on data. \"deny\": only use providers that do not collect user data.',\n\t\t\t\tdefault: \"allow\",\n\t\t\t}),\n\t\t),\n\t\tzdr: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.\" }),\n\t\t),\n\t\tenforce_distillable_text: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to restrict routing to only models that allow text distillation.\" }),\n\t\t),\n\t\torder: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t\"An ordered list of provider names or slugs to try in sequence, falling back to the next if unavailable.\",\n\t\t\t}),\n\t\t),\n\t\tonly: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription: \"List of provider names or slugs to exclusively allow for this request.\",\n\t\t\t}),\n\t\t),\n\t\tignore: Type.Optional(\n\t\t\tType.Array(Type.String(), { description: \"List of provider names or slugs to skip for this request.\" }),\n\t\t),\n\t\tquantizations: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t'A list of quantization levels to filter providers by, for example [\"fp16\", \"bf16\", \"fp8\", \"fp6\", \"int8\", \"int4\", \"fp4\", \"fp32\"].',\n\t\t\t}),\n\t\t),\n\t\tsort: Type.Optional(\n\t\t\tType.Union(\n\t\t\t\t[\n\t\t\t\t\tType.String(),\n\t\t\t\t\tType.Object({\n\t\t\t\t\t\tby: Type.Optional(\n\t\t\t\t\t\t\tType.String({ description: 'The sorting metric, such as \"price\", \"throughput\", or \"latency\".' }),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpartition: Type.Optional(\n\t\t\t\t\t\t\tType.Union([Type.String(), Type.Null()], {\n\t\t\t\t\t\t\t\tdescription: 'Partitioning strategy: \"model\" or \"none\".',\n\t\t\t\t\t\t\t\tdefault: \"model\",\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Sorting strategy. Can be a string such as \"price\", \"throughput\", or \"latency\", or an object.',\n\t\t\t\t},\n\t\t\t),\n\t\t),\n\t\tmax_price: Type.Optional(\n\t\t\tType.Object(\n\t\t\t\t{\n\t\t\t\t\tprompt: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per million prompt tokens.\" }),\n\t\t\t\t\t),\n\t\t\t\t\tcompletion: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per million completion tokens.\" }),\n\t\t\t\t\t),\n\t\t\t\t\timage: Type.Optional(Type.Union([Type.Number(), Type.String()], { description: \"Price per image.\" })),\n\t\t\t\t\taudio: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per audio unit.\" }),\n\t\t\t\t\t),\n\t\t\t\t\trequest: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per request.\" }),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{ description: \"Maximum price per million tokens in USD.\" },\n\t\t\t),\n\t\t),\n\t\tpreferred_min_throughput: Type.Optional(\n\t\t\tType.Union([Type.Number(), percentileCutoffs(\"Minimum tokens per second\")], {\n\t\t\t\tdescription: \"Preferred minimum throughput in tokens per second. A number applies to p50.\",\n\t\t\t}),\n\t\t),\n\t\tpreferred_max_latency: Type.Optional(\n\t\t\tType.Union([Type.Number(), percentileCutoffs(\"Maximum latency in seconds\")], {\n\t\t\t\tdescription: \"Preferred maximum latency in seconds. A number applies to p50.\",\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection.\",\n\t},\n);\n\nexport const VercelGatewayRoutingSchema = Type.Object(\n\t{\n\t\tonly: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t'List of provider slugs to exclusively use for this request, for example [\"bedrock\", \"anthropic\"].',\n\t\t\t}),\n\t\t),\n\t\torder: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription: 'List of provider slugs to try in order, for example [\"anthropic\", \"openai\"].',\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options.\",\n\t},\n);\n\nexport const AnthropicAllowedFallbackModelSchema = Type.Object(\n\t{\n\t\tprovider: Type.String({ minLength: 1 }),\n\t\tmodel: Type.String({ minLength: 1 }),\n\t\tcost: ModelCostSchema,\n\t},\n\t{ description: \"An Anthropic server-side refusal fallback model with local pricing metadata.\" },\n);\n\nfunction optionalCompatBoolean(options?: TSchemaOptions) {\n\treturn Type.Optional(Type.Boolean(options));\n}\n\nfunction optionalSessionAffinityFormat(options?: TSchemaOptions) {\n\treturn Type.Optional(sessionAffinityFormat(options));\n}\n\nexport const OpenAICompletionsCompatSchema = Type.Object(\n\t{\n\t\tsupportsStore: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider supports the store field. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports the developer role instead of system. Default: auto-detected from URL.\",\n\t\t}),\n\t\tsupportsReasoningEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider supports reasoning_effort. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsTemperature: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the model accepts the temperature request field. When false, the provider omits temperature and also strips temperature, top_p, and top_k from samplingParams.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (tool_choice \"required\" or a specific function). When false, the provider rejects a forced choice with an error instead of sending a request the model cannot honor. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsUsageInStreaming: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports stream_options.include_usage for token usage in streaming responses.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsFinishReason: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tmaxTokensField: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"max_completion_tokens\"), Type.Literal(\"max_tokens\")], {\n\t\t\t\tdescription: \"Which field to use for max tokens. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresToolResultName: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether tool results require the name field. Default: auto-detected from URL.\" }),\n\t\t),\n\t\trequiresAssistantAfterToolResult: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresThinkingAsText: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresReasoningContentOnAssistantMessages: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tthinkingFormat: Type.Optional(\n\t\t\tType.Union(\n\t\t\t\t[\n\t\t\t\t\tType.Literal(\"openai\"),\n\t\t\t\t\tType.Literal(\"openrouter\"),\n\t\t\t\t\tType.Literal(\"deepseek\"),\n\t\t\t\t\tType.Literal(\"together\"),\n\t\t\t\t\tType.Literal(\"baseten\"),\n\t\t\t\t\tType.Literal(\"zai\"),\n\t\t\t\t\tType.Literal(\"qwen\"),\n\t\t\t\t\tType.Literal(\"chat-template\"),\n\t\t\t\t\tType.Literal(\"qwen-chat-template\"),\n\t\t\t\t\tType.Literal(\"string-thinking\"),\n\t\t\t\t\tType.Literal(\"ant-ling\"),\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. \"openai\" uses reasoning_effort, \"openrouter\" uses reasoning.effort, \"deepseek\" uses thinking.type plus reasoning_effort when supported, \"together\" uses reasoning.enabled plus reasoning_effort when supported, \"baseten\" uses configurable chat_template_args plus reasoning_effort when supported, \"zai\" uses thinking.type, \"qwen\" uses top-level enable_thinking, \"qwen-chat-template\" uses chat_template_kwargs.enable_thinking and preserve_thinking, \"chat-template\" uses configurable chat_template_kwargs, \"string-thinking\" uses top-level thinking, and \"ant-ling\" uses reasoning.effort only when the mapped effort is non-null.',\n\t\t\t\t},\n\t\t\t),\n\t\t),\n\t\tchatTemplateKwargs: Type.Optional(\n\t\t\tType.Record(Type.String(), ChatTemplateKwargValueSchema, {\n\t\t\t\tdescription:\n\t\t\t\t\t'Kwargs sent as chat_template_kwargs when thinkingFormat is \"chat-template\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values.',\n\t\t\t}),\n\t\t),\n\t\tchatTemplateArgs: Type.Optional(\n\t\t\tType.Record(Type.String(), ChatTemplateKwargValueSchema, {\n\t\t\t\tdescription:\n\t\t\t\t\t'Arguments sent as chat_template_args when thinkingFormat is \"baseten\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values.',\n\t\t\t}),\n\t\t),\n\t\topenRouterRouting: Type.Optional(OpenRouterRoutingSchema),\n\t\tvercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema),\n\t\tzaiToolStream: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether z.ai supports top-level tool_stream for streaming tool call deltas.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tthinkingTokenBudgetField: Type.Optional(\n\t\t\tthinkingTokenBudgetField({\n\t\t\t\tdescription:\n\t\t\t\t\t'Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. \"thinking_token_budget\" is vLLM, \"thinking_budget\" is Qwen, DashScope, or SGLang, and \"thinking_budget_tokens\" is llama.cpp. Off by default and not set on the generated catalog.',\n\t\t\t}),\n\t\t),\n\t\tsupportsThinkingTokenBudget: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Alias for thinkingTokenBudgetField: \"thinking_token_budget\" (vLLM). Prefer thinkingTokenBudgetField.',\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoToolAdditions: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports the strict field in tool definitions. Generated capable models enable it explicitly.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tcacheControlFormat: Type.Optional(\n\t\t\tType.Literal(\"anthropic\", {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content.\",\n\t\t\t}),\n\t\t),\n\t\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise.\",\n\t\t}),\n\t\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\t\tdescription:\n\t\t\t\t\"Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.\",\n\t\t}),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the provider supports long prompt cache retention (prompt_cache_retention: \"24h\" or Anthropic-style cache_control.ttl: \"1h\", depending on format). Default: auto-detected from provider and URL.',\n\t\t}),\n\t\tvllmPriority: Type.Optional(\n\t\t\tType.Number({\n\t\t\t\tdescription:\n\t\t\t\t\t\"vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog.\",\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"Compatibility settings for OpenAI-compatible completions APIs. Use this to override URL-based auto-detection for custom providers.\",\n\t\tadditionalProperties: true,\n\t},\n);\n\nexport const OpenAIResponsesCompatSchema = Type.Object(\n\t{\n\t\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the provider supports the developer role instead of system.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\t\tdescription:\n\t\t\t\t\"Session-affinity header format. openai sends session_id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.\",\n\t\t}),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: \"30m\" on GPT-5.6+ and prompt_cache_retention: \"24h\" on earlier models.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly.\",\n\t\t}),\n\t\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsAdditionalTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model supports message-anchored additional_tools input items.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsToolSearch: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model supports client-executed tool search for transcript-anchored additions.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsExplicitPromptCacheMode: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMaxOutputTokens: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t},\n\t{ description: \"Compatibility settings for OpenAI Responses APIs.\", additionalProperties: true },\n);\n\nexport const AnthropicMessagesCompatSchema = Type.Object(\n\t{\n\t\tsupportsEagerToolInputStreaming: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the provider supports Anthropic long cache retention through cache_control.ttl.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to send x-session-affinity from options.sessionId when caching is enabled. Required for providers like Fireworks that use session affinity for prompt cache routing; requests to the same replica maximize cache hits. Default: true for OpenRouter endpoints, false otherwise.\",\n\t\t}),\n\t\tsessionAffinityFormat: Type.Optional(\n\t\t\tType.Literal(\"openrouter\", {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Session-affinity format. openrouter sends x-session-id; when unset, sends x-session-affinity.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsCacheControlOnTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsTemperature: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the model accepts the Anthropic temperature request field. Claude Opus 4.7+ rejects non-default values.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tforceAdaptiveThinking: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tallowEmptySignature: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether to replay empty thinking signatures instead of converting thinking to text.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsStrictTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the exact model transport supports effort-only system messages and thinking binding controls.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoToolChanges: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMessageThreads: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for provider anthropic with a baseUrl whose host is api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field.\",\n\t\t}),\n\t\tallowedFallbackModels: Type.Optional(\n\t\t\tType.Array(AnthropicAllowedFallbackModelSchema, {\n\t\t\t\tmaxItems: 3,\n\t\t\t\tdescription:\n\t\t\t\t\t\"Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets.\",\n\t\t\t}),\n\t\t),\n\t\tenforcesPreservedThinkingBinding: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether the model runs the Anthropic preserved-thinking conversation check, which rejects a request whose system prompt, tools, or earlier messages changed since a replayed thinking block was produced. When true, the provider sends the thinking-binding-controls-2026-08-01 beta header and thinking.block_binding.prefix_mismatch_behavior: \"drop_block\", so a changed prefix drops the affected thinking blocks instead of failing the request.',\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tdelegatesThinkingModelBinding: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the API adjudicates thinking-block model binding itself, always dropping a block the target model cannot read. When true, an assistant turn produced by a different model on the same provider and API replays its signed thinking and redacted_thinking blocks unchanged instead of being rewritten into plain text.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (tool_choice \"any\" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request the model is guaranteed to refuse. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for Anthropic Messages-compatible APIs.\", additionalProperties: true },\n);\n\nexport const BedrockCompatSchema = Type.Object(\n\t{\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the model supports Bedrock strict tool schemas.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (toolChoice \"any\" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request that is guaranteed to fail. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsTemperature: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the model accepts inferenceConfig.temperature. When false, the provider omits the field.\",\n\t\t\tdefault: true,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for Amazon Bedrock models.\", additionalProperties: true },\n);\n\nexport const MistralConversationsCompatSchema = Type.Object(\n\t{\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message.\",\n\t\t\tdefault: false,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for the Mistral chat API.\", additionalProperties: true },\n);\n\nexport const SystemOneCompatSchema = Type.Object(\n\t{\n\t\timageInput: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"assets\"), Type.Literal(\"images\"), Type.Literal(\"state-image-urls\")], {\n\t\t\t\tdescription:\n\t\t\t\t\t'How the service takes classifier images. \"assets\" sends TypeSafe\\'s assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. \"images\" sends Clef\\'s images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. \"state-image-urls\" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only.',\n\t\t\t}),\n\t\t),\n\t\tsendImageOptInHeader: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter.\",\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for System One classifier APIs.\", additionalProperties: true },\n);\n\nconst ProviderCompatPropertyOverrides = {\n\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\tdescription: \"Whether the provider supports the developer role instead of system. Defaults are API-specific.\",\n\t}),\n\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message.\",\n\t\tdefault: false,\n\t}),\n\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\tdescription: \"Session-affinity header format. Defaults are API-specific or auto-detected.\",\n\t}),\n\tsupportsMidConvoEffort: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether thinking level changes are sent inside the conversation instead of changing the request's effort, so a change keeps the prompt cache. Used by the anthropic-messages and openai-responses APIs.\",\n\t\tdefault: false,\n\t}),\n\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the provider supports long prompt cache retention. Defaults are API-specific or auto-detected.\",\n\t}),\n\tsupportsStrictMode: optionalCompatBoolean({\n\t\tdescription: \"Whether the provider supports strict tool schemas. Defaults are API-specific.\",\n\t}),\n\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools.\",\n\t\tdefault: false,\n\t}),\n\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\tdescription: \"Whether to send session-affinity data from options.sessionId. Defaults are API-specific.\",\n\t}),\n\tsupportsTemperature: optionalCompatBoolean({\n\t\tdescription: \"Whether the model accepts the temperature request field. Defaults to true.\",\n\t\tdefault: true,\n\t}),\n\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t'Whether the model accepts forced tool use. When false, the provider rejects a forced choice with an error. \"auto\" and \"none\" are never altered. Defaults to true.',\n\t\tdefault: true,\n\t}),\n} satisfies TProperties;\n\ntype UnionToIntersection<Union> = (Union extends unknown ? (value: Union) => void : never) extends (\n\tvalue: infer Intersection,\n) => void\n\t? Intersection\n\t: never;\n\ntype MergedCompatProperties<PropertyGroups extends readonly TProperties[], Overrides extends TProperties> = Omit<\n\tUnionToIntersection<PropertyGroups[number]>,\n\tkeyof Overrides\n> &\n\tOverrides;\n\n/**\n * Provider-level models.json compatibility is API-agnostic, so it needs one superset. Every\n * duplicate property requires explicit generic metadata, while API-specific schemas retain their\n * own defaults and descriptions.\n */\nfunction mergeCompatProperties<\n\tconst PropertyGroups extends readonly TProperties[],\n\tconst Overrides extends TProperties,\n>(propertyGroups: PropertyGroups, overrides: Overrides): MergedCompatProperties<PropertyGroups, Overrides> {\n\tconst merged: TProperties = {};\n\tconst duplicateNames = new Set<string>();\n\n\tfor (const properties of propertyGroups) {\n\t\tfor (const [name, schema] of Object.entries(properties)) {\n\t\t\tif (merged[name] !== undefined) {\n\t\t\t\tduplicateNames.add(name);\n\t\t\t\tif (!(name in overrides)) {\n\t\t\t\t\tthrow new Error(`Duplicate compatibility schema property requires an override: ${name}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmerged[name] = schema;\n\t\t}\n\t}\n\n\tfor (const name of Object.keys(overrides)) {\n\t\tif (!duplicateNames.has(name)) {\n\t\t\tthrow new Error(`Compatibility schema override does not resolve a duplicate property: ${name}`);\n\t\t}\n\t}\n\n\treturn { ...merged, ...overrides } as MergedCompatProperties<PropertyGroups, Overrides>;\n}\n\nexport const CompatSchemasByApi = {\n\t\"openai-completions\": OpenAICompletionsCompatSchema,\n\t\"openai-responses\": OpenAIResponsesCompatSchema,\n\t\"azure-openai-responses\": OpenAIResponsesCompatSchema,\n\t\"openai-codex-responses\": OpenAIResponsesCompatSchema,\n\t\"anthropic-messages\": AnthropicMessagesCompatSchema,\n\t\"bedrock-converse-stream\": BedrockCompatSchema,\n\t\"mistral-conversations\": MistralConversationsCompatSchema,\n\t\"typesafe-system-one\": SystemOneCompatSchema,\n\t\"cloudflare-workers-ai-system-one\": SystemOneCompatSchema,\n} as const;\n\nconst ProviderCompatProperties = mergeCompatProperties(\n\t[...new Set(Object.values(CompatSchemasByApi))].map((schema) => schema.properties),\n\tProviderCompatPropertyOverrides,\n);\n\nexport const ProviderCompatSchema = Type.Object(ProviderCompatProperties, {\n\tdescription: \"Provider and model compatibility overrides.\",\n\tadditionalProperties: true,\n});\n\nexport type ChatTemplateKwargValue = Static<typeof ChatTemplateKwargValueSchema>;\n/** Top-level request field used to cap reasoning tokens on OpenAI-compatible servers. */\nexport type ThinkingTokenBudgetField = Static<typeof ThinkingTokenBudgetFieldSchema>;\nexport type SessionAffinityFormat = Static<typeof SessionAffinityFormatSchema>;\n/** OpenRouter provider routing preferences. */\nexport interface OpenRouterRouting extends Static<typeof OpenRouterRoutingSchema> {}\n/** Vercel AI Gateway routing preferences. */\nexport interface VercelGatewayRouting extends Static<typeof VercelGatewayRoutingSchema> {}\n/** An Anthropic server-side refusal fallback model with local pricing metadata. */\nexport interface AnthropicAllowedFallbackModel extends Static<typeof AnthropicAllowedFallbackModelSchema> {}\n\n/** Compatibility settings for OpenAI-compatible completions APIs. */\nexport interface OpenAICompletionsCompat extends Static<typeof OpenAICompletionsCompatSchema> {}\n/** Compatibility settings for OpenAI Responses APIs. */\nexport interface OpenAIResponsesCompat extends Static<typeof OpenAIResponsesCompatSchema> {}\n/** Compatibility settings for Anthropic Messages-compatible APIs. */\nexport interface AnthropicMessagesCompat extends Static<typeof AnthropicMessagesCompatSchema> {}\n/** Compatibility settings for Amazon Bedrock models. */\nexport interface BedrockCompat extends Static<typeof BedrockCompatSchema> {}\n/** Compatibility settings for the Mistral chat API. */\nexport interface MistralConversationsCompat extends Static<typeof MistralConversationsCompatSchema> {}\n/** Compatibility settings for System One classifier APIs. */\nexport interface SystemOneCompat extends Static<typeof SystemOneCompatSchema> {}\n"]}
1
+ {"version":3,"file":"compat-schema.js","sourceRoot":"","sources":["../../src/providers/compat-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,IAAI,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,SAAS,qBAAqB,CAAC,OAAwB;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACpH,CAAC;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;IAChE,WAAW,EAAE,6EAA6E;CAC1F,CAAC,CAAC;AAEH,SAAS,wBAAwB,CAAC,OAAwB;IACzD,OAAO,IAAI,CAAC,KAAK,CAChB,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,EAChH,OAAO,CACP,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;IACtE,WAAW,EACV,gOAAgO;CACjO,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC,KAAK,CAAC;IACtD,IAAI,CAAC,MAAM,EAAE;IACb,IAAI,CAAC,MAAM,EAAE;IACb,IAAI,CAAC,OAAO,EAAE;IACd,IAAI,CAAC,IAAI,EAAE;IACX,IAAI,CAAC,MAAM,CAAC;QACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;YAChB,IAAI,CAAC,OAA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;QACjG,CAAC;IACF,CAAC;IAED,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,EAAuD,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,oBAAoB,EAAE,6BAA6B;IACnD,kBAAkB,EAAE,2BAA2B;IAC/C,wBAAwB,EAAE,2BAA2B;IACrD,wBAAwB,EAAE,2BAA2B;IACrD,oBAAoB,EAAE,6BAA6B;IACnD,yBAAyB,EAAE,mBAAmB;IAC9C,uBAAuB,EAAE,gCAAgC;IACzD,qBAAqB,EAAE,qBAAqB;IAC5C,kCAAkC,EAAE,qBAAqB;CAChD,CAAC;AAEX,MAAM,wBAAwB,GAAG,qBAAqB,CACrD,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAClF,+BAA+B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACzE,WAAW,EAAE,6CAA6C;IAC1D,oBAAoB,EAAE,IAAI;CAC1B,CAAC,CAAC","sourcesContent":["import { type Static, type TProperties, type TSchemaOptions, Type } from \"typebox\";\nimport { ModelCostSchema } from \"./model-schema.ts\";\n\nfunction sessionAffinityFormat(options?: TSchemaOptions) {\n\treturn Type.Union([Type.Literal(\"openai\"), Type.Literal(\"openai-nosession\"), Type.Literal(\"openrouter\")], options);\n}\n\nexport const SessionAffinityFormatSchema = sessionAffinityFormat({\n\tdescription: \"Session-affinity header format used to route related requests consistently.\",\n});\n\nfunction thinkingTokenBudgetField(options?: TSchemaOptions) {\n\treturn Type.Union(\n\t\t[Type.Literal(\"thinking_token_budget\"), Type.Literal(\"thinking_budget\"), Type.Literal(\"thinking_budget_tokens\")],\n\t\toptions,\n\t);\n}\n\nexport const ThinkingTokenBudgetFieldSchema = thinkingTokenBudgetField({\n\tdescription:\n\t\t'Top-level request field name used by OpenAI-compatible endpoints to cap reasoning tokens. \"thinking_token_budget\" is used by vLLM, \"thinking_budget\" by Qwen, DashScope, or SGLang, and \"thinking_budget_tokens\" by llama.cpp.',\n});\n\nexport const ChatTemplateKwargValueSchema = Type.Union([\n\tType.String(),\n\tType.Number(),\n\tType.Boolean(),\n\tType.Null(),\n\tType.Object({\n\t\t$var: Type.Union([\n\t\t\tType.Literal(\"thinking.enabled\"),\n\t\t\tType.Literal(\"thinking.effort\"),\n\t\t\tType.Literal(\"thinking.budget\"),\n\t\t]),\n\t\tomitWhenOff: Type.Optional(Type.Boolean()),\n\t}),\n]);\n\nfunction percentileCutoffs(metric: string) {\n\treturn Type.Object({\n\t\tp50: Type.Optional(Type.Number({ description: `${metric} at the 50th percentile.` })),\n\t\tp75: Type.Optional(Type.Number({ description: `${metric} at the 75th percentile.` })),\n\t\tp90: Type.Optional(Type.Number({ description: `${metric} at the 90th percentile.` })),\n\t\tp99: Type.Optional(Type.Number({ description: `${metric} at the 99th percentile.` })),\n\t});\n}\n\nexport const OpenRouterRoutingSchema = Type.Object(\n\t{\n\t\tallow_fallbacks: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to allow backup providers to serve requests.\", default: true }),\n\t\t),\n\t\trequire_parameters: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether to filter providers to only those that support all parameters in the request.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tdata_collection: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"deny\"), Type.Literal(\"allow\")], {\n\t\t\t\tdescription:\n\t\t\t\t\t'Data collection setting. \"allow\": allow providers that may store or train on data. \"deny\": only use providers that do not collect user data.',\n\t\t\t\tdefault: \"allow\",\n\t\t\t}),\n\t\t),\n\t\tzdr: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.\" }),\n\t\t),\n\t\tenforce_distillable_text: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether to restrict routing to only models that allow text distillation.\" }),\n\t\t),\n\t\torder: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t\"An ordered list of provider names or slugs to try in sequence, falling back to the next if unavailable.\",\n\t\t\t}),\n\t\t),\n\t\tonly: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription: \"List of provider names or slugs to exclusively allow for this request.\",\n\t\t\t}),\n\t\t),\n\t\tignore: Type.Optional(\n\t\t\tType.Array(Type.String(), { description: \"List of provider names or slugs to skip for this request.\" }),\n\t\t),\n\t\tquantizations: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t'A list of quantization levels to filter providers by, for example [\"fp16\", \"bf16\", \"fp8\", \"fp6\", \"int8\", \"int4\", \"fp4\", \"fp32\"].',\n\t\t\t}),\n\t\t),\n\t\tsort: Type.Optional(\n\t\t\tType.Union(\n\t\t\t\t[\n\t\t\t\t\tType.String(),\n\t\t\t\t\tType.Object({\n\t\t\t\t\t\tby: Type.Optional(\n\t\t\t\t\t\t\tType.String({ description: 'The sorting metric, such as \"price\", \"throughput\", or \"latency\".' }),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpartition: Type.Optional(\n\t\t\t\t\t\t\tType.Union([Type.String(), Type.Null()], {\n\t\t\t\t\t\t\t\tdescription: 'Partitioning strategy: \"model\" or \"none\".',\n\t\t\t\t\t\t\t\tdefault: \"model\",\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Sorting strategy. Can be a string such as \"price\", \"throughput\", or \"latency\", or an object.',\n\t\t\t\t},\n\t\t\t),\n\t\t),\n\t\tmax_price: Type.Optional(\n\t\t\tType.Object(\n\t\t\t\t{\n\t\t\t\t\tprompt: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per million prompt tokens.\" }),\n\t\t\t\t\t),\n\t\t\t\t\tcompletion: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per million completion tokens.\" }),\n\t\t\t\t\t),\n\t\t\t\t\timage: Type.Optional(Type.Union([Type.Number(), Type.String()], { description: \"Price per image.\" })),\n\t\t\t\t\taudio: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per audio unit.\" }),\n\t\t\t\t\t),\n\t\t\t\t\trequest: Type.Optional(\n\t\t\t\t\t\tType.Union([Type.Number(), Type.String()], { description: \"Price per request.\" }),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{ description: \"Maximum price per million tokens in USD.\" },\n\t\t\t),\n\t\t),\n\t\tpreferred_min_throughput: Type.Optional(\n\t\t\tType.Union([Type.Number(), percentileCutoffs(\"Minimum tokens per second\")], {\n\t\t\t\tdescription: \"Preferred minimum throughput in tokens per second. A number applies to p50.\",\n\t\t\t}),\n\t\t),\n\t\tpreferred_max_latency: Type.Optional(\n\t\t\tType.Union([Type.Number(), percentileCutoffs(\"Maximum latency in seconds\")], {\n\t\t\t\tdescription: \"Preferred maximum latency in seconds. A number applies to p50.\",\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection.\",\n\t},\n);\n\nexport const VercelGatewayRoutingSchema = Type.Object(\n\t{\n\t\tonly: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription:\n\t\t\t\t\t'List of provider slugs to exclusively use for this request, for example [\"bedrock\", \"anthropic\"].',\n\t\t\t}),\n\t\t),\n\t\torder: Type.Optional(\n\t\t\tType.Array(Type.String(), {\n\t\t\t\tdescription: 'List of provider slugs to try in order, for example [\"anthropic\", \"openai\"].',\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options.\",\n\t},\n);\n\nexport const AnthropicAllowedFallbackModelSchema = Type.Object(\n\t{\n\t\tprovider: Type.String({ minLength: 1 }),\n\t\tmodel: Type.String({ minLength: 1 }),\n\t\tcost: ModelCostSchema,\n\t},\n\t{ description: \"An Anthropic server-side refusal fallback model with local pricing metadata.\" },\n);\n\nfunction optionalCompatBoolean(options?: TSchemaOptions) {\n\treturn Type.Optional(Type.Boolean(options));\n}\n\nfunction optionalSessionAffinityFormat(options?: TSchemaOptions) {\n\treturn Type.Optional(sessionAffinityFormat(options));\n}\n\nfunction optionalPromptCacheKeyMode(options?: TSchemaOptions) {\n\treturn Type.Optional(Type.Union([Type.Literal(\"auto\"), Type.Literal(\"enabled\"), Type.Literal(\"disabled\")], options));\n}\n\nexport const OpenAICompletionsCompatSchema = Type.Object(\n\t{\n\t\tsupportsStore: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider supports the store field. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports the developer role instead of system. Default: auto-detected from URL.\",\n\t\t}),\n\t\tsupportsReasoningEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider supports reasoning_effort. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsTemperature: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the model accepts the temperature request field. When false, the provider omits temperature and also strips temperature, top_p, and top_k from samplingParams.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (tool_choice \"required\" or a specific function). When false, the provider rejects a forced choice with an error instead of sending a request the model cannot honor. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsUsageInStreaming: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports stream_options.include_usage for token usage in streaming responses.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsFinishReason: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tmaxTokensField: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"max_completion_tokens\"), Type.Literal(\"max_tokens\")], {\n\t\t\t\tdescription: \"Which field to use for max tokens. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresToolResultName: Type.Optional(\n\t\t\tType.Boolean({ description: \"Whether tool results require the name field. Default: auto-detected from URL.\" }),\n\t\t),\n\t\trequiresAssistantAfterToolResult: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresNonNullAssistantContent: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether replayed assistant messages with no text (e.g. tool-call-only messages) must send \"\" instead of null content. Default: false.',\n\t\t\t}),\n\t\t),\n\t\trequiresToolsWithToolHistory: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether requests without tools must send \"tools\": [] when the conversation contains tool calls or tool results. Needed by some proxies in front of Anthropic, such as older LiteLLM versions. Default: false, the field is omitted.',\n\t\t\t}),\n\t\t),\n\t\trequiresThinkingAsText: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\trequiresReasoningContentOnAssistantMessages: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL.\",\n\t\t\t}),\n\t\t),\n\t\tthinkingFormat: Type.Optional(\n\t\t\tType.Union(\n\t\t\t\t[\n\t\t\t\t\tType.Literal(\"openai\"),\n\t\t\t\t\tType.Literal(\"openrouter\"),\n\t\t\t\t\tType.Literal(\"deepseek\"),\n\t\t\t\t\tType.Literal(\"together\"),\n\t\t\t\t\tType.Literal(\"baseten\"),\n\t\t\t\t\tType.Literal(\"zai\"),\n\t\t\t\t\tType.Literal(\"qwen\"),\n\t\t\t\t\tType.Literal(\"chat-template\"),\n\t\t\t\t\tType.Literal(\"qwen-chat-template\"),\n\t\t\t\t\tType.Literal(\"string-thinking\"),\n\t\t\t\t\tType.Literal(\"ant-ling\"),\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. \"openai\" uses reasoning_effort, \"openrouter\" uses reasoning.effort, \"deepseek\" uses thinking.type plus reasoning_effort when supported, \"together\" uses reasoning.enabled plus reasoning_effort when supported, \"baseten\" uses configurable chat_template_args plus reasoning_effort when supported, \"zai\" uses thinking.type, \"qwen\" uses top-level enable_thinking, \"qwen-chat-template\" uses chat_template_kwargs.enable_thinking and preserve_thinking, \"chat-template\" uses configurable chat_template_kwargs, \"string-thinking\" uses top-level thinking, and \"ant-ling\" uses reasoning.effort only when the mapped effort is non-null.',\n\t\t\t\t},\n\t\t\t),\n\t\t),\n\t\tchatTemplateKwargs: Type.Optional(\n\t\t\tType.Record(Type.String(), ChatTemplateKwargValueSchema, {\n\t\t\t\tdescription:\n\t\t\t\t\t'Kwargs sent as chat_template_kwargs when thinkingFormat is \"chat-template\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values.',\n\t\t\t}),\n\t\t),\n\t\tchatTemplateArgs: Type.Optional(\n\t\t\tType.Record(Type.String(), ChatTemplateKwargValueSchema, {\n\t\t\t\tdescription:\n\t\t\t\t\t'Arguments sent as chat_template_args when thinkingFormat is \"baseten\". Use $var with \"thinking.enabled\", \"thinking.effort\", or \"thinking.budget\" for pi-controlled values.',\n\t\t\t}),\n\t\t),\n\t\topenRouterRouting: Type.Optional(OpenRouterRoutingSchema),\n\t\tvercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema),\n\t\tzaiToolStream: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether z.ai supports top-level tool_stream for streaming tool call deltas.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tthinkingTokenBudgetField: Type.Optional(\n\t\t\tthinkingTokenBudgetField({\n\t\t\t\tdescription:\n\t\t\t\t\t'Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. \"thinking_token_budget\" is vLLM, \"thinking_budget\" is Qwen, DashScope, or SGLang, and \"thinking_budget_tokens\" is llama.cpp. Off by default and not set on the generated catalog.',\n\t\t\t}),\n\t\t),\n\t\tsupportsThinkingTokenBudget: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Alias for thinkingTokenBudgetField: \"thinking_token_budget\" (vLLM). Prefer thinkingTokenBudgetField.',\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoToolAdditions: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports the strict field in tool definitions. Generated capable models enable it explicitly.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tcacheControlFormat: Type.Optional(\n\t\t\tType.Literal(\"anthropic\", {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content.\",\n\t\t\t}),\n\t\t),\n\t\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise.\",\n\t\t}),\n\t\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\t\tdescription:\n\t\t\t\t\"Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.\",\n\t\t}),\n\t\tpromptCacheKeyMode: optionalPromptCacheKeyMode({\n\t\t\tdescription:\n\t\t\t\t\"Controls the prompt_cache_key request field. auto sends it to api.openai.com, or with long cache retention when supportsLongCacheRetention is true; enabled sends it whenever caching is active, for compatible proxies; disabled never sends it. Default: auto.\",\n\t\t}),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the provider supports long prompt cache retention (prompt_cache_retention: \"24h\" or Anthropic-style cache_control.ttl: \"1h\", depending on format). Default: auto-detected from provider and URL.',\n\t\t}),\n\t\tvllmPriority: Type.Optional(\n\t\t\tType.Number({\n\t\t\t\tdescription:\n\t\t\t\t\t\"vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog.\",\n\t\t\t}),\n\t\t),\n\t},\n\t{\n\t\tdescription:\n\t\t\t\"Compatibility settings for OpenAI-compatible completions APIs. Use this to override URL-based auto-detection for custom providers.\",\n\t\tadditionalProperties: true,\n\t},\n);\n\nexport const OpenAIResponsesCompatSchema = Type.Object(\n\t{\n\t\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the provider supports the developer role instead of system.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\t\tdescription:\n\t\t\t\t\"Session-affinity header format. openai sends session-id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected.\",\n\t\t}),\n\t\tpromptCacheKeyMode: optionalPromptCacheKeyMode({\n\t\t\tdescription:\n\t\t\t\t\"Controls the prompt_cache_key request field. auto and enabled send it whenever caching is active; disabled never sends it, for compatible proxies that reject it. Default: auto.\",\n\t\t}),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: \"30m\" on GPT-5.6+ and prompt_cache_retention: \"24h\" on earlier models.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly.\",\n\t\t}),\n\t\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsAdditionalTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model supports message-anchored additional_tools input items.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsToolSearch: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model supports client-executed tool search for transcript-anchored additions.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsExplicitPromptCacheMode: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMaxOutputTokens: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t},\n\t{ description: \"Compatibility settings for OpenAI Responses APIs.\", additionalProperties: true },\n);\n\nexport const AnthropicMessagesCompatSchema = Type.Object(\n\t{\n\t\tsupportsEagerToolInputStreaming: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the provider supports Anthropic long cache retention through cache_control.ttl.\",\n\t\t\tdefault: true,\n\t\t}),\n\t\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether to send x-session-affinity from options.sessionId when caching is enabled. Required for providers like Fireworks that use session affinity for prompt cache routing; requests to the same replica maximize cache hits. Default: true for OpenRouter endpoints, false otherwise.\",\n\t\t}),\n\t\tsessionAffinityFormat: Type.Optional(\n\t\t\tType.Literal(\"openrouter\", {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Session-affinity format. openrouter sends x-session-id; when unset, sends x-session-affinity.\",\n\t\t\t}),\n\t\t),\n\t\tsupportsCacheControlOnTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tsupportsTemperature: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the model accepts the Anthropic temperature request field. Claude Opus 4.7+ rejects non-default values.\",\n\t\t\t\tdefault: true,\n\t\t\t}),\n\t\t),\n\t\tforceAdaptiveThinking: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tallowEmptySignature: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription: \"Whether to replay empty thinking signatures instead of converting thinking to text.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsStrictTools: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoEffort: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the exact model transport supports effort-only system messages and thinking binding controls.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsMidConvoToolChanges: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsMessageThreads: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for provider anthropic with a baseUrl whose host is api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field.\",\n\t\t}),\n\t\tallowedFallbackModels: Type.Optional(\n\t\t\tType.Array(AnthropicAllowedFallbackModelSchema, {\n\t\t\t\tmaxItems: 3,\n\t\t\t\tdescription:\n\t\t\t\t\t\"Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets.\",\n\t\t\t}),\n\t\t),\n\t\tenforcesPreservedThinkingBinding: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether the model runs the Anthropic preserved-thinking conversation check, which rejects a request whose system prompt, tools, or earlier messages changed since a replayed thinking block was produced. When true, the provider sends the thinking-binding-controls-2026-08-01 beta header and thinking.block_binding.prefix_mismatch_behavior: \"drop_block\", so a changed prefix drops the affected thinking blocks instead of failing the request.',\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tdelegatesThinkingModelBinding: Type.Optional(\n\t\t\tType.Boolean({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether the API adjudicates thinking-block model binding itself, always dropping a block the target model cannot read. When true, an assistant turn produced by a different model on the same provider and API replays its signed thinking and redacted_thinking blocks unchanged instead of being rewritten into plain text.\",\n\t\t\t\tdefault: false,\n\t\t\t}),\n\t\t),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (tool_choice \"any\" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request the model is guaranteed to refuse. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for Anthropic Messages-compatible APIs.\", additionalProperties: true },\n);\n\nexport const BedrockCompatSchema = Type.Object(\n\t{\n\t\tsupportsStrictMode: optionalCompatBoolean({\n\t\t\tdescription: \"Whether the model supports Bedrock strict tool schemas.\",\n\t\t\tdefault: false,\n\t\t}),\n\t\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t'Whether the model accepts forced tool use (toolChoice \"any\" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request that is guaranteed to fail. \"auto\" and \"none\" are never altered.',\n\t\t\tdefault: true,\n\t\t}),\n\t\tsupportsTemperature: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the model accepts inferenceConfig.temperature. When false, the provider omits the field.\",\n\t\t\tdefault: true,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for Amazon Bedrock models.\", additionalProperties: true },\n);\n\nexport const MistralConversationsCompatSchema = Type.Object(\n\t{\n\t\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message.\",\n\t\t\tdefault: false,\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for the Mistral chat API.\", additionalProperties: true },\n);\n\nexport const SystemOneCompatSchema = Type.Object(\n\t{\n\t\timageInput: Type.Optional(\n\t\t\tType.Union([Type.Literal(\"assets\"), Type.Literal(\"images\"), Type.Literal(\"state-image-urls\")], {\n\t\t\t\tdescription:\n\t\t\t\t\t'How the service takes classifier images. \"assets\" sends TypeSafe\\'s assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. \"images\" sends Clef\\'s images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. \"state-image-urls\" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only.',\n\t\t\t}),\n\t\t),\n\t\tsendImageOptInHeader: optionalCompatBoolean({\n\t\t\tdescription:\n\t\t\t\t\"Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter.\",\n\t\t}),\n\t},\n\t{ description: \"Compatibility settings for System One classifier APIs.\", additionalProperties: true },\n);\n\nconst ProviderCompatPropertyOverrides = {\n\tsupportsDeveloperRole: optionalCompatBoolean({\n\t\tdescription: \"Whether the provider supports the developer role instead of system. Defaults are API-specific.\",\n\t}),\n\tsupportsMidConvoSystemMessages: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message.\",\n\t\tdefault: false,\n\t}),\n\tsessionAffinityFormat: optionalSessionAffinityFormat({\n\t\tdescription: \"Session-affinity header format. Defaults are API-specific or auto-detected.\",\n\t}),\n\tpromptCacheKeyMode: optionalPromptCacheKeyMode({\n\t\tdescription:\n\t\t\t\"Controls the prompt_cache_key request field for openai-completions and openai-responses: auto keeps each API's default, enabled sends it whenever caching is active, disabled never sends it. Default: auto.\",\n\t}),\n\tsupportsMidConvoEffort: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether thinking level changes are sent inside the conversation instead of changing the request's effort, so a change keeps the prompt cache. Used by the anthropic-messages and openai-responses APIs.\",\n\t\tdefault: false,\n\t}),\n\tsupportsLongCacheRetention: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the provider supports long prompt cache retention. Defaults are API-specific or auto-detected.\",\n\t}),\n\tsupportsStrictMode: optionalCompatBoolean({\n\t\tdescription: \"Whether the provider supports strict tool schemas. Defaults are API-specific.\",\n\t}),\n\tsupportsOpenAIGrammarTools: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t\"Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools.\",\n\t\tdefault: false,\n\t}),\n\tsendSessionAffinityHeaders: optionalCompatBoolean({\n\t\tdescription: \"Whether to send session-affinity data from options.sessionId. Defaults are API-specific.\",\n\t}),\n\tsupportsTemperature: optionalCompatBoolean({\n\t\tdescription: \"Whether the model accepts the temperature request field. Defaults to true.\",\n\t\tdefault: true,\n\t}),\n\tsupportsForcedToolChoice: optionalCompatBoolean({\n\t\tdescription:\n\t\t\t'Whether the model accepts forced tool use. When false, the provider rejects a forced choice with an error. \"auto\" and \"none\" are never altered. Defaults to true.',\n\t\tdefault: true,\n\t}),\n} satisfies TProperties;\n\ntype UnionToIntersection<Union> = (Union extends unknown ? (value: Union) => void : never) extends (\n\tvalue: infer Intersection,\n) => void\n\t? Intersection\n\t: never;\n\ntype MergedCompatProperties<PropertyGroups extends readonly TProperties[], Overrides extends TProperties> = Omit<\n\tUnionToIntersection<PropertyGroups[number]>,\n\tkeyof Overrides\n> &\n\tOverrides;\n\n/**\n * Provider-level models.json compatibility is API-agnostic, so it needs one superset. Every\n * duplicate property requires explicit generic metadata, while API-specific schemas retain their\n * own defaults and descriptions.\n */\nfunction mergeCompatProperties<\n\tconst PropertyGroups extends readonly TProperties[],\n\tconst Overrides extends TProperties,\n>(propertyGroups: PropertyGroups, overrides: Overrides): MergedCompatProperties<PropertyGroups, Overrides> {\n\tconst merged: TProperties = {};\n\tconst duplicateNames = new Set<string>();\n\n\tfor (const properties of propertyGroups) {\n\t\tfor (const [name, schema] of Object.entries(properties)) {\n\t\t\tif (merged[name] !== undefined) {\n\t\t\t\tduplicateNames.add(name);\n\t\t\t\tif (!(name in overrides)) {\n\t\t\t\t\tthrow new Error(`Duplicate compatibility schema property requires an override: ${name}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmerged[name] = schema;\n\t\t}\n\t}\n\n\tfor (const name of Object.keys(overrides)) {\n\t\tif (!duplicateNames.has(name)) {\n\t\t\tthrow new Error(`Compatibility schema override does not resolve a duplicate property: ${name}`);\n\t\t}\n\t}\n\n\treturn { ...merged, ...overrides } as MergedCompatProperties<PropertyGroups, Overrides>;\n}\n\nexport const CompatSchemasByApi = {\n\t\"openai-completions\": OpenAICompletionsCompatSchema,\n\t\"openai-responses\": OpenAIResponsesCompatSchema,\n\t\"azure-openai-responses\": OpenAIResponsesCompatSchema,\n\t\"openai-codex-responses\": OpenAIResponsesCompatSchema,\n\t\"anthropic-messages\": AnthropicMessagesCompatSchema,\n\t\"bedrock-converse-stream\": BedrockCompatSchema,\n\t\"mistral-conversations\": MistralConversationsCompatSchema,\n\t\"typesafe-system-one\": SystemOneCompatSchema,\n\t\"cloudflare-workers-ai-system-one\": SystemOneCompatSchema,\n} as const;\n\nconst ProviderCompatProperties = mergeCompatProperties(\n\t[...new Set(Object.values(CompatSchemasByApi))].map((schema) => schema.properties),\n\tProviderCompatPropertyOverrides,\n);\n\nexport const ProviderCompatSchema = Type.Object(ProviderCompatProperties, {\n\tdescription: \"Provider and model compatibility overrides.\",\n\tadditionalProperties: true,\n});\n\nexport type ChatTemplateKwargValue = Static<typeof ChatTemplateKwargValueSchema>;\n/** Top-level request field used to cap reasoning tokens on OpenAI-compatible servers. */\nexport type ThinkingTokenBudgetField = Static<typeof ThinkingTokenBudgetFieldSchema>;\nexport type SessionAffinityFormat = Static<typeof SessionAffinityFormatSchema>;\n/** OpenRouter provider routing preferences. */\nexport interface OpenRouterRouting extends Static<typeof OpenRouterRoutingSchema> {}\n/** Vercel AI Gateway routing preferences. */\nexport interface VercelGatewayRouting extends Static<typeof VercelGatewayRoutingSchema> {}\n/** An Anthropic server-side refusal fallback model with local pricing metadata. */\nexport interface AnthropicAllowedFallbackModel extends Static<typeof AnthropicAllowedFallbackModelSchema> {}\n\n/** Compatibility settings for OpenAI-compatible completions APIs. */\nexport interface OpenAICompletionsCompat extends Static<typeof OpenAICompletionsCompatSchema> {}\n/** Compatibility settings for OpenAI Responses APIs. */\nexport interface OpenAIResponsesCompat extends Static<typeof OpenAIResponsesCompatSchema> {}\n/** Compatibility settings for Anthropic Messages-compatible APIs. */\nexport interface AnthropicMessagesCompat extends Static<typeof AnthropicMessagesCompatSchema> {}\n/** Compatibility settings for Amazon Bedrock models. */\nexport interface BedrockCompat extends Static<typeof BedrockCompatSchema> {}\n/** Compatibility settings for the Mistral chat API. */\nexport interface MistralConversationsCompat extends Static<typeof MistralConversationsCompatSchema> {}\n/** Compatibility settings for System One classifier APIs. */\nexport interface SystemOneCompat extends Static<typeof SystemOneCompatSchema> {}\n"]}
@@ -1 +1 @@
1
- {"schemaVersion":6,"generatedAt":"2026-11-03T22:58:25.773Z","structureHash":"71ee1bb91eb23929d2e3241786bd94c401710318da1183e00f106c8ef95712e3","files":{"amazon-bedrock.json":"91e42fa911ae81bc79e84633cfb1c9d3270e3e21e75967b22b213ccaae566741","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"f797095e492df25157b14e399ff8030b4d0a75e698f415534cc79f606cf99ffb","azure.json":"93cdf64f2da4e017a88eafdff9169b6e7016e168c1a6aaabe2b8f41da2db9f8f","baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"080e1103656fdf6a8f085eff8363db11f3c3a4cba4d20691c4b21676fcd2e5dd","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"1fcec33513611a4cdf41c5e75a905c0179edacbf156a70dc1dc4368eaacdc33f","github-copilot.json":"3da2203c87dd32d1f536b9b24ca9470a596fc4953e16447c701227fdf3a383aa","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"0e45bcd4d5a897f6f6785c0e257a9fb03691cef3ff87d9254da5daa5075468da","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"885b1c5ec4198ebe2b73518e61cbf989a7cad9229d01813635f361b29a909562","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"7e40173ee145c5e60e9789b6c3ae8fc602bf596d83879746f60cdb91f34a2d45","opencode.json":"cc66c9928b5de7a8ffb55ab062769c9d82cac2629ff48ee53747b230cf96219c","openrouter.json":"e1a695d346f47a7c2f655f1d4f26e1fca1f32c8a88f4798acce4111aa459a5e7","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"30f76070e12493603c85220164f8b356a33725e91ebfe9a79aeb954b53de90c7","xai.json":"59f8a7bdf14e79ba1b0d0a37e56251bbf100420bdac7d6af5942508fdb990f11","xiaomi-token-plan-ams.json":"bfd33741da693bdb8e8ebd4e7b90c3e90820aa18432ad081a5a98db13c6bd296","xiaomi-token-plan-cn.json":"4b61d78feae3a926fda918c3fd3a9afaf2ca60c1bba0af8270a5398fb50a983e","xiaomi-token-plan-sgp.json":"b05a197ce24fd69fc9440f4ba929984ac7a0fefbe8083268734b422e721987ec","xiaomi.json":"495b5fddf3c3ec8904fecc15c4c19536f4961dce7b51512b6909d2df2e739824","zai-coding-cn.json":"cc9e0768e726ef55d2b7af853ac5f3585dc72575932cb38840a3877d18736b78","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}}
1
+ {"schemaVersion":6,"generatedAt":"2026-11-08T06:40:47.767Z","structureHash":"b00c568d9dca2b7e226e47e18440354ccd5941ca464488dfbd20b76d18318f24","files":{"amazon-bedrock.json":"91e42fa911ae81bc79e84633cfb1c9d3270e3e21e75967b22b213ccaae566741","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"0d76d762a56e45f5ba605c0bb0bd4f4bc13e73cba8531cf4832b1665d72903c6","azure.json":"4b667155b271dc3d58dedaf62382be5172ce2f47d6cab12dc149f6b08a1385f5","baseten.json":"47d10c8050601eb88757def4fc957cdba769dacec4aeb3b0c3f39c41e442330e","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"c4671ad861ab6e7e45ec844ea513a2088a390c533dba8e8bd9a54c1a47641861","cloudflare-workers-ai.json":"0dc5eda87ff6de3ee75ee6d547a60162319bb2d51ed09b1e7d47d8ae9ef8548e","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"8a5b946e0fbfd1889570591f50a8e38bd01b19fe83135b23dca66138c3ad8f8c","github-copilot.json":"581141741866f4b334bad472229b4ded73999877d58d7748ab95c5dbe7c29118","google-vertex.json":"d8f5698a02ca594f02d9af5a8be1a45881201d097821873305ae79dc4211f147","google.json":"fa30d97f32e63794206759806d5aac0374072144a65d288611d02ccf7d56617f","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"209cdcf205961ef2ff203486da614232a86a069ebe0e98266189a14a235fac8f","kimi-coding.json":"e6d5bce9045cf533ca9e0d563a7d30a6a1ed48c89a0f539ed4c9d3ac53d4ac8b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"fa15d1f67a07046d38e191af9bd97ed922ba45a99a11af4ad281151cc6b762aa","minimax.json":"1e0459dda3858ea24151182106fc4179b95f43a0a8dffc1c3d2e7db4c2d9206e","mistral.json":"7e67f69ac2b609fca9f7b721243fb70fa6f4feade3cb20eedcd5786f9eac64f1","moonshotai-cn.json":"1a15468b1edf9205956e4c5ea41fc4cacc14eabf00523b9143e23a38264f57f7","moonshotai.json":"f31cdf2e6c81a403c4cb0e6b7e759ceff2820f966b08dbec80cfafa3f80dfc63","nvidia.json":"078fae404fc622ca6461f16a74791fedafe44976a6c3323b6ba779729823d4ff","openai-codex.json":"79856e655a4cdf5ad32f178dd001cbfda5d13e68006ad8aade0bc3636f5faabb","openai-decisions.json":"0c7d54fcbac5e7388872a85c0db7f336c5a57c82d403266e9ae04f87561daf4f","openai-images.json":"95e906730507ae8adcd49afa81fc21f7cee13c12842a71ba04ab62c59637bdb6","openai.json":"c51bffed14b4bdfb15fbffef068a9c07e973d36dd7490397d5bb7d00483752b3","opencode-go.json":"57ac9e903ba673130c11d3f50928d0019473849a261c6319e90cedda6a8321d5","opencode.json":"d20226ba8646d85a1101ce773ed6731711d32f94228652537261aaa2584bfdd1","openrouter.json":"8ed917db7c511e7a5c88a3850d3bf601a7cd7c03235f2f2500de5a2bc292852c","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual-cn.json":"4d5af1f18c8c2306b2158bda5052a9b347cce4dfa7e97245700f1c84798d1cfb","qwen-token-plan-individual.json":"3c3825ba2d19642b691b4c51c79bc93fcf501d39e9f0566d05a0f135aab8a6f6","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"b757791113c3ac1c7b43501d7b4de2ae51b7dad443e34c78650632de395bf925","together.json":"cd63c051ea61bdb210c6e826e5fc892e4c1f9c9c0ab6eb91933a0620701d17e1","typesafe.json":"938c89dfb6f636dce1483ec6acc739af4b881f61003d007807a74414eb2bf357","vercel-ai-gateway.json":"aefbd8fef0f37f3fe69fd84385d1c9008c8c50374032087af723f007a9a15df0","xai.json":"59f8a7bdf14e79ba1b0d0a37e56251bbf100420bdac7d6af5942508fdb990f11","xiaomi-token-plan-ams.json":"bfd33741da693bdb8e8ebd4e7b90c3e90820aa18432ad081a5a98db13c6bd296","xiaomi-token-plan-cn.json":"4b61d78feae3a926fda918c3fd3a9afaf2ca60c1bba0af8270a5398fb50a983e","xiaomi-token-plan-sgp.json":"b05a197ce24fd69fc9440f4ba929984ac7a0fefbe8083268734b422e721987ec","xiaomi.json":"495b5fddf3c3ec8904fecc15c4c19536f4961dce7b51512b6909d2df2e739824","zai-coding-cn.json":"cc9e0768e726ef55d2b7af853ac5f3585dc72575932cb38840a3877d18736b78","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}}
@@ -1 +1 @@
1
- {"anthropic-messages":{"chat:claude-fable-5":{"id":"claude-fable-5","name":"Claude Fable 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":10,"output":50,"cacheRead":1,"cacheWrite":12.5},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true,"allowedFallbackModels":[{"provider":"anthropic","model":"claude-opus-4-8","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}},{"provider":"anthropic","model":"claude-opus-5","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}}]},"thinkingLevelMap":{"off":null,"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-fable-5-1":{"id":"claude-fable-5-1","name":"Claude Fable 5.1","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":10,"output":50,"cacheRead":0.25,"cacheWrite":12.5},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true,"enforcesPreservedThinkingBinding":true,"supportsForcedToolChoice":false,"allowedFallbackModels":[{"provider":"anthropic","model":"claude-opus-5","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}}]},"thinkingLevelMap":{"off":null,"xhigh":"xhigh","max":"max","minimal":null},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-4-5":{"id":"claude-haiku-4-5","name":"Claude Haiku 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-4-5-20251001":{"id":"claude-haiku-4-5-20251001","name":"Claude Haiku 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-5-5":{"id":"claude-haiku-5-5","name":"Claude Haiku 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":0.1,"output":0.5,"cacheRead":0.01,"cacheWrite":0.125,"tiers":[{"inputTokensAbove":100000,"input":0.5,"output":2.5,"cacheRead":0.05,"cacheWrite":0.625}]},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max","minimal":null},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-5":{"id":"claude-opus-4-5","name":"Claude Opus 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-5-20251101":{"id":"claude-opus-4-5-20251101","name":"Claude Opus 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-6":{"id":"claude-opus-4-6","name":"Claude Opus 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-7":{"id":"claude-opus-4-7","name":"Claude Opus 4.7","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-8":{"id":"claude-opus-4-8","name":"Claude Opus 4.8","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-5":{"id":"claude-opus-5","name":"Claude Opus 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-5-5":{"id":"claude-opus-5-5","name":"Claude Opus 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":4,"output":20,"cacheRead":0.2,"cacheWrite":5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-5":{"id":"claude-sonnet-4-5","name":"Claude Sonnet 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-5-20250929":{"id":"claude-sonnet-4-5-20250929","name":"Claude Sonnet 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-6":{"id":"claude-sonnet-4-6","name":"Claude Sonnet 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-5":{"id":"claude-sonnet-5","name":"Claude Sonnet 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-5-5":{"id":"claude-sonnet-5-5","name":"Claude Sonnet 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":2.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"}}}
1
+ {"anthropic-messages":{"chat:claude-fable-5":{"id":"claude-fable-5","name":"Claude Fable 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":10,"output":50,"cacheRead":1,"cacheWrite":12.5},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true,"allowedFallbackModels":[{"provider":"anthropic","model":"claude-opus-4-8","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}},{"provider":"anthropic","model":"claude-opus-5","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}}]},"thinkingLevelMap":{"off":null,"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-fable-5-1":{"id":"claude-fable-5-1","name":"Claude Fable 5.1","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":10,"output":50,"cacheRead":0.25,"cacheWrite":12.5},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true,"enforcesPreservedThinkingBinding":true,"supportsForcedToolChoice":false,"allowedFallbackModels":[{"provider":"anthropic","model":"claude-opus-5","cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25}}]},"thinkingLevelMap":{"off":null,"xhigh":"xhigh","max":"max","minimal":null},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-4-5":{"id":"claude-haiku-4-5","name":"Claude Haiku 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-4-5-20251001":{"id":"claude-haiku-4-5-20251001","name":"Claude Haiku 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-haiku-5-5":{"id":"claude-haiku-5-5","name":"Claude Haiku 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":0.1,"output":0.5,"cacheRead":0.01,"cacheWrite":0.125,"tiers":[{"inputTokensAbove":100000,"input":0.5,"output":2.5,"cacheRead":0.05,"cacheWrite":0.625}]},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max","minimal":null},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-5":{"id":"claude-opus-4-5","name":"Claude Opus 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-5-20251101":{"id":"claude-opus-4-5-20251101","name":"Claude Opus 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-6":{"id":"claude-opus-4-6","name":"Claude Opus 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-7":{"id":"claude-opus-4-7","name":"Claude Opus 4.7","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-4-8":{"id":"claude-opus-4-8","name":"Claude Opus 4.8","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-5":{"id":"claude-opus-5","name":"Claude Opus 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-opus-5-5":{"id":"claude-opus-5-5","name":"Claude Opus 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":4,"output":20,"cacheRead":0.2,"cacheWrite":5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-5":{"id":"claude-sonnet-4-5","name":"Claude Sonnet 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-5-20250929":{"id":"claude-sonnet-4-5-20250929","name":"Claude Sonnet 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":100,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-4-6":{"id":"claude-sonnet-4-6","name":"Claude Sonnet 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-5":{"id":"claude-sonnet-5","name":"Claude Sonnet 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:claude-sonnet-5-5":{"id":"claude-sonnet-5-5","name":"Claude Sonnet 5.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image","pdf"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":2.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"off":null,"minimal":null,"low":"low","medium":"medium","high":"high","xhigh":"xhigh","max":"max"},"compat":{"supportsMidConvoEffort":true,"supportsMidConvoSystemMessages":true,"supportsMidConvoToolChanges":true,"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true,"delegatesThinkingModelBinding":true},"promptCache":{"short":300,"long":3600},"inputLimits":{"maxRequestBytes":33554432,"images":{"maxPerRequest":600,"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"}}}