9router 0.5.111 → 0.5.112

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 (509) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +1 -1
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  86. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  87. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  88. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  328. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  330. package/app/.next-cli-build/server/app/callback.html +1 -1
  331. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  332. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  333. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
  335. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
  337. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  338. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
  339. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  340. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  341. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +3 -3
  342. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
  343. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +3 -3
  344. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  346. package/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
  347. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
  348. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
  349. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  351. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
  352. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  353. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
  354. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
  357. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
  358. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
  359. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +3 -3
  362. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
  363. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +3 -3
  364. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
  367. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
  368. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
  369. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  371. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
  372. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
  373. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
  374. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
  377. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
  378. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
  379. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
  382. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
  383. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
  384. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
  387. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
  388. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
  392. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  393. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
  394. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  400. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  401. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
  403. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
  405. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
  406. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
  407. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
  411. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
  415. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
  416. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
  417. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/usage.rsc +3 -3
  420. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
  421. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +3 -3
  422. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  424. package/app/.next-cli-build/server/app/dashboard.rsc +3 -3
  425. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
  426. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
  427. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/index.html +1 -1
  430. package/app/.next-cli-build/server/app/index.rsc +3 -3
  431. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  432. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  433. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  435. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  437. package/app/.next-cli-build/server/app/landing.html +1 -1
  438. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  439. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  440. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
  442. package/app/.next-cli-build/server/app/login/page.js +1 -1
  443. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/login.html +1 -1
  446. package/app/.next-cli-build/server/app/login.rsc +3 -3
  447. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  448. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  450. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/page.js +1 -1
  452. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app-paths-manifest.json +1 -1
  455. package/app/.next-cli-build/server/chunks/1051.js +1 -1
  456. package/app/.next-cli-build/server/chunks/1356.js +1 -1
  457. package/app/.next-cli-build/server/chunks/2365.js +1 -1
  458. package/app/.next-cli-build/server/chunks/2380.js +3 -3
  459. package/app/.next-cli-build/server/chunks/24.js +1 -1
  460. package/app/.next-cli-build/server/chunks/2598.js +1 -1
  461. package/app/.next-cli-build/server/chunks/3697.js +1 -1
  462. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  463. package/app/.next-cli-build/server/chunks/412.js +1 -1
  464. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  465. package/app/.next-cli-build/server/chunks/4279.js +1 -1
  466. package/app/.next-cli-build/server/chunks/4480.js +1 -0
  467. package/app/.next-cli-build/server/chunks/5330.js +21 -21
  468. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  469. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  470. package/app/.next-cli-build/server/chunks/615.js +1 -1
  471. package/app/.next-cli-build/server/chunks/6690.js +1 -0
  472. package/app/.next-cli-build/server/chunks/6724.js +1 -1
  473. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  474. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  475. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  476. package/app/.next-cli-build/server/chunks/7373.js +1 -1
  477. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  478. package/app/.next-cli-build/server/chunks/8128.js +1 -0
  479. package/app/.next-cli-build/server/chunks/8251.js +1 -1
  480. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  481. package/app/.next-cli-build/server/chunks/8402.js +1 -1
  482. package/app/.next-cli-build/server/chunks/{7786.js → 8499.js} +1 -1
  483. package/app/.next-cli-build/server/chunks/8623.js +1 -1
  484. package/app/.next-cli-build/server/chunks/869.js +1 -1
  485. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  486. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  487. package/app/.next-cli-build/server/chunks/9128.js +1 -1
  488. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  489. package/app/.next-cli-build/server/chunks/9604.js +1 -1
  490. package/app/.next-cli-build/server/instrumentation.js +1 -1
  491. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  493. package/app/.next-cli-build/server/middleware.js +1 -1
  494. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/pages/404.html +1 -1
  496. package/app/.next-cli-build/server/pages/500.html +1 -1
  497. package/app/.next-cli-build/static/chunks/1321-02944667ec55f586.js +1 -0
  498. package/app/.next-cli-build/static/chunks/{5497-09541f53986a9e0d.js → 5497-870732fd9d818574.js} +1 -1
  499. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9897bc47dce7e8f.js +27 -0
  500. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  501. package/app/package.json +1 -1
  502. package/app/public/providers/nace.png +0 -0
  503. package/package.json +1 -1
  504. package/app/.next-cli-build/server/chunks/618.js +0 -1
  505. package/app/.next-cli-build/server/chunks/7918.js +0 -1
  506. package/app/.next-cli-build/static/chunks/1321-337f26c35a89cccd.js +0 -1
  507. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-bcda8e5062f1ebc9.js +0 -27
  508. /package/app/.next-cli-build/static/{tTnLO7OGDvjEJ5mfmRKqj → Mwpv7kpqnhzp2SJMtsIA1}/_buildManifest.js +0 -0
  509. /package/app/.next-cli-build/static/{tTnLO7OGDvjEJ5mfmRKqj → Mwpv7kpqnhzp2SJMtsIA1}/_ssgManifest.js +0 -0
@@ -6,4 +6,4 @@ data: ${JSON.stringify(a)}
6
6
 
7
7
  `:`data: ${JSON.stringify(a)}
8
8
 
9
- `}function o(a,b,c){let{error:e}=(0,f.xJ)(a,b),i=c===d.h.CLAUDE?n({type:"error",error:e},d.h.CLAUDE):n({error:e},c)+g.$U;return h.encode(i)}},13371:(a,b,c)=>{c.d(b,{PV:()=>f,eI:()=>g,kz:()=>d,mD:()=>e});let d={CONTENT_BLOCK_START:"content_block_start",CONTENT_BLOCK_DELTA:"content_block_delta",MESSAGE_DELTA:"message_delta"},e={TEXT:"text_delta",INPUT_JSON:"input_json_delta"},f="response.",g={OUTPUT_ITEM_ADDED:"response.output_item.added",OUTPUT_ITEM_DONE:"response.output_item.done",OUTPUT_TEXT_DELTA:"response.output_text.delta",OUTPUT_TEXT_DONE:"response.output_text.done",FUNCTION_CALL_ARGUMENTS_DELTA:"response.function_call_arguments.delta",CUSTOM_TOOL_CALL_INPUT_DELTA:"response.custom_tool_call_input.delta",COMPLETED:"response.completed",INCOMPLETE:"response.incomplete",FAILED:"response.failed"}},17242:(a,b,c)=>{c.d(b,{C5:()=>k,SF:()=>j,dV:()=>l,eG:()=>f,fH:()=>i});var d=c(14170);let e=/^[a-zA-Z0-9_-]+$/;function f(a){return void 0===a?`call_${Date.now()}`:`call_${a}_${Date.now()}`}function g(a=0,b=0,c=""){let d=c?`_${c.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";return`call_msg${a}_tc${b}${d}`}function h(a){if(!a||"string"!=typeof a)return null;let b=a.replace(/[^a-zA-Z0-9_-]/g,"");return b.length>0?b:null}function i(a){if(!a.messages||!Array.isArray(a.messages))return a;for(let b=0;b<a.messages.length;b++){let c=a.messages[b];if("assistant"===c.role&&c.tool_calls&&Array.isArray(c.tool_calls))for(let a=0;a<c.tool_calls.length;a++){let d=c.tool_calls[a];if(!d.id||!e.test(d.id)){let c=h(d.id);d.id=c||g(b,a,d.function?.name)}d.type||(d.type="function"),d.function?.arguments&&"string"!=typeof d.function.arguments&&(d.function.arguments=JSON.stringify(d.function.arguments))}if("tool"===c.role&&c.tool_call_id&&!e.test(c.tool_call_id)){let a=h(c.tool_call_id);c.tool_call_id=a||g(b,0)}if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let d=c.content[a];if("tool_use"===d.type&&d.id&&!e.test(d.id)){let c=h(d.id);d.id=c||g(b,a,d.name)}if("tool_result"===d.type&&d.tool_use_id&&!e.test(d.tool_use_id)){let c=h(d.tool_use_id);d.tool_use_id=c||g(b,a)}}}return a}function j(a){if(!a.messages||!Array.isArray(a.messages))return a;let b=[];for(let c=0;c<a.messages.length;c++){let d=a.messages[c],e=a.messages[c+1];b.push(d);let f=function(a){if("assistant"!==a.role)return[];let b=[];if(a.tool_calls&&Array.isArray(a.tool_calls))for(let c of a.tool_calls)c.id&&b.push(c.id);if(Array.isArray(a.content))for(let c of a.content)"tool_use"===c.type&&c.id&&b.push(c.id);return b}(d);if(0!==f.length&&e&&!function(a,b){if(!a||!b.length)return!1;if("tool"===a.role&&a.tool_call_id)return b.includes(a.tool_call_id);if("user"===a.role&&Array.isArray(a.content)){for(let c of a.content)if("tool_result"===c.type&&b.includes(c.tool_use_id))return!0}return!1}(e,f))for(let a of f)b.push({role:"tool",tool_call_id:a,content:""})}return a.messages=b,a}function k(a){return Array.isArray(a)?a.map(a=>a?.type?a:{...a,type:"custom"}):a}function l(a,b,c,e){return b===d.h.CLAUDE&&Array.isArray(c)&&e?.[a]?.quirks?.requireClaudeToolType===!0}},19804:(a,b,c)=>{c.d(b,{Du:()=>g,R4:()=>f,m8:()=>h,x4:()=>d,zh:()=>e});let d={TEXT:"text",IMAGE_URL:"image_url",IMAGE:"image",INPUT_AUDIO:"input_audio",AUDIO_URL:"audio_url",FILE:"file",FUNCTION:"function"},e={TOOL_CALL:"tool-call",TOOL_RESULT:"tool-result"},f={TEXT:"text",IMAGE:"image",DOCUMENT:"document",TOOL_USE:"tool_use",TOOL_RESULT:"tool_result",CONTAINER_UPLOAD:"container_upload",THINKING:"thinking",REDACTED_THINKING:"redacted_thinking",SERVER_TOOL_USE:"server_tool_use",WEB_SEARCH_TOOL_RESULT:"web_search_tool_result"},g={MESSAGE:"message",FUNCTION_CALL:"function_call",FUNCTION_CALL_OUTPUT:"function_call_output",CUSTOM_TOOL_CALL:"custom_tool_call",CUSTOM_TOOL_CALL_OUTPUT:"custom_tool_call_output",ADDITIONAL_TOOLS:"additional_tools",REASONING:"reasoning",OUTPUT_TEXT:"output_text",INPUT_TEXT:"input_text",INPUT_IMAGE:"input_image",SUMMARY_TEXT:"summary_text"},h=[d.TEXT,d.IMAGE_URL,d.IMAGE,d.INPUT_AUDIO,d.AUDIO_URL,d.FILE];d.TEXT,d.IMAGE_URL,d.IMAGE,f.TOOL_RESULT},26922:(a,b,c)=>{c.d(b,{$J:()=>s,KZ:()=>l,S6:()=>i,Yr:()=>p,f6:()=>m,fc:()=>h,kU:()=>j,pT:()=>k,w_:()=>n});var d=c(62842),e=c(43698),f=c(24);let g=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","minItems","maxItems","format","multipleOf","uniqueItems","contains","unevaluatedProperties","unevaluatedItems","contentSchema","prefixItems","additionalItems","default","examples","$schema","$defs","definitions","const","$ref","$comment","deprecated","readOnly","writeOnly","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","optional","deprecated","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor","errorMessage","errorMessages","x-errorMessage","x-errorMessages","markdownDescription","x-intellij-html-description","x-taplo-info","x-taplo","doNotSuggest","suggestSortText","minProperties","maxProperties"],h=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function i(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if(c.type===e.x4.TEXT)b.push({text:c.text});else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if(c.type===e.x4.INPUT_AUDIO&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if(c.type===e.x4.AUDIO_URL&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.FILE&&c.file?.file_data?.startsWith("data:")){let a=c.file.file_data,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d).split(";")[0],e=a.substring(d+1);b.push({inlineData:{mime_type:c,data:e}})}}}return b}function j(a,b=""){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a.type===e.x4.TEXT).map(a=>a.text).join(b):""}function k(a){return(0,d.N)(a,null)}function l(){return`agent-${crypto.randomUUID()}`}function m(){return crypto.randomUUID()+Date.now().toString()}function n(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function o(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function p(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(Array.isArray(b.prefixItems)&&b.prefixItems.length>0){let a=b.prefixItems.filter(a=>a&&"null"!==a.type);b.items||1!==a.length?!b.items&&a.length>1&&(b.items={anyOf:a}):b.items=a[0],delete b.prefixItems}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=o(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=o(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){for(let[c,d]of(b.properties&&!b.type&&(b.type="object"),Object.entries(b)))if(d&&"object"==typeof d)if("properties"!==c||Array.isArray(d))a(d);else for(let b of Object.values(d))a(b)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of("array"!==b.type||b.items||(b.items={type:"string"}),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,g),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(0===Object.keys(b).length){b.type="object",b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"];return}for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}}(a)),a}let q={$ref:"_ref"};function r(a){let b=a?.functionResponse?.response;return b&&"object"==typeof b?{...a,functionResponse:{...a.functionResponse,response:function a(b){if(Array.isArray(b))return b.map(a);if(!b||"object"!=typeof b)return b;let c={};for(let[d,e]of Object.entries(b))c[q[d]??d]=a(e);return c}(b)}}:a}function s(a,b=null){let c=(0,f.isGemini4Model)(b),d=[];for(let b of a||[]){if(!b?.role||!Array.isArray(b.parts))continue;let a=b.parts.filter(a=>a&&Object.keys(a).length>0).map(r);if(0===a.length)continue;let e=d.at(-1);e?.role===b.role?(e.parts.push(...a),c&&(e.parts=function(a){let b=a.filter(a=>a.functionResponse);return b.length?[...a.filter(a=>!a.functionResponse),...b]:a}(e.parts))):d.push({...b,parts:[...a]})}if(d.length>0&&"user"!==d[0].role&&d.unshift({role:"user",parts:[{text:"..."}]}),d.length>0&&"model"===d.at(-1).role){let a=(d.at(-1).parts||[]).filter(a=>a&&a.functionCall);if(a.length>0){let b=a.map(a=>{let b=a.functionCall||{},c={name:b.name||"tool",response:{result:"Continue."}};return b.id&&(c.id=b.id),{functionResponse:c}});d.push({role:"user",parts:b})}else d.push({role:"user",parts:[{text:"Continue."}]})}return d}},33077:(a,b,c)=>{c.d(b,{R:()=>e,z:()=>d});let d={USER:"user",ASSISTANT:"assistant",TOOL:"tool",SYSTEM:"system",DEVELOPER:"developer"},e={USER:"user",MODEL:"model"}},43698:(a,b,c)=>{c.d(b,{R4:()=>e.R4,zh:()=>e.zh,BY:()=>h,a_:()=>f.a_,RV:()=>d.R,rP:()=>g,x4:()=>e.x4,bC:()=>f.bC,Du:()=>e.Du,z7:()=>d.z,m8:()=>e.m8});var d=c(33077),e=c(19804),f=c(69320);c(13371);let g="unknown",h="image/png"},44236:(a,b,c)=>{c.d(b,{F:()=>e,Q:()=>f});var d=c(69320);function e(a,b){switch(b){case"claude":switch(a){case d.Ut.END_TURN:return d.bC.STOP;case d.Ut.MAX_TOKENS:return d.bC.LENGTH;case d.Ut.TOOL_USE:return d.bC.TOOL_CALLS;case d.Ut.STOP_SEQUENCE:return d.bC.STOP;case d.Ut.REFUSAL:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"commandcode":switch(a){case"stop":case"error":return d.bC.STOP;case"length":return d.bC.LENGTH;case"tool-calls":case"tool_use":return d.bC.TOOL_CALLS;case"content-filter":return d.bC.CONTENT_FILTER;default:return a||d.bC.STOP}case"gemini":switch(String(a).toUpperCase()){case d.a_.STOP:return d.bC.STOP;case d.a_.MAX_TOKENS:return d.bC.LENGTH;case d.a_.SAFETY:case d.a_.RECITATION:case d.a_.BLOCKLIST:case d.a_.PROHIBITED_CONTENT:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"kiro":case"ollama":switch(a){case"tool_calls":case"tool_use":return d.bC.TOOL_CALLS;case"length":case"max_tokens":return d.bC.LENGTH;default:return d.bC.STOP}default:return a||d.bC.STOP}}function f(a,b){if("claude"!==b)return a;switch(a){case d.bC.STOP:return d.Ut.END_TURN;case d.bC.LENGTH:return d.Ut.MAX_TOKENS;case d.bC.TOOL_CALLS:return d.Ut.TOOL_USE;case d.bC.CONTENT_FILTER:return d.Ut.REFUSAL;default:return d.Ut.END_TURN}}},62842:(a,b,c)=>{c.d(b,{N:()=>d});function d(a,b){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}},69320:(a,b,c)=>{c.d(b,{Fe:()=>g,JA:()=>i,Ut:()=>e,a_:()=>h,bC:()=>d,up:()=>f});let d={STOP:"stop",LENGTH:"length",TOOL_CALLS:"tool_calls",CONTENT_FILTER:"content_filter"},e={END_TURN:"end_turn",MAX_TOKENS:"max_tokens",TOOL_USE:"tool_use",STOP_SEQUENCE:"stop_sequence",REFUSAL:"refusal"},f={COMPLETED:"completed",INCOMPLETE:"incomplete",FAILED:"failed"},g={MAX_OUTPUT_TOKENS:"max_output_tokens",CONTENT_FILTER:"content_filter"},h={STOP:"STOP",MAX_TOKENS:"MAX_TOKENS",SAFETY:"SAFETY",RECITATION:"RECITATION",BLOCKLIST:"BLOCKLIST",PROHIBITED_CONTENT:"PROHIBITED_CONTENT",MALFORMED_FUNCTION_CALL:"MALFORMED_FUNCTION_CALL",UNEXPECTED_TOOL_CALL:"UNEXPECTED_TOOL_CALL",OTHER:"OTHER"},i=new Set([d.CONTENT_FILTER])},78959:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}}};
9
+ `}function o(a,b,c){let{error:e}=(0,f.xJ)(a,b),i=c===d.h.CLAUDE?n({type:"error",error:e},d.h.CLAUDE):n({error:e},c)+g.$U;return h.encode(i)}},13371:(a,b,c)=>{c.d(b,{PV:()=>f,eI:()=>g,kz:()=>d,mD:()=>e});let d={CONTENT_BLOCK_START:"content_block_start",CONTENT_BLOCK_DELTA:"content_block_delta",MESSAGE_DELTA:"message_delta"},e={TEXT:"text_delta",INPUT_JSON:"input_json_delta"},f="response.",g={OUTPUT_ITEM_ADDED:"response.output_item.added",OUTPUT_ITEM_DONE:"response.output_item.done",OUTPUT_TEXT_DELTA:"response.output_text.delta",OUTPUT_TEXT_DONE:"response.output_text.done",FUNCTION_CALL_ARGUMENTS_DELTA:"response.function_call_arguments.delta",CUSTOM_TOOL_CALL_INPUT_DELTA:"response.custom_tool_call_input.delta",COMPLETED:"response.completed",INCOMPLETE:"response.incomplete",FAILED:"response.failed"}},17242:(a,b,c)=>{c.d(b,{C5:()=>k,SF:()=>j,dV:()=>l,eG:()=>f,fH:()=>i});var d=c(14170);let e=/^[a-zA-Z0-9_-]+$/;function f(a){return void 0===a?`call_${Date.now()}`:`call_${a}_${Date.now()}`}function g(a=0,b=0,c=""){let d=c?`_${c.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";return`call_msg${a}_tc${b}${d}`}function h(a){if(!a||"string"!=typeof a)return null;let b=a.replace(/[^a-zA-Z0-9_-]/g,"");return b.length>0?b:null}function i(a){if(!a.messages||!Array.isArray(a.messages))return a;for(let b=0;b<a.messages.length;b++){let c=a.messages[b];if("assistant"===c.role&&c.tool_calls&&Array.isArray(c.tool_calls))for(let a=0;a<c.tool_calls.length;a++){let d=c.tool_calls[a];if(!d.id||!e.test(d.id)){let c=h(d.id);d.id=c||g(b,a,d.function?.name)}d.type||(d.type="function"),d.function?.arguments&&"string"!=typeof d.function.arguments&&(d.function.arguments=JSON.stringify(d.function.arguments))}if("tool"===c.role&&c.tool_call_id&&!e.test(c.tool_call_id)){let a=h(c.tool_call_id);c.tool_call_id=a||g(b,0)}if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let d=c.content[a];if("tool_use"===d.type&&d.id&&!e.test(d.id)){let c=h(d.id);d.id=c||g(b,a,d.name)}if("tool_result"===d.type&&d.tool_use_id&&!e.test(d.tool_use_id)){let c=h(d.tool_use_id);d.tool_use_id=c||g(b,a)}}}return a}function j(a){if(!a.messages||!Array.isArray(a.messages))return a;let b=[];for(let c=0;c<a.messages.length;c++){let d=a.messages[c],e=a.messages[c+1];b.push(d);let f=function(a){if("assistant"!==a.role)return[];let b=[];if(a.tool_calls&&Array.isArray(a.tool_calls))for(let c of a.tool_calls)c.id&&b.push(c.id);if(Array.isArray(a.content))for(let c of a.content)"tool_use"===c.type&&c.id&&b.push(c.id);return b}(d);if(0!==f.length&&e&&!function(a,b){if(!a||!b.length)return!1;if("tool"===a.role&&a.tool_call_id)return b.includes(a.tool_call_id);if("user"===a.role&&Array.isArray(a.content)){for(let c of a.content)if("tool_result"===c.type&&b.includes(c.tool_use_id))return!0}return!1}(e,f))for(let a of f)b.push({role:"tool",tool_call_id:a,content:""})}return a.messages=b,a}function k(a){return Array.isArray(a)?a.map(a=>a?.type?a:{...a,type:"custom"}):a}function l(a,b,c,e){return b===d.h.CLAUDE&&Array.isArray(c)&&e?.[a]?.quirks?.requireClaudeToolType===!0}},19804:(a,b,c)=>{c.d(b,{Du:()=>g,R4:()=>f,m8:()=>h,x4:()=>d,zh:()=>e});let d={TEXT:"text",IMAGE_URL:"image_url",IMAGE:"image",INPUT_AUDIO:"input_audio",AUDIO_URL:"audio_url",FILE:"file",FUNCTION:"function"},e={TOOL_CALL:"tool-call",TOOL_RESULT:"tool-result"},f={TEXT:"text",IMAGE:"image",DOCUMENT:"document",TOOL_USE:"tool_use",TOOL_RESULT:"tool_result",CONTAINER_UPLOAD:"container_upload",THINKING:"thinking",REDACTED_THINKING:"redacted_thinking",SERVER_TOOL_USE:"server_tool_use",WEB_SEARCH_TOOL_RESULT:"web_search_tool_result"},g={MESSAGE:"message",FUNCTION_CALL:"function_call",FUNCTION_CALL_OUTPUT:"function_call_output",CUSTOM_TOOL_CALL:"custom_tool_call",CUSTOM_TOOL_CALL_OUTPUT:"custom_tool_call_output",ADDITIONAL_TOOLS:"additional_tools",REASONING:"reasoning",OUTPUT_TEXT:"output_text",INPUT_TEXT:"input_text",INPUT_IMAGE:"input_image",SUMMARY_TEXT:"summary_text"},h=[d.TEXT,d.IMAGE_URL,d.IMAGE,d.INPUT_AUDIO,d.AUDIO_URL,d.FILE];d.TEXT,d.IMAGE_URL,d.IMAGE,f.TOOL_RESULT},26922:(a,b,c)=>{c.d(b,{$J:()=>s,KZ:()=>l,S6:()=>i,Yr:()=>p,f6:()=>m,fc:()=>h,kU:()=>j,pT:()=>k,w_:()=>n});var d=c(62842),e=c(43698),f=c(24);let g=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","minItems","maxItems","format","multipleOf","uniqueItems","contains","unevaluatedProperties","unevaluatedItems","contentSchema","prefixItems","additionalItems","default","examples","$schema","$defs","definitions","const","$ref","$comment","deprecated","readOnly","writeOnly","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","optional","deprecated","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor","errorMessage","errorMessages","x-errorMessage","x-errorMessages","markdownDescription","x-intellij-html-description","x-taplo-info","x-taplo","doNotSuggest","suggestSortText","minProperties","maxProperties"],h=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function i(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if(c.type===e.x4.TEXT)b.push({text:c.text});else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if(c.type===e.x4.INPUT_AUDIO&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if(c.type===e.x4.AUDIO_URL&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.FILE&&c.file?.file_data?.startsWith("data:")){let a=c.file.file_data,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d).split(";")[0],e=a.substring(d+1);b.push({inlineData:{mime_type:c,data:e}})}}}return b}function j(a,b=""){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a.type===e.x4.TEXT).map(a=>a.text).join(b):""}function k(a){return(0,d.N)(a,null)}function l(){return`agent-${crypto.randomUUID()}`}function m(){return crypto.randomUUID()+Date.now().toString()}function n(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function o(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function p(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(Array.isArray(b.prefixItems)&&b.prefixItems.length>0){let a=b.prefixItems.filter(a=>a&&"null"!==a.type);b.items||1!==a.length?!b.items&&a.length>1&&(b.items={anyOf:a}):b.items=a[0],delete b.prefixItems}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=o(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=o(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);0===a.length?b.type="string":1===a.length?b.type=a[0]:b.properties&&a.includes("object")?b.type="object":b.items&&"object"==typeof b.items&&Object.keys(b.items).length>0&&b.items.type&&a.includes("array")?b.type="array":a.includes("string")?b.type="string":a.includes("number")?b.type="number":a.includes("integer")?b.type="integer":a.includes("boolean")?b.type="boolean":b.type=a[0]}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){for(let[c,d]of(b.properties&&!b.type&&(b.type="object"),Object.entries(b)))if(d&&"object"==typeof d)if("properties"!==c||Array.isArray(d))a(d);else for(let b of Object.values(d))a(b)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of("array"===b.type&&(b.items&&"object"==typeof b.items&&0!==Object.keys(b.items).length?b.items.type||(b.items.properties?b.items.type="object":b.items.items?b.items.type="array":b.items.type="string"):b.items={type:"string"}),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,g),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(0===Object.keys(b).length){b.type="object",b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"];return}for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){for(let c of Object.values(b))c&&"object"==typeof c&&a(c);"array"===b.type?(delete b.properties,delete b.required,b.items&&"object"==typeof b.items&&0!==Object.keys(b.items).length?b.items.type||(b.items.properties?b.items.type="object":b.items.items?b.items.type="array":b.items.type="string"):b.items={type:"string"}):delete b.items,"object"!==b.type&&(delete b.properties,delete b.required)}}(a)),a}let q={$ref:"_ref"};function r(a){let b=a?.functionResponse?.response;return b&&"object"==typeof b?{...a,functionResponse:{...a.functionResponse,response:function a(b){if(Array.isArray(b))return b.map(a);if(!b||"object"!=typeof b)return b;let c={};for(let[d,e]of Object.entries(b))c[q[d]??d]=a(e);return c}(b)}}:a}function s(a,b=null){let c=(0,f.isGemini4Model)(b),d=[];for(let b of a||[]){if(!b?.role||!Array.isArray(b.parts))continue;let a=b.parts.filter(a=>a&&Object.keys(a).length>0).map(r);if(0===a.length)continue;let e=d.at(-1);e?.role===b.role?(e.parts.push(...a),c&&(e.parts=function(a){let b=a.filter(a=>a.functionResponse);return b.length?[...a.filter(a=>!a.functionResponse),...b]:a}(e.parts))):d.push({...b,parts:[...a]})}if(d.length>0&&"user"!==d[0].role&&d.unshift({role:"user",parts:[{text:"..."}]}),d.length>0&&"model"===d.at(-1).role){let a=(d.at(-1).parts||[]).filter(a=>a&&a.functionCall);if(a.length>0){let b=a.map(a=>{let b=a.functionCall||{},c={name:b.name||"tool",response:{result:"Continue."}};return b.id&&(c.id=b.id),{functionResponse:c}});d.push({role:"user",parts:b})}else d.push({role:"user",parts:[{text:"Continue."}]})}return d}},33077:(a,b,c)=>{c.d(b,{R:()=>e,z:()=>d});let d={USER:"user",ASSISTANT:"assistant",TOOL:"tool",SYSTEM:"system",DEVELOPER:"developer"},e={USER:"user",MODEL:"model"}},43698:(a,b,c)=>{c.d(b,{R4:()=>e.R4,zh:()=>e.zh,BY:()=>h,a_:()=>f.a_,RV:()=>d.R,rP:()=>g,x4:()=>e.x4,bC:()=>f.bC,Du:()=>e.Du,z7:()=>d.z,m8:()=>e.m8});var d=c(33077),e=c(19804),f=c(69320);c(13371);let g="unknown",h="image/png"},44236:(a,b,c)=>{c.d(b,{F:()=>e,Q:()=>f});var d=c(69320);function e(a,b){switch(b){case"claude":switch(a){case d.Ut.END_TURN:return d.bC.STOP;case d.Ut.MAX_TOKENS:return d.bC.LENGTH;case d.Ut.TOOL_USE:return d.bC.TOOL_CALLS;case d.Ut.STOP_SEQUENCE:return d.bC.STOP;case d.Ut.REFUSAL:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"commandcode":switch(a){case"stop":case"error":return d.bC.STOP;case"length":return d.bC.LENGTH;case"tool-calls":case"tool_use":return d.bC.TOOL_CALLS;case"content-filter":return d.bC.CONTENT_FILTER;default:return a||d.bC.STOP}case"gemini":switch(String(a).toUpperCase()){case d.a_.STOP:return d.bC.STOP;case d.a_.MAX_TOKENS:return d.bC.LENGTH;case d.a_.SAFETY:case d.a_.RECITATION:case d.a_.BLOCKLIST:case d.a_.PROHIBITED_CONTENT:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"kiro":case"ollama":switch(a){case"tool_calls":case"tool_use":return d.bC.TOOL_CALLS;case"length":case"max_tokens":return d.bC.LENGTH;default:return d.bC.STOP}default:return a||d.bC.STOP}}function f(a,b){if("claude"!==b)return a;switch(a){case d.bC.STOP:return d.Ut.END_TURN;case d.bC.LENGTH:return d.Ut.MAX_TOKENS;case d.bC.TOOL_CALLS:return d.Ut.TOOL_USE;case d.bC.CONTENT_FILTER:return d.Ut.REFUSAL;default:return d.Ut.END_TURN}}},62842:(a,b,c)=>{c.d(b,{N:()=>d});function d(a,b){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}},69320:(a,b,c)=>{c.d(b,{Fe:()=>g,JA:()=>i,Ut:()=>e,a_:()=>h,bC:()=>d,up:()=>f});let d={STOP:"stop",LENGTH:"length",TOOL_CALLS:"tool_calls",CONTENT_FILTER:"content_filter"},e={END_TURN:"end_turn",MAX_TOKENS:"max_tokens",TOOL_USE:"tool_use",STOP_SEQUENCE:"stop_sequence",REFUSAL:"refusal"},f={COMPLETED:"completed",INCOMPLETE:"incomplete",FAILED:"failed"},g={MAX_OUTPUT_TOKENS:"max_output_tokens",CONTENT_FILTER:"content_filter"},h={STOP:"STOP",MAX_TOKENS:"MAX_TOKENS",SAFETY:"SAFETY",RECITATION:"RECITATION",BLOCKLIST:"BLOCKLIST",PROHIBITED_CONTENT:"PROHIBITED_CONTENT",MALFORMED_FUNCTION_CALL:"MALFORMED_FUNCTION_CALL",UNEXPECTED_TOOL_CALL:"UNEXPECTED_TOOL_CALL",OTHER:"OTHER"},i=new Set([d.CONTENT_FILTER])},78959:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}}};
@@ -1 +1 @@
1
- "use strict";exports.id=869,exports.ids=[615,869,7247],exports.modules={30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"9router",installCmd:"npm i -g 9router",installCmdLatest:"npm i -g 9router@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.6-terra",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{a.exports={rE:"0.5.111"}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(57786);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","systemoneConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{},...a.credentialForm?{credentialForm:a.credentialForm}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.default.filter(a=>a.features?.usage).map(a=>a.id),y=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},57247:(a,b,c)=>{c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(57786),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(57247);new Set(Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))}};
1
+ "use strict";exports.id=869,exports.ids=[615,869,7247],exports.modules={30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"9router",installCmd:"npm i -g 9router",installCmdLatest:"npm i -g 9router@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.6-terra",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{a.exports={rE:"0.5.112"}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(8499);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","systemoneConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{},...a.credentialForm?{credentialForm:a.credentialForm}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.default.filter(a=>a.features?.usage).map(a=>a.id),y=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},57247:(a,b,c)=>{c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(8499),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(57247);new Set(Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=8895,exports.ids=[8895],exports.modules={324:(a,b,c)=>{c.d(b,{J:()=>e,Q:()=>f});let d={claude:["claude","anthropic"],"gemini-cli":["gemini-cli"],antigravity:["antigravity"],codex:["codex"]};function e(a={},b={}){let c=(a["user-agent"]||"").toLowerCase(),d=(a["x-app"]||"").toLowerCase(),f=(a["openai-intent"]||"").toLowerCase(),g=(a["x-initiator"]||a["X-Initiator"]||"").toLowerCase(),h=(a.originator||"").toLowerCase();return"antigravity"===b.userAgent?"antigravity":c.includes("githubcopilotchat")||"conversation-panel"===f||"user"===g?"github-copilot":c.includes("claude-cli")||c.includes("claude-code")||"cli"===d?"claude":c.includes("gemini-cli")?"gemini-cli":c.includes("codex-tui")||c.includes("codex-cli")||c.includes("codex_cli_rs")||c.includes("codex desktop")||h.startsWith("codex_")?"codex":c.includes("deepseek-tui")?"deepseek-tui":null}function f(a,b){if(!a)return!1;let c=d[a];if(!c)return!1;let e=b.startsWith("anthropic-compatible")?"anthropic":b;return c.includes(e)}},5016:(a,b,c)=>{c.d(b,{N:()=>s});var d=c(14170),e=c(82380),f=c(35719),g=c(39551),h=c(73483),i=c(43659),j=c(48136),k=c(41004),l=c(81626),m=c(54098),n=c(86171),o=c(47370),p=c(55399),q=c(60210),r=c(43698);async function s({providerResponse:a,provider:b,model:c,sourceFormat:t,targetFormat:u,body:v,stream:w,translatedBody:x,finalBody:y,requestStartTime:z,connectionId:A,apiKey:B,clientRawRequest:C,onRequestSuccess:D,reqLogger:E,toolNameMap:F,customToolNames:G,trackDone:H,appendLog:I,pxpipe:J,reqTag:K,log:L}){let M;if(H(),(a.headers.get("content-type")||"").includes("text/event-stream")){let b=await a.text(),d=(0,l.F)(b,c);if(!d)return I({status:`FAILED ${k.gx.BAD_GATEWAY}`}),(0,i.A1)(k.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");M=d}else try{M=await a.json()}catch(a){return I({status:`FAILED ${k.gx.BAD_GATEWAY}`}),console.error(`[ChatCore] Failed to parse JSON from ${b}:`,a.message),(0,i.A1)(k.gx.BAD_GATEWAY,`Invalid JSON response from ${b}`)}M=(0,m.x)(M,b),E.logProviderResponse(a.status,a.statusText,a.headers,M),D&&Promise.resolve().then(D).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)}),M=(0,p.kR)(M,F);let N=(0,n.MK)(M);I({tokens:N,status:"200 OK"}),(0,n.qr)({provider:b,model:c,tokens:N,connectionId:A,apiKey:B,endpoint:C?.endpoint,silent:!0}),L?.line&&L.line(K,"\uD83D\uDCCA",(0,n.U$)({usage:N,latency:{total:Date.now()-z}}));let O=(0,e.nZ)(u,t)?function(a,b,c,e=null){if(b===c)return a;if(b===d.h.OPENAI&&c===d.h.OPENAI_RESPONSES)return function(a,b=null){let c=a?.choices?.[0];if(!c)return a;let d=c.message||{},e=[],f=d.reasoning_content||d.reasoning;"string"==typeof f&&f.length>0&&e.push({type:r.Du.REASONING,summary:[{type:r.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:r.Du.MESSAGE,role:r.z7.ASSISTANT,content:[{type:r.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?r.Du.CUSTOM_TOOL_CALL:r.Du.FUNCTION_CALL,id:`${d?"ctc":"fc"}_${a.id||""}`,call_id:a.id||"",name:c.name||"",...d?{input:function(a){let b="string"==typeof a?a:JSON.stringify(a||{});try{let a=JSON.parse(b);if(a&&"object"==typeof a&&"string"==typeof a.input)return a.input}catch{}return b}(c.arguments)}:{arguments:"string"==typeof c.arguments?c.arguments:JSON.stringify(c.arguments||{})}})}let h=a.usage||{},i="tool_calls"===c.finish_reason||"stop"===c.finish_reason?"completed":c.finish_reason||"completed";return{id:`resp_${a.id||""}`.replace(/^resp_chatcmpl-/,"resp_"),object:"response",created_at:a.created||Math.floor(Date.now()/1e3),model:a.model||"unknown",status:i,background:!1,error:null,output:e,usage:{input_tokens:h.prompt_tokens||h.input_tokens||0,output_tokens:h.completion_tokens||h.output_tokens||0,total_tokens:h.total_tokens||(h.prompt_tokens||0)+(h.completion_tokens||0)}}}(a,e);if(b===d.h.OPENAI&&c===d.h.CLAUDE)return(0,f.F)(a);if(b===d.h.OPENAI)return a;if(b===d.h.GEMINI||b===d.h.ANTIGRAVITY||b===d.h.GEMINI_CLI||b===d.h.VERTEX){let b=a.response||a;if(!b?.candidates?.[0])return a;let c=b.candidates[0],d=c.content,e=b.usageMetadata||a.usageMetadata,f="",g="",h=[];if(d?.parts)for(let a of d.parts){!0===a.thought&&a.text?g+=a.text:void 0!==a.text&&(f+=a.text),a.functionCall&&h.push({id:`call_${a.functionCall.name}_${Date.now()}_${h.length}`,type:"function",function:{name:a.functionCall.name,arguments:JSON.stringify(a.functionCall.args||{})}});let b=a.inlineData||a.inline_data;if(b?.data){let a=b.mimeType||b.mime_type||"image/png";f+=`
1
+ "use strict";exports.id=8895,exports.ids=[8895],exports.modules={324:(a,b,c)=>{c.d(b,{J:()=>e,Q:()=>f});let d={claude:["claude","anthropic"],"gemini-cli":["gemini-cli"],antigravity:["antigravity"],codex:["codex"]};function e(a={},b={}){let c=(a["user-agent"]||"").toLowerCase(),d=(a["x-app"]||"").toLowerCase(),f=(a["openai-intent"]||"").toLowerCase(),g=(a["x-initiator"]||a["X-Initiator"]||"").toLowerCase(),h=(a.originator||"").toLowerCase();return"antigravity"===b.userAgent?"antigravity":c.includes("githubcopilotchat")||"conversation-panel"===f||"user"===g?"github-copilot":c.includes("claude-cli")||c.includes("claude-code")||"cli"===d?"claude":c.includes("gemini-cli")?"gemini-cli":c.includes("codex-tui")||c.includes("codex-cli")||c.includes("codex_cli_rs")||c.includes("codex desktop")||h.startsWith("codex_")?"codex":c.includes("deepseek-tui")?"deepseek-tui":null}function f(a,b){if(!a)return!1;let c=d[a];if(!c)return!1;let e=b.startsWith("anthropic-compatible")?"anthropic":b;return c.includes(e)}},5016:(a,b,c)=>{c.d(b,{N:()=>s});var d=c(14170),e=c(82380),f=c(35719),g=c(39551),h=c(73483),i=c(43659),j=c(48136),k=c(41004),l=c(81626),m=c(54098),n=c(86171),o=c(47370),p=c(55399),q=c(60210),r=c(43698);async function s({providerResponse:a,provider:b,model:c,sourceFormat:t,targetFormat:u,body:v,stream:w,translatedBody:x,finalBody:y,requestStartTime:z,connectionId:A,apiKey:B,clientRawRequest:C,onRequestSuccess:D,reqLogger:E,toolNameMap:F,customToolNames:G,trackDone:H,appendLog:I,pxpipe:J,reqTag:K,log:L}){let M;if(H(),(a.headers.get("content-type")||"").includes("text/event-stream")){let b=await a.text(),d=(0,l.F)(b,c);if(!d)return I({status:`FAILED ${k.gx.BAD_GATEWAY}`}),(0,i.A1)(k.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");if(d.error){let a=Number(d.error.status),b=Number.isInteger(a)&&a>=400&&a<=599?a:k.gx.BAD_GATEWAY;return I({status:`FAILED ${b}`}),(0,i.A1)(b,d.error.message||"Upstream SSE stream failed")}M=d}else try{M=await a.json()}catch(a){return I({status:`FAILED ${k.gx.BAD_GATEWAY}`}),console.error(`[ChatCore] Failed to parse JSON from ${b}:`,a.message),(0,i.A1)(k.gx.BAD_GATEWAY,`Invalid JSON response from ${b}`)}M=(0,m.x)(M,b),E.logProviderResponse(a.status,a.statusText,a.headers,M),D&&Promise.resolve().then(D).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)}),M=(0,p.kR)(M,F);let N=(0,n.MK)(M);I({tokens:N,status:"200 OK"}),(0,n.qr)({provider:b,model:c,tokens:N,connectionId:A,apiKey:B,endpoint:C?.endpoint,silent:!0}),L?.line&&L.line(K,"\uD83D\uDCCA",(0,n.U$)({usage:N,latency:{total:Date.now()-z}}));let O=(0,e.nZ)(u,t)?function(a,b,c,e=null){if(b===c)return a;if(b===d.h.OPENAI&&c===d.h.OPENAI_RESPONSES)return function(a,b=null){let c=a?.choices?.[0];if(!c)return a;let d=c.message||{},e=[],f=d.reasoning_content||d.reasoning;"string"==typeof f&&f.length>0&&e.push({type:r.Du.REASONING,summary:[{type:r.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:r.Du.MESSAGE,role:r.z7.ASSISTANT,content:[{type:r.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?r.Du.CUSTOM_TOOL_CALL:r.Du.FUNCTION_CALL,id:`${d?"ctc":"fc"}_${a.id||""}`,call_id:a.id||"",name:c.name||"",...d?{input:function(a){let b="string"==typeof a?a:JSON.stringify(a||{});try{let a=JSON.parse(b);if(a&&"object"==typeof a&&"string"==typeof a.input)return a.input}catch{}return b}(c.arguments)}:{arguments:"string"==typeof c.arguments?c.arguments:JSON.stringify(c.arguments||{})}})}let h=a.usage||{},i="tool_calls"===c.finish_reason||"stop"===c.finish_reason?"completed":c.finish_reason||"completed";return{id:`resp_${a.id||""}`.replace(/^resp_chatcmpl-/,"resp_"),object:"response",created_at:a.created||Math.floor(Date.now()/1e3),model:a.model||"unknown",status:i,background:!1,error:null,output:e,usage:{input_tokens:h.prompt_tokens||h.input_tokens||0,output_tokens:h.completion_tokens||h.output_tokens||0,total_tokens:h.total_tokens||(h.prompt_tokens||0)+(h.completion_tokens||0)}}}(a,e);if(b===d.h.OPENAI&&c===d.h.CLAUDE)return(0,f.F)(a);if(b===d.h.OPENAI)return a;if(b===d.h.GEMINI||b===d.h.ANTIGRAVITY||b===d.h.GEMINI_CLI||b===d.h.VERTEX){let b=a.response||a;if(!b?.candidates?.[0])return a;let c=b.candidates[0],d=c.content,e=b.usageMetadata||a.usageMetadata,f="",g="",h=[];if(d?.parts)for(let a of d.parts){!0===a.thought&&a.text?g+=a.text:void 0!==a.text&&(f+=a.text),a.functionCall&&h.push({id:`call_${a.functionCall.name}_${Date.now()}_${h.length}`,type:"function",function:{name:a.functionCall.name,arguments:JSON.stringify(a.functionCall.args||{})}});let b=a.inlineData||a.inline_data;if(b?.data){let a=b.mimeType||b.mime_type||"image/png";f+=`
2
2
  ![image](data:${a};base64,${b.data})
3
3
  `}}let i={role:"assistant"};f&&(i.content=f),g&&(i.reasoning_content=g),h.length>0&&(i.tool_calls=h),i.content||i.tool_calls||(i.content="");let j=(c.finishReason||"stop").toLowerCase();"stop"===j&&h.length>0&&(j="tool_calls");let k={id:`chatcmpl-${b.responseId||Date.now()}`,object:"chat.completion",created:Math.floor(new Date(b.createTime||Date.now()).getTime()/1e3),model:b.modelVersion||"gemini",choices:[{index:0,message:i,finish_reason:j}]};return e&&(k.usage={prompt_tokens:(e.promptTokenCount||0)+(e.thoughtsTokenCount||0),completion_tokens:e.candidatesTokenCount||0,total_tokens:e.totalTokenCount||0},e.thoughtsTokenCount>0&&(k.usage.completion_tokens_details={reasoning_tokens:e.thoughtsTokenCount})),k}if(b===d.h.CLAUDE){if(a.choices||a.content&&!Array.isArray(a.content))return a;let b="",c="",d=[];for(let e of a.content||[])"text"===e.type?b+=(e.text??"").replace(/^\s*```\s*json\s*\n?/i,"").replace(/\n?\s*```\s*$/i,""):"thinking"===e.type?c+=e.thinking||"":"tool_use"===e.type&&d.push({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}});let e={role:"assistant"};b&&(e.content=b),c&&(e.reasoning_content=c),d.length>0&&(e.tool_calls=d),e.content||e.tool_calls||(e.content="");let f=a.stop_reason||"stop";"end_turn"===f&&(f="stop"),"tool_use"===f&&(f="tool_calls");let g={id:`chatcmpl-${a.id||Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:a.model||"claude",choices:[{index:0,message:e,finish_reason:f}]};return a.usage&&(g.usage={prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,total_tokens:(a.usage.input_tokens||0)+(a.usage.output_tokens||0)}),g}return b===d.h.OLLAMA?(0,g._)(a):a}(M,u,t,G):M,P=t===d.h.CLAUDE&&O?.type==="message",Q=t===d.h.OPENAI_RESPONSES&&O?.object==="response";if(O?.choices?.[0]){let a=O.choices[0],b=a.message;Array.isArray(b?.tool_calls)&&b.tool_calls.length>0&&"tool_calls"!==a.finish_reason&&(a.finish_reason="tool_calls")}if(P||Q||(O.object||(O.object="chat.completion"),O.created||(O.created=Math.floor(Date.now()/1e3))),!P&&!Q&&(delete O.prompt_filter_results,O?.choices))for(let a of O.choices)delete a.content_filter_results;if(O?.usage&&(O.usage=(0,h.WL)((0,h.O9)(O.usage),t)),!P&&!Q&&O?.choices)for(let a of O.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;E.logConvertedResponse(O);let R=Date.now()-z;return(0,o.ox)((0,n.$R)({provider:b,model:c,connectionId:A,latency:{ttft:R,total:R},tokens:N||{prompt_tokens:0,completion_tokens:0},request:(0,n.Fo)(v,w),providerRequest:y||x||null,providerResponse:M||null,response:{content:O?.choices?.[0]?.message?.content||O?.content||null,thinking:O?.choices?.[0]?.message?.reasoning_content||O?.reasoning_content||null,finish_reason:O?.choices?.[0]?.finish_reason||"unknown"},pxpipe:J,status:"success"},{endpoint:C?.endpoint||null})).catch(a=>{console.error("[RequestDetail] Failed to save:",a.message)}),{success:!0,response:new Response(JSON.stringify((0,q.HR)(O,F)),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",...(0,j.d)(a.headers)}})}}},5263:(a,b,c)=>{c.d(b,{X:()=>m});var d=c(14170);let e={vision:"[image omitted: model has no vision support]",audioInput:"[audio omitted: model has no audio support]",pdf:"[file omitted: model has no document support]"},f={vision:"[Previous image omitted from context.]",audioInput:"[Previous audio omitted from context.]",pdf:"[Previous file omitted from context.]"},g=(a,b)=>(b?e:f)[a];function h(a){let b=a?.type;return"image_url"===b||"image"===b?"vision":"input_audio"===b||"audio_url"===b?"audioInput":"file"===b?"pdf":null}function i(a){let b=a?.type;return"image"===b?"vision":"document"===b?"pdf":null}function j(a,b,c,d,e){let f=[];for(let e of a){let a=b(e);if(a&&!1===c[a]){d.add(a);continue}f.push(e)}for(let a of d)f.push({type:"text",text:g(a,e)});return f}function k(a,b){if(!Array.isArray(a.messages))return;let c=a.messages.length-1;a.messages.forEach((a,d)=>{if(!1===b.vision&&(Array.isArray(a.images)&&delete a.images,Array.isArray(a.experimental_attachments)&&(a.experimental_attachments=a.experimental_attachments.filter(a=>!(a?.contentType?.startsWith("image/")||"string"==typeof a?.url&&a.url.startsWith("data:image/")))),Array.isArray(a.attachments)&&(a.attachments=a.attachments.filter(a=>!(a?.contentType?.startsWith("image/")||"string"==typeof a?.url&&a.url.startsWith("data:image/"))))),!Array.isArray(a.content))return;let e=new Set;a.content=j(a.content,h,b,e,d===c)})}function l(a,b){if(!Array.isArray(a))return;let c=a.length-1;a.forEach((a,d)=>{if(!Array.isArray(a.parts))return;let e=new Set;for(let f of(a.parts=a.parts.filter(a=>{var c;let d="string"!=typeof(c=a?.inlineData?.mimeType||a?.fileData?.mimeType)?null:c.startsWith("image/")?"vision":c.startsWith("audio/")?"audioInput":"application/pdf"===c?"pdf":null;return!d||!1!==b[d]||(e.add(d),!1)}),e))a.parts.push({text:g(f,d===c)})})}function m(a,b,c){if(!a||!c||!1!==c.vision&&!1!==c.audioInput&&!1!==c.pdf)return!1;switch(b){case d.h.OPENAI:case d.h.OLLAMA:case d.h.KIRO:case d.h.CURSOR:case d.h.COMMANDCODE:k(a,c);break;case d.h.CLAUDE:!function(a,b){if(!Array.isArray(a.messages))return;let c=a.messages.length-1;a.messages.forEach((a,d)=>{if(!Array.isArray(a.content))return;let e=new Set;a.content=j(a.content,i,b,e,d===c)})}(a,c);break;case d.h.OPENAI_RESPONSES:case d.h.OPENAI_RESPONSE:case d.h.CODEX:!function(a,b){if(!Array.isArray(a.input))return;let c=a.input.length-1;a.input.forEach((a,d)=>{if(!Array.isArray(a.content))return;let e=new Set;for(let f of(a.content=a.content.filter(a=>{let c=a?.type==="input_image"?"vision":a?.type==="input_file"?"pdf":null;return!c||!1!==b[c]||(e.add(c),!1)}),e))a.content.push({type:"input_text",text:g(f,d===c)})})}(a,c);break;case d.h.GEMINI:case d.h.GEMINI_CLI:case d.h.VERTEX:l(a.contents,c);break;case d.h.ANTIGRAVITY:l(a?.request?.contents,c);break;default:k(a,c)}return!0}},14724:(a,b,c)=>{c.d(b,{F:()=>h});var d=c(59096);let e=[{triggers:["mcp__exa__web_search_exa","mcp__exa__web_fetch_exa"],strip:["WebSearch","WebFetch","mcp__workspace__web_fetch"]},{triggers:["mcp__tavily__tavily_search","mcp__tavily__tavily_extract"],strip:["WebSearch","WebFetch","mcp__workspace__web_fetch"]},{triggers:[/^mcp__browsermcp__/],strip:[/^mcp__Claude_in_Chrome__/]}];function f(a){return a?.name||a?.function?.name||""}function g(a,b){return"string"==typeof b?a===b:b instanceof RegExp&&b.test(a)}function h(a,b={}){if(!Array.isArray(a)||0===a.length)return{tools:a,stripped:[]};let c=a.map(f),i=new Set,j=new Set;if("claude"===b.clientTool){for(let a of e)if(c.some(b=>a.triggers.some(a=>g(b,a))))for(let b of c)a.strip.some(a=>g(b,a))&&i.add(b)}if((0,d.wR)(b.model)){let b=new Set;for(let c=0;c<a.length;c++){let d=f(a[c]);d&&(b.has(d)?j.add(c):b.add(d))}}return 0===i.size&&0===j.size?{tools:a,stripped:[]}:{tools:a.filter((a,b)=>!j.has(b)&&!i.has(f(a))),stripped:Array.from(j).map(b=>f(a[b])).concat(Array.from(i))}}},14823:(a,b,c)=>{c.d(b,{H:()=>h});var d=c(14170);function e(a){try{return JSON.stringify(a)?.length||0}catch{return 0}}function f(a){return Math.round(a/4)}function g(a,b={}){return{body:null,summary:{applied:!1,reason:a,...b}}}async function h(a,{enabled:b,format:c,model:i,minChars:j,timeoutMs:k,transform:l}={}){if(!b)return g("disabled");if("function"!=typeof l)return g("not_installed");if(!a)return g("missing_body");if(c!==d.h.CLAUDE)return g("unsupported_format",{detail:c});let m=Date.now(),n=e(a),o=Number(j)>0?Number(j):25e3;if(n<o)return g("below_threshold",{originalChars:n,threshold:o});try{let b=new TextEncoder().encode(JSON.stringify(a)),c=Number(k)>0?Number(k):15e3,d=await Promise.race([l({body:b,model:i,options:{minCompressChars:o}}),new Promise(a=>setTimeout(()=>a(null),c))]);if(!d)return g("timeout",{originalChars:n,durationMs:Date.now()-m});if(!d.applied)return g(d.reason||"passthrough",{detail:d.detail,originalChars:n,durationMs:Date.now()-m});let h=JSON.parse(new TextDecoder().decode(d.body)),j=e(h),p=d.info||{},q=p.compressedChars||0,r=p.imageTokens||(p.imagePixels?Math.round(p.imagePixels/750):4761*(p.imageCount||0)),s={applied:!0,reason:"applied",originalChars:n,compressedBodyChars:j,imagedChars:q,imageCount:p.imageCount||0,imageBytes:p.imageBytes||0,tokensBeforeEst:p.baselineTokens||f(n),tokensAfterEst:f(Math.max(0,n-q))+r,durationMs:Date.now()-m,cacheOwnsControl:d.cache?.ownsCacheControl===!0};return s.tokensSavedEst=Math.max(0,s.tokensBeforeEst-s.tokensAfterEst),s.savedPct=s.tokensBeforeEst>0?+(s.tokensSavedEst/s.tokensBeforeEst*100).toFixed(2):0,{body:h,summary:s}}catch(a){return g("transform_error",{detail:a?.message||String(a),originalChars:n,durationMs:Date.now()-m})}}},20623:(a,b,c)=>{c.d(b,{$:()=>r,M:()=>q});var d=c(14170),e=c(82380),f=c(71857),g=c(59657),h=c(35024),i=c(41004),j=c(30320),k=c(9024),l=c(86171),m=c(47370),n=c(78959),o=c(48136);let p={[d.h.OPENAI_RESPONSES]:d.h.OPENAI_RESPONSES,[d.h.CLAUDE]:d.h.CLAUDE,[d.h.ANTIGRAVITY]:d.h.ANTIGRAVITY,[d.h.GEMINI]:d.h.ANTIGRAVITY,[d.h.GEMINI_CLI]:d.h.ANTIGRAVITY};async function q({providerResponse:a,provider:b,model:c,sourceFormat:r,targetFormat:s,userAgent:t,body:u,stream:v,translatedBody:w,finalBody:x,requestStartTime:y,connectionId:z,apiKey:A,clientRawRequest:B,onRequestSuccess:C,reqLogger:D,toolNameMap:E,customToolNames:F,streamController:G,onStreamComplete:H,streamDetailId:I,pxpipe:J,reqTag:K,log:L,credentials:M}){C&&Promise.resolve().then(C).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)});let N=(a.headers.get("content-type")||"").toLowerCase();if(N&&!N.includes("text/event-stream")&&!N.includes("application/json")){let d=await a.text().catch(()=>""),e=d.match(/<title>([^<]+)<\/title>/i),f=(e?.[1]||"").replace(/<[^>]*>/g,"").replace(/[\r\n]+/g," ").trim().slice(0,160)||(d.length<200?d.replace(/<[^>]*>/g,"").trim().slice(0,160):`Upstream returned non-SSE response (${N})`),g=a.status||502;return L?.errorLine?L.errorLine(K,"✗",`BLOCKED ${g} \xb7 ${b}/${c} \xb7 non-SSE (${N})
4
4
  ${f}`):console.warn(`[STREAM] ${b} | ${c} | blocked pipe: ${f} [${g}]`),G?.handleError?.(Error(`upstream non-SSE: ${g}`)),{success:!1,response:new Response(JSON.stringify({error:{message:`[${g}]: ${f}`}}),{status:g,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}let O=function({provider:a,sourceFormat:b,targetFormat:c,userAgent:g,reqLogger:i,toolNameMap:j,customToolNames:k,model:l,connectionId:m,body:n,onStreamComplete:o,apiKey:q,credentials:r}){let s=g?.toLowerCase().includes("droid")||g?.toLowerCase().includes("codex-cli");if(h.xq[a]?.format===d.h.OPENAI_RESPONSES&&c===d.h.OPENAI_RESPONSES&&!s){let c=p[b]||d.h.OPENAI;return(0,f.i5)(d.h.OPENAI_RESPONSES,c,a,i,j,l,m,n,o,q,k,r)}return(0,e.nZ)(c,b)?(0,f.i5)(c,b,a,i,j,l,m,n,o,q,k,r):(0,f.l2)(a,i,l,m,n,o,q,j)}({provider:b,sourceFormat:r,targetFormat:s,userAgent:t,reqLogger:D,toolNameMap:E,customToolNames:F,model:c,connectionId:z,body:u,onStreamComplete:H,apiKey:A,credentials:M}),P=r===d.h.OPENAI_RESPONSES&&s===d.h.OPENAI_RESPONSES?j.Hr:a=>(0,k.mb)(i.gx.GATEWAY_TIMEOUT,a,r),Q=h.xq[b]?.stallTimeoutMs||i.xM,R=(0,g.Jb)(a,O,G,P,Q);return(0,m.ox)((0,l.$R)({provider:b,model:c,connectionId:z,latency:{ttft:0,total:Date.now()-y},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,l.Fo)(u,v),providerRequest:x||w||null,providerResponse:"[Streaming - raw response not captured]",response:{content:"[Streaming in progress...]",thinking:null,type:"streaming"},pxpipe:J,status:"success"},{id:I})).catch(a=>{console.error("[RequestDetail] Failed to save streaming request:",a.message)}),{success:!0,response:new Response(R,{headers:{...n.RK,...(0,o.d)(a.headers)}})}}function r({provider:a,model:b,connectionId:c,apiKey:d,requestStartTime:e,body:f,stream:g,finalBody:h,translatedBody:i,clientRawRequest:j,pxpipe:k,reqTag:n,log:o}){let p=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`;return{onStreamComplete:(q,r,s)=>{let t={ttft:s?s-e:Date.now()-e,total:Date.now()-e},u=q?.content||"[Empty streaming response]",v=q?.thinking||null;(0,m.ox)((0,l.$R)({provider:a,model:b,connectionId:c,latency:t,tokens:r||{prompt_tokens:0,completion_tokens:0},request:(0,l.Fo)(f,g),providerRequest:h||i||null,providerResponse:u,response:{content:u,thinking:v,type:"streaming"},pxpipe:k,status:"success"},{id:p})).catch(a=>{console.error("[RequestDetail] Failed to update streaming content:",a.message)}),(0,l.qr)({provider:a,model:b,tokens:r,connectionId:c,apiKey:d,endpoint:j?.endpoint,label:"STREAM USAGE",silent:!0}),o?.line&&o.line(n,"\uD83D\uDCCA",(0,l.U$)({usage:r,latency:t}))},streamDetailId:p}}},24643:(a,b,c)=>{c.d(b,{J:()=>g});var d=c(14170),e=c(19804),f=c(33077);function g(a,b,c){try{if(!a||!c||"object"!=typeof a)return;if(function(a){if(!a||"object"!=typeof a)return!1;let b=a.conversationState;return!!b&&"object"==typeof b&&(Array.isArray(b.history)&&b.history.some(a=>a&&(a.userInputMessage||a.assistantResponseMessage))||!!(b.currentMessage&&b.currentMessage.userInputMessage))}(a)||b===d.h.KIRO)return void function(a,b){try{let c=a.conversationState,d=null,e=Array.isArray(c?.history)?c.history:null;if(e){for(let a of e)if(a&&a.userInputMessage){d=a.userInputMessage;break}}if(!d&&c?.currentMessage?.userInputMessage&&(d=c.currentMessage.userInputMessage),!d)return;let f="string"==typeof d.content?d.content:"",g=i(f,b);if(g===f)return;try{d.content=g}catch(a){}}catch(a){}}(a,c);if(b===d.h.CLAUDE)return void function(a,b){try{let c=a.system;if("string"==typeof c){if(h(c,b))return;let d=c.length>0?`${c}
@@ -1 +1 @@
1
- "use strict";exports.id=8920,exports.ids=[8920],exports.modules={58920:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,ad:()=>k,calculateCostFromTokens:()=>l,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gemini-3.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15},"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"kimi-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k3.1-pro":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4.1-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(){return g}function l(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
1
+ "use strict";exports.id=8920,exports.ids=[8920],exports.modules={58920:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,ad:()=>k,calculateCostFromTokens:()=>l,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6.1-terra":{input:1,output:5,cached:.05,reasoning:5,cache_creation:1.25},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gemini-3.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15},"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"kimi-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k3.1-pro":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4.1-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(){return g}function l(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
@@ -1 +1 @@
1
- "use strict";exports.id=9128,exports.ids=[9128],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66581:(a,b,c)=>{c.d(b,{g:()=>F,s:()=>G});var d=c(80238),e=c(89718),f=c(38775),g=c(27811),h=c(43659),i=c(41004),j=c(8521),k=c(26070);let l=new Set(["generations"]);function m(a,b){return{Accept:"application/json",...a.headers||{},...b?{Authorization:`Bearer ${b}`}:{}}}let n=/^projects\/[^/]+\/locations\/[^/]+\/publishers\/[^/]+\/models\/[^/]+\/operations\/[^/]+$/;async function o(a,b){let c=(0,j.Sc)(a?.apiKey),d=c?.project_id||a?.projectId||a?.providerSpecificData?.projectId,e=a?.providerSpecificData?.location||"us-central1";if(!d)return{error:"Vertex video requires a project_id — use Service Account JSON or set providerSpecificData.projectId"};let f=a?.accessToken;if(c){let a=await (0,j.pb)(c,b);if(!a?.accessToken)return{error:"Vertex video: failed to mint access token from service account JSON"};f=a.accessToken}return f?{token:f,projectId:d,location:e}:{error:"Vertex video requires Service Account JSON or an OAuth access token (raw API keys are not supported)"}}let p={openrouter:{buildRequest({config:a,action:b,requestId:c,rawBody:d,contentType:e,token:f}){let g=a.baseUrl.replace(/\/$/,"");return c?{method:"GET",url:`${g}/${encodeURIComponent(c)}`,headers:m(a,f)}:l.has(b)?e&&!e.includes("application/json")?{error:"OpenRouter video requires an application/json body"}:{method:"POST",url:g,headers:{...m(a,f),"Content-Type":"application/json"},body:d}:{error:`OpenRouter video supports 'generations' only (got '${b}')`}}},vertex:{async buildRequest({config:a,action:b,requestId:c,rawBody:d,contentType:e,credentials:f,log:g}){let h;if(e&&!e.includes("application/json"))return{error:"Vertex video requires an application/json body"};let i=await o(f,g);if(i.error)return{error:i.error};let{token:j,projectId:k,location:l}=i,m=(a.baseUrl||"https://aiplatform.googleapis.com").replace(/\/$/,""),p={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${j}`};if(c){let a=function(a){let b=String(a??"");if(!b||b.length>1024||!/^[A-Za-z0-9_-]+$/.test(b))return null;let c=Buffer.from(b,"base64url").toString("utf8");return Buffer.from(c,"utf8").toString("base64url")!==b?null:n.test(c)?c:null}(c);return a?{method:"POST",url:`${m}/v1/${a.slice(0,a.indexOf("/operations/"))}:fetchPredictOperation`,headers:p,body:JSON.stringify({operationName:a})}:{error:"Invalid Vertex video job id"}}if("generations"!==b)return{error:`Vertex video supports 'generations' only (got '${b}')`};try{h=JSON.parse("string"==typeof d?d:d.toString("utf8"))}catch{return{error:"Invalid JSON body"}}return h.model?/^[A-Za-z0-9._-]+$/.test(h.model)?h.prompt||h.image||h.image_url?{method:"POST",url:`${m}/v1/projects/${k}/locations/${l}/publishers/google/models/${h.model}:predictLongRunning`,headers:p,body:JSON.stringify(function(a){let b={prompt:a.prompt},c=a.image??a.image_url;if(c&&"object"==typeof c)b.image=c;else if("string"==typeof c){let a=c.match(/^data:([^;]+);base64,(.*)$/s);b.image=a?{bytesBase64Encoded:a[2],mimeType:a[1]}:{gcsUri:c}}a.video&&"object"==typeof a.video&&(b.video=a.video);let d={};return null!=a.n&&(d.sampleCount=Number(a.n)),null!=a.duration&&(d.durationSeconds=Number(a.duration)),a.aspect_ratio&&(d.aspectRatio=a.aspect_ratio),a.resolution&&(d.resolution=a.resolution),null!=a.seed&&(d.seed=a.seed),a.negative_prompt&&(d.negativePrompt=a.negative_prompt),a.storage_uri&&(d.storageUri=a.storage_uri),null!=a.generate_audio&&(d.generateAudio=!!a.generate_audio),{instances:[b],...Object.keys(d).length?{parameters:d}:{}}}(h))}:{error:"Vertex video requires a prompt or an image"}:{error:"Invalid Vertex video model id"}:{error:"Vertex video requires a model (e.g. vertex/veo-3.1-generate-preview)"}},transformResponse:function(a){let b;if(!a?.name)return a;let c=(b=a.name,Buffer.from(b,"utf8").toString("base64url"));if(a.error)return{id:c,request_id:c,status:"failed",error:a.error};if(!a.done)return{id:c,request_id:c,status:"pending"};let d=(a.response?.videos||a.response?.generateVideoResponse?.generatedSamples||[]).map(a=>({url:a.gcsUri||a.video?.uri||a.uri||null,b64_json:a.bytesBase64Encoded||a.video?.bytesBase64Encoded||null,mime_type:a.mimeType||a.video?.mimeType||"video/mp4"}));return{id:c,request_id:c,status:"completed",video:d[0]||null,videos:d}}}},q=Number(process.env.VIDEO_FETCH_TIMEOUT_MS||12e4),r=new Set(["generations","edits","extensions"]);function s(a){return k.B$[a]?.videoConfig||null}async function t({provider:a,rawBody:b,credentials:d,signal:e,log:f,onCredentialsRefreshed:g}){let j={};try{j=JSON.parse("string"==typeof b?b:String(b||"{}"))}catch{return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] invalid video request body`)}if(!j.prompt)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] video request requires a prompt`);let k=[].concat(j.image??j.image_url??[]).concat(Array.isArray(j.images)?j.images:[]).concat(Array.isArray(j.image_urls)?j.image_urls:[]).filter(a=>"string"==typeof a&&a),{getExecutor:l}=await Promise.all([c.e(7774),c.e(7801),c.e(8920),c.e(24),c.e(2578),c.e(8623),c.e(3225),c.e(5215),c.e(9696),c.e(7552),c.e(2380),c.e(7373),c.e(5330),c.e(1356)]).then(c.bind(c,55330)),m=l(a);if(!m?.generateMedia)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] has no executor video support`);try{let b=d?.apiKey,[c]=await m.generateMedia({prompt:j.prompt,kind:"video",size:j.size,model:j.model,duration:j.seconds??j.duration,resolution:j.resolution,n:1,images:k,credentials:d,signal:e,log:f}),h=`data:${c.mime||"video/mp4"};base64,${c.b64}`;return g&&d?.apiKey&&d.apiKey!==b&&await g({apiKey:d.apiKey}),{success:!0,response:new Response(JSON.stringify({id:`video-${a}-${Date.now()}`,object:"video.generation",created:Math.floor(Date.now()/1e3),model:j.model||a,status:"completed",video:{url:h,...c.width?{width:c.width}:{},...c.height?{height:c.height}:{}}}),{status:200,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(e){let b=u(e?.message||"video generation failed",d),c=e?.status&&Number.isInteger(e.status)?e.status:502;return(0,h.A1)(c,`[${a}] ${b}`)}}function u(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function v({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:g,signal:l,timeoutMs:m=q,log:n,onCredentialsRefreshed:o}){let w,x;if(k.B$[a]?.videoConfig?.executorDriven===!0&&!c&&("generations"===b||"edits"===b))return t({provider:a,rawBody:d,credentials:g,signal:l,log:n,onCredentialsRefreshed:o});let y=s(a);if(!y)return(0,h.A1)(i.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!r.has(b))return(0,h.A1)(i.gx.BAD_REQUEST,`Unknown video action: ${b}`);let z=p[a]||null,A=(x="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(m):null,l&&x&&"function"==typeof AbortSignal.any?AbortSignal.any([l,x]):l||x||void 0),B=async()=>{let a,h,i=z?await z.buildRequest({config:y,action:b,requestId:c,rawBody:d,contentType:e,idempotencyKey:f,credentials:g,log:n,token:g?.accessToken||g?.apiKey}):{method:a=c?"GET":"POST",url:(h=y.baseUrl.replace(/\/$/,""),c?`${h}/${encodeURIComponent(c)}`:`${h}/${b}`),headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};return a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c&&(d["Idempotency-Key"]=c),d}({token:g?.accessToken||g?.apiKey,contentType:"POST"===a?e:null,idempotencyKey:"POST"===a?f:null}),body:"POST"===a?d:void 0};return i.error?{planError:i.error}:{response:await fetch(i.url,{method:i.method,headers:i.headers,body:i.body,signal:A})}},C=c?"GET":"POST";try{let b=await B();if(b.planError)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] ${b.planError}`);w=b.response}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,h.A1)(i.gx.REQUEST_TIMEOUT,`[${a}] video ${C} aborted: ${b.message}`);return(0,h.A1)(i.gx.BAD_GATEWAY,u(`[${a}] video upstream fetch failed: ${b.message}`,g))}if((w.status===i.gx.UNAUTHORIZED||w.status===i.gx.FORBIDDEN)&&g?.refreshToken){let b=null;try{b=await (0,j.$B)(a,g,n)}catch(b){n?.warn?.("TOKEN",`${a} | video refresh error: ${u(b.message,g)}`)}if(b?.accessToken){n?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${C}`),Object.assign(g,b),o&&await o(b);try{await w.body?.cancel?.()}catch{}try{let b=await B();if(b.planError)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] ${b.planError}`);w=b.response}catch(b){return(0,h.A1)(i.gx.BAD_GATEWAY,u(`[${a}] video retry after refresh failed: ${b.message}`,g))}}else n?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`)}let D=await w.text().catch(()=>"");if(!w.ok){let b=u(D||`HTTP ${w.status}`,g);return(0,h.A1)(w.status,`[${a}] ${b.slice(0,2e3)}`)}let E=D,F=w.headers.get("content-type")||"application/json";if(z?.transformResponse)try{E=JSON.stringify(z.transformResponse(JSON.parse(D))),F="application/json"}catch{}return{success:!0,response:new Response(E,{status:w.status,headers:{"Content-Type":F,"Access-Control-Allow-Origin":"*"}})}}var w=c(67828),x=c(7803);let y=new Set(["veoaifree-web"]);async function z(a,b){if(b){let a=await (0,e.Mc)(b).catch(()=>null);if(a?.provider&&s(a.provider))return a.provider}let c=new URL(a.url).searchParams.get("provider");return c&&s(c)?c:"xai"}let A=new Set([i.gx.UNAUTHORIZED,i.gx.FORBIDDEN,i.gx.RATE_LIMITED]);async function B(a){let b=(0,d.Tr)(a);if((await (0,e.mt)()).requireApiKey){if(!b)return(0,h.yj)(i.gx.UNAUTHORIZED,"Missing API key");if(!await (0,d.kI)(b))return(0,h.yj)(i.gx.UNAUTHORIZED,"Invalid API key")}return null}async function C(a){let b=a.headers.get("content-type")||"";if(b.includes("application/json")){let c,d=await a.text();try{c=JSON.parse(d)}catch{return{error:(0,h.yj)(i.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:d,parsed:c,contentType:b}}return{raw:Buffer.from(await a.arrayBuffer()),parsed:null,contentType:b}}async function D(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,f.mA)(b);return c.provider?s(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,h.yj)(i.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,h.yj)(i.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function E(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-9router-connection-id",String(b)),new Response(a.body,{status:a.status,headers:c})}async function F(a,b){let c=await B(a);if(c)return c;let e=await C(a);if(e.error)return e.error;let f=await D(e.parsed);if(f.error)return f.error;let{provider:j,model:k}=f,l=await (0,g.QU)(await (0,g.TM)(a),e.parsed?.model?String(e.parsed.model):"",j,k);if(l)return l;let m=e.raw;e.parsed&&k&&e.parsed.model!==k&&(m=JSON.stringify({...e.parsed,model:k}));let n=a.headers.get("x-connection-id")||null,o=a.headers.get("idempotency-key")||null;if(y.has(j)){let c=await v({provider:j,action:b,rawBody:m,contentType:e.contentType||null,idempotencyKey:null,credentials:null,signal:a.signal,log:x});return c.success?c.response:(0,h.yj)(c.status||i.gx.BAD_GATEWAY,c.error||"Video generation failed")}let p=new Set,q=null,r=null;for(;;){let c=await (0,d.c1)(j,p,k,{preferredConnectionId:n});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=q||c.lastError||"Unavailable",b=r||Number(c.lastErrorCode)||i.gx.SERVICE_UNAVAILABLE;return(0,h.wO)(b,`[${j}/${k||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===p.size)return(0,h.yj)(i.gx.BAD_REQUEST,`No credentials for provider: ${j}`);return(0,h.yj)(r||i.gx.SERVICE_UNAVAILABLE,q||"All accounts unavailable")}let f=await (0,w.checkAndRefreshToken)(j,c),g=await v({provider:j,action:b,rawBody:m,contentType:e.contentType||null,idempotencyKey:o,credentials:f,signal:a.signal,log:x,onCredentialsRefreshed:async a=>{await (0,w.vN)(c.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});if(g.success)return await (0,d.Pt)(c.connectionId,c,k),x.info("VIDEO",`${j.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),E(g.response,c.connectionId);let{shouldFallback:l}=await (0,d.vk)(c.connectionId,g.status,u(g.error,f),j,k);if(l&&A.has(g.status)){p.add(c.connectionId),q=g.error,r=g.status;continue}return g.response}}async function G(a,b){let c=await B(a);if(c)return c;if(!b)return(0,h.yj)(i.gx.BAD_REQUEST,"Missing video request id");let e=a.headers.get("x-connection-id")||null,f=await z(a,e),g=await (0,d.c1)(f,null,null,{preferredConnectionId:e});if(!g||g.allRateLimited)return(0,h.yj)(i.gx.BAD_REQUEST,`No credentials for provider: ${f}`);let j=await (0,w.checkAndRefreshToken)(f,g),k=await v({provider:f,requestId:b,credentials:j,signal:a.signal,log:x,onCredentialsRefreshed:async a=>{await (0,w.vN)(g.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});return k.success?(await (0,d.Pt)(g.connectionId,g,null),E(k.response,g.connectionId)):(await (0,d.vk)(g.connectionId,k.status,u(k.error,j),f,null),k.response)}},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
1
+ "use strict";exports.id=9128,exports.ids=[9128],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66581:(a,b,c)=>{c.d(b,{g:()=>F,s:()=>G});var d=c(80238),e=c(89718),f=c(38775),g=c(27811),h=c(43659),i=c(41004),j=c(8521),k=c(26070);let l=new Set(["generations"]);function m(a,b){return{Accept:"application/json",...a.headers||{},...b?{Authorization:`Bearer ${b}`}:{}}}let n=/^projects\/[^/]+\/locations\/[^/]+\/publishers\/[^/]+\/models\/[^/]+\/operations\/[^/]+$/;async function o(a,b){let c=(0,j.Sc)(a?.apiKey),d=c?.project_id||a?.projectId||a?.providerSpecificData?.projectId,e=a?.providerSpecificData?.location||"us-central1";if(!d)return{error:"Vertex video requires a project_id — use Service Account JSON or set providerSpecificData.projectId"};let f=a?.accessToken;if(c){let a=await (0,j.pb)(c,b);if(!a?.accessToken)return{error:"Vertex video: failed to mint access token from service account JSON"};f=a.accessToken}return f?{token:f,projectId:d,location:e}:{error:"Vertex video requires Service Account JSON or an OAuth access token (raw API keys are not supported)"}}let p={openrouter:{buildRequest({config:a,action:b,requestId:c,rawBody:d,contentType:e,token:f}){let g=a.baseUrl.replace(/\/$/,"");return c?{method:"GET",url:`${g}/${encodeURIComponent(c)}`,headers:m(a,f)}:l.has(b)?e&&!e.includes("application/json")?{error:"OpenRouter video requires an application/json body"}:{method:"POST",url:g,headers:{...m(a,f),"Content-Type":"application/json"},body:d}:{error:`OpenRouter video supports 'generations' only (got '${b}')`}}},vertex:{async buildRequest({config:a,action:b,requestId:c,rawBody:d,contentType:e,credentials:f,log:g}){let h;if(e&&!e.includes("application/json"))return{error:"Vertex video requires an application/json body"};let i=await o(f,g);if(i.error)return{error:i.error};let{token:j,projectId:k,location:l}=i,m=(a.baseUrl||"https://aiplatform.googleapis.com").replace(/\/$/,""),p={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${j}`};if(c){let a=function(a){let b=String(a??"");if(!b||b.length>1024||!/^[A-Za-z0-9_-]+$/.test(b))return null;let c=Buffer.from(b,"base64url").toString("utf8");return Buffer.from(c,"utf8").toString("base64url")!==b?null:n.test(c)?c:null}(c);return a?{method:"POST",url:`${m}/v1/${a.slice(0,a.indexOf("/operations/"))}:fetchPredictOperation`,headers:p,body:JSON.stringify({operationName:a})}:{error:"Invalid Vertex video job id"}}if("generations"!==b)return{error:`Vertex video supports 'generations' only (got '${b}')`};try{h=JSON.parse("string"==typeof d?d:d.toString("utf8"))}catch{return{error:"Invalid JSON body"}}return h.model?/^[A-Za-z0-9._-]+$/.test(h.model)?h.prompt||h.image||h.image_url?{method:"POST",url:`${m}/v1/projects/${k}/locations/${l}/publishers/google/models/${h.model}:predictLongRunning`,headers:p,body:JSON.stringify(function(a){let b={prompt:a.prompt},c=a.image??a.image_url;if(c&&"object"==typeof c)b.image=c;else if("string"==typeof c){let a=c.match(/^data:([^;]+);base64,(.*)$/s);b.image=a?{bytesBase64Encoded:a[2],mimeType:a[1]}:{gcsUri:c}}a.video&&"object"==typeof a.video&&(b.video=a.video);let d={};return null!=a.n&&(d.sampleCount=Number(a.n)),null!=a.duration&&(d.durationSeconds=Number(a.duration)),a.aspect_ratio&&(d.aspectRatio=a.aspect_ratio),a.resolution&&(d.resolution=a.resolution),null!=a.seed&&(d.seed=a.seed),a.negative_prompt&&(d.negativePrompt=a.negative_prompt),a.storage_uri&&(d.storageUri=a.storage_uri),null!=a.generate_audio&&(d.generateAudio=!!a.generate_audio),{instances:[b],...Object.keys(d).length?{parameters:d}:{}}}(h))}:{error:"Vertex video requires a prompt or an image"}:{error:"Invalid Vertex video model id"}:{error:"Vertex video requires a model (e.g. vertex/veo-3.1-generate-preview)"}},transformResponse:function(a){let b;if(!a?.name)return a;let c=(b=a.name,Buffer.from(b,"utf8").toString("base64url"));if(a.error)return{id:c,request_id:c,status:"failed",error:a.error};if(!a.done)return{id:c,request_id:c,status:"pending"};let d=(a.response?.videos||a.response?.generateVideoResponse?.generatedSamples||[]).map(a=>({url:a.gcsUri||a.video?.uri||a.uri||null,b64_json:a.bytesBase64Encoded||a.video?.bytesBase64Encoded||null,mime_type:a.mimeType||a.video?.mimeType||"video/mp4"}));return{id:c,request_id:c,status:"completed",video:d[0]||null,videos:d}}}},q=Number(process.env.VIDEO_FETCH_TIMEOUT_MS||12e4),r=new Set(["generations","edits","extensions"]);function s(a){return k.B$[a]?.videoConfig||null}async function t({provider:a,rawBody:b,credentials:d,signal:e,log:f,onCredentialsRefreshed:g}){let j={};try{j=JSON.parse("string"==typeof b?b:String(b||"{}"))}catch{return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] invalid video request body`)}if(!j.prompt)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] video request requires a prompt`);let k=[].concat(j.image??j.image_url??[]).concat(Array.isArray(j.images)?j.images:[]).concat(Array.isArray(j.image_urls)?j.image_urls:[]).filter(a=>"string"==typeof a&&a),{getExecutor:l}=await Promise.all([c.e(7774),c.e(7801),c.e(8920),c.e(24),c.e(2578),c.e(8623),c.e(3225),c.e(5215),c.e(9696),c.e(7552),c.e(2380),c.e(7373),c.e(6690),c.e(5330),c.e(1356)]).then(c.bind(c,55330)),m=l(a);if(!m?.generateMedia)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] has no executor video support`);try{let b=d?.apiKey,[c]=await m.generateMedia({prompt:j.prompt,kind:"video",size:j.size,model:j.model,duration:j.seconds??j.duration,resolution:j.resolution,n:1,images:k,credentials:d,signal:e,log:f}),h=`data:${c.mime||"video/mp4"};base64,${c.b64}`;return g&&d?.apiKey&&d.apiKey!==b&&await g({apiKey:d.apiKey}),{success:!0,response:new Response(JSON.stringify({id:`video-${a}-${Date.now()}`,object:"video.generation",created:Math.floor(Date.now()/1e3),model:j.model||a,status:"completed",video:{url:h,...c.width?{width:c.width}:{},...c.height?{height:c.height}:{}}}),{status:200,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(e){let b=u(e?.message||"video generation failed",d),c=e?.status&&Number.isInteger(e.status)?e.status:502;return(0,h.A1)(c,`[${a}] ${b}`)}}function u(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function v({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:g,signal:l,timeoutMs:m=q,log:n,onCredentialsRefreshed:o}){let w,x;if(k.B$[a]?.videoConfig?.executorDriven===!0&&!c&&("generations"===b||"edits"===b))return t({provider:a,rawBody:d,credentials:g,signal:l,log:n,onCredentialsRefreshed:o});let y=s(a);if(!y)return(0,h.A1)(i.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!r.has(b))return(0,h.A1)(i.gx.BAD_REQUEST,`Unknown video action: ${b}`);let z=p[a]||null,A=(x="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(m):null,l&&x&&"function"==typeof AbortSignal.any?AbortSignal.any([l,x]):l||x||void 0),B=async()=>{let a,h,i=z?await z.buildRequest({config:y,action:b,requestId:c,rawBody:d,contentType:e,idempotencyKey:f,credentials:g,log:n,token:g?.accessToken||g?.apiKey}):{method:a=c?"GET":"POST",url:(h=y.baseUrl.replace(/\/$/,""),c?`${h}/${encodeURIComponent(c)}`:`${h}/${b}`),headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};return a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c&&(d["Idempotency-Key"]=c),d}({token:g?.accessToken||g?.apiKey,contentType:"POST"===a?e:null,idempotencyKey:"POST"===a?f:null}),body:"POST"===a?d:void 0};return i.error?{planError:i.error}:{response:await fetch(i.url,{method:i.method,headers:i.headers,body:i.body,signal:A})}},C=c?"GET":"POST";try{let b=await B();if(b.planError)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] ${b.planError}`);w=b.response}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,h.A1)(i.gx.REQUEST_TIMEOUT,`[${a}] video ${C} aborted: ${b.message}`);return(0,h.A1)(i.gx.BAD_GATEWAY,u(`[${a}] video upstream fetch failed: ${b.message}`,g))}if((w.status===i.gx.UNAUTHORIZED||w.status===i.gx.FORBIDDEN)&&g?.refreshToken){let b=null;try{b=await (0,j.$B)(a,g,n)}catch(b){n?.warn?.("TOKEN",`${a} | video refresh error: ${u(b.message,g)}`)}if(b?.accessToken){n?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${C}`),Object.assign(g,b),o&&await o(b);try{await w.body?.cancel?.()}catch{}try{let b=await B();if(b.planError)return(0,h.A1)(i.gx.BAD_REQUEST,`[${a}] ${b.planError}`);w=b.response}catch(b){return(0,h.A1)(i.gx.BAD_GATEWAY,u(`[${a}] video retry after refresh failed: ${b.message}`,g))}}else n?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`)}let D=await w.text().catch(()=>"");if(!w.ok){let b=u(D||`HTTP ${w.status}`,g);return(0,h.A1)(w.status,`[${a}] ${b.slice(0,2e3)}`)}let E=D,F=w.headers.get("content-type")||"application/json";if(z?.transformResponse)try{E=JSON.stringify(z.transformResponse(JSON.parse(D))),F="application/json"}catch{}return{success:!0,response:new Response(E,{status:w.status,headers:{"Content-Type":F,"Access-Control-Allow-Origin":"*"}})}}var w=c(67828),x=c(7803);let y=new Set(["veoaifree-web"]);async function z(a,b){if(b){let a=await (0,e.Mc)(b).catch(()=>null);if(a?.provider&&s(a.provider))return a.provider}let c=new URL(a.url).searchParams.get("provider");return c&&s(c)?c:"xai"}let A=new Set([i.gx.UNAUTHORIZED,i.gx.FORBIDDEN,i.gx.RATE_LIMITED]);async function B(a){let b=(0,d.Tr)(a);if((await (0,e.mt)()).requireApiKey){if(!b)return(0,h.yj)(i.gx.UNAUTHORIZED,"Missing API key");if(!await (0,d.kI)(b))return(0,h.yj)(i.gx.UNAUTHORIZED,"Invalid API key")}return null}async function C(a){let b=a.headers.get("content-type")||"";if(b.includes("application/json")){let c,d=await a.text();try{c=JSON.parse(d)}catch{return{error:(0,h.yj)(i.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:d,parsed:c,contentType:b}}return{raw:Buffer.from(await a.arrayBuffer()),parsed:null,contentType:b}}async function D(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,f.mA)(b);return c.provider?s(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,h.yj)(i.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,h.yj)(i.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function E(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-9router-connection-id",String(b)),new Response(a.body,{status:a.status,headers:c})}async function F(a,b){let c=await B(a);if(c)return c;let e=await C(a);if(e.error)return e.error;let f=await D(e.parsed);if(f.error)return f.error;let{provider:j,model:k}=f,l=await (0,g.QU)(await (0,g.TM)(a),e.parsed?.model?String(e.parsed.model):"",j,k);if(l)return l;let m=e.raw;e.parsed&&k&&e.parsed.model!==k&&(m=JSON.stringify({...e.parsed,model:k}));let n=a.headers.get("x-connection-id")||null,o=a.headers.get("idempotency-key")||null;if(y.has(j)){let c=await v({provider:j,action:b,rawBody:m,contentType:e.contentType||null,idempotencyKey:null,credentials:null,signal:a.signal,log:x});return c.success?c.response:(0,h.yj)(c.status||i.gx.BAD_GATEWAY,c.error||"Video generation failed")}let p=new Set,q=null,r=null;for(;;){let c=await (0,d.c1)(j,p,k,{preferredConnectionId:n});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=q||c.lastError||"Unavailable",b=r||Number(c.lastErrorCode)||i.gx.SERVICE_UNAVAILABLE;return(0,h.wO)(b,`[${j}/${k||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===p.size)return(0,h.yj)(i.gx.BAD_REQUEST,`No credentials for provider: ${j}`);return(0,h.yj)(r||i.gx.SERVICE_UNAVAILABLE,q||"All accounts unavailable")}let f=await (0,w.checkAndRefreshToken)(j,c),g=await v({provider:j,action:b,rawBody:m,contentType:e.contentType||null,idempotencyKey:o,credentials:f,signal:a.signal,log:x,onCredentialsRefreshed:async a=>{await (0,w.vN)(c.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});if(g.success)return await (0,d.Pt)(c.connectionId,c,k),x.info("VIDEO",`${j.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),E(g.response,c.connectionId);let{shouldFallback:l}=await (0,d.vk)(c.connectionId,g.status,u(g.error,f),j,k);if(l&&A.has(g.status)){p.add(c.connectionId),q=g.error,r=g.status;continue}return g.response}}async function G(a,b){let c=await B(a);if(c)return c;if(!b)return(0,h.yj)(i.gx.BAD_REQUEST,"Missing video request id");let e=a.headers.get("x-connection-id")||null,f=await z(a,e),g=await (0,d.c1)(f,null,null,{preferredConnectionId:e});if(!g||g.allRateLimited)return(0,h.yj)(i.gx.BAD_REQUEST,`No credentials for provider: ${f}`);let j=await (0,w.checkAndRefreshToken)(f,g),k=await v({provider:f,requestId:b,credentials:j,signal:a.signal,log:x,onCredentialsRefreshed:async a=>{await (0,w.vN)(g.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});return k.success?(await (0,d.Pt)(g.connectionId,g,null),E(k.response,g.connectionId)):(await (0,d.vk)(g.connectionId,k.status,u(k.error,j),f,null),k.response)}},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
@@ -1,3 +1,3 @@
1
- "use strict";exports.id=9489,exports.ids=[7247,9489],exports.modules={428:(a,b,c)=>{c.d(b,{J:()=>i});var d=c(38775),e=c(80238),f=c(67828),g=c(83017),h=c(57874);async function i({body:a,models:b,routerModel:c=h.UH,log:j,timeoutMs:k=h.rc}){if(!Array.isArray(b)||b.length<=1)return null;let l="string"==typeof c&&c.trim()?c.trim():h.UH,m=(0,h.nn)(a);if(!m)return j?.debug?.("COMBO","smart-router: empty prompt state, skipping classification"),null;let n=(0,h.JE)(b);if(0===Object.keys(n).length)return null;try{let a,b,c=await (0,d.mA)(l);if(!c?.provider)return j?.warn?.("COMBO",`smart-router: unrecognized router model "${l}"`),null;let{provider:i,model:o}=c,p=await (0,e.c1)(i,new Set,o);if(!p||p.allRateLimited)return j?.warn?.("COMBO",`smart-router: no credentials available for router provider "${i}"`),null;let q=await (0,f.checkAndRefreshToken)(i,p),r=new Promise((b,c)=>{a=setTimeout(()=>c(Error(`System One router timed out after ${k}ms`)),k)}),s=(0,g.l)({body:{model:o,state:m,questions:{route:{type:"choice",instructions:"Which of these configured models is the most appropriate for this request?",criteria:n}}},modelInfo:{provider:i,model:o},credentials:q,log:j,onRequestSuccess:()=>{}});try{b=await Promise.race([s,r])}finally{clearTimeout(a)}if(!b?.success||!b.response)return j?.warn?.("COMBO",`smart-router: evaluation failed (${b?.status||"error"})`),null;let t=await b.response.json(),u=(0,h.Kn)(t);if(!u||!u.choice)return j?.warn?.("COMBO","smart-router: response missing valid route choice"),null;return u}catch(a){return j?.warn?.("COMBO",`smart-router: evaluation aborted (${a?.message||String(a)})`),null}}},3894:(a,b,c)=>{c.d(b,{F_:()=>g,Nc:()=>h,Qh:()=>t,Su:()=>q,ag:()=>o,kI:()=>p,rl:()=>u,sy:()=>s});var d=c(79646),e=c(33873),f=c.n(e);let g=["code","ml"],h={code:["tree-sitter","tree-sitter-language-pack"],ml:["torch","huggingface-hub"]},i="win32"===process.platform,j=i?"where":"which",k=i?[`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python313\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python312\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python311\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python310\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python313\\Scripts`]:["/usr/local/bin","/opt/homebrew/bin","/Library/Frameworks/Python.framework/Versions/3.13/bin","/Library/Frameworks/Python.framework/Versions/3.12/bin","/Library/Frameworks/Python.framework/Versions/3.11/bin","/Library/Frameworks/Python.framework/Versions/3.10/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],l=[...k,process.env.PATH||""].filter(Boolean).join(f().delimiter),m=["python3.13","python3.12","python3.11","python3.10","python3","python"],n=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]),o=process.env.HEADROOM_URL||"http://localhost:8787";function p(){try{let a=(0,d.execSync)(`${j} headroom`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function q(){let a=null;for(let b of function(){let a=[],b=p();if(b){let c=f().dirname(b);for(let b of i?["python.exe","python3.exe"]:["python3","python3.13","python"])a.push(f().join(c,b))}for(let b of k)if(b)for(let c of m)a.push(f().join(b,i?`${c}.exe`:c));return a.push(...m),a}())try{let c=(0,d.execSync)(`${b} --version`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).toString().trim().match(/(\d+)\.(\d+)/);if(!c)continue;let[e,f]=[parseInt(c[1],10),parseInt(c[2],10)];if(!(e>3||3===e&&f>=10))continue;a||(a=b);try{return(0,d.execFileSync)(b,["-m","pip","show","headroom-ai"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}),b}catch{}}catch{}return a}async function r(a){if(!a)return!1;let b=String(a).replace(/\/$/,"");try{return(await fetch(`${b}/health`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}function s(a){try{let b=new URL(a);return n.has(b.hostname)}catch{return!1}}async function t(a){let b=p(),c=q(),d=!!b,e=await r(a),f=s(a),g=d?u(c):{installed:!1,version:null,extras:{code:!1,ml:!1}};return{installed:d,path:b,running:e,python:c,localUrl:f,canStart:d&&f,version:g.version,extras:g.extras}}function u(a){let b=a||q();if(!b)return{installed:!1,version:null,extras:{code:!1,ml:!1}};try{let a=(0,d.execFileSync)(b,["-m","pip","list","--format=json","--disable-pip-version-check"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}).toString(),c=JSON.parse(a),e=new Set(c.map(a=>String(a.name||"").toLowerCase()));if(!e.has("headroom-ai"))return{installed:!1,version:null,extras:{code:!1,ml:!1}};let f=c.find(a=>a.name?.toLowerCase()==="headroom-ai")?.version||null,i={};for(let a of g)i[a]=h[a].some(a=>e.has(a));return{installed:!0,version:f,extras:i}}catch{return{installed:!1,version:null,extras:{code:!1,ml:!1}}}}},17603:(a,b,c)=>{c.d(b,{R8:()=>l,ar:()=>n,vB:()=>j});var d=c(24);let e=["vision","pdf","audioInput","videoInput"],f=new Set(e),g="oc/mimo-v2.6-flash-free",h=a=>"oc/mimo-v2.5-free"===a?g:a;function i(a,b){var c;let d=Array.isArray(c=b?.capacityAdapter?.[a])?{enabled:!0,roundRobin:!1,models:c.map(a=>h(a?.model||a)).filter(Boolean)}:c&&"object"==typeof c?{enabled:!1!==c.enabled,roundRobin:!!c.roundRobin,models:Array.isArray(c.models)?c.models.map(h).filter(Boolean):[]}:{enabled:!1,roundRobin:!1,models:[]};return d.enabled&&0===d.models.length?{...d,models:[g]}:d}function j(a,b){for(let c of[...a||[]].filter(a=>f.has(a))){let{enabled:a,models:d}=i(c,b);if(a&&0!==d.length)return function(a,b){let{enabled:c,roundRobin:d}=i(a,b);return c&&d?"round-robin":"fallback"}(c,b)}return"fallback"}function k(a,b){let c=a.indexOf("/"),e=c>0?a.slice(0,c):"",f=c>0?a.slice(c+1):a,g=(0,d.getCapabilitiesForModel)(e,f);return b.every(a=>!0===g[a])}function l(a,b,c){let d=[...b||[]].filter(a=>f.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>k(a,d)))return a;let g=(function(a){let b=new Set,c=[];for(let d of e){let{enabled:e,models:f}=i(d,a);if(e)for(let a of f)b.has(a)||(b.add(a),c.push(a))}return c})(c).filter(b=>!a.includes(b)&&k(b,d));return 0===g.length?a:[...g,...a]}function m(a){return"string"==typeof a?a.length:Array.isArray(a)?a.reduce((a,b)=>a+("string"==typeof b?.text?b.text.length:50),0):0}function n(a,b){let c=new Set(b);return 0===c.size?a:(b,e,...f)=>{if(c.has(e)){let a=e.indexOf("/"),c=a>0?e.slice(0,a):"",f=a>0?e.slice(a+1):e,{contextWindow:g}=(0,d.getCapabilitiesForModel)(c,f);b=function(a,b){let c=Array.isArray(a.messages)?"messages":Array.isArray(a.input)?"input":Array.isArray(a.contents)?"contents":null;if(!c)return a;let d=a[c];if(!d||0===d.length)return a;let e=a=>"system"===a||"developer"===a,f=d.filter(a=>e(a?.role)),g=d.filter(a=>!e(a?.role));if(0===g.length)return a;let h=a=>"assistant"===a||"model"===a,i=g.length-1;for(;i>=0&&!h(g[i]?.role);)i--;let j=g.slice(i+1),k=g.slice(0,i+1);if(0===k.length)return a;let l=a=>a.content??a.parts,n=.8*(b||2e5)*4,o=k.slice(0,6),p=f.concat(o,j).reduce((a,b)=>a+m(l(b)),0);for(;p>n&&o.length>0;)p-=m(l(o.pop()));return o.length===k.length?a:{...a,[c]:[...f,...o,...j]}}(b,g)}return a(b,e,...f)}}},46634:(a,b,c)=>{c.d(b,{Mo:()=>h,RG:()=>l,V:()=>i,Y8:()=>k,xl:()=>m});var d=c(1932),e=c(87155);let f=null,g=null;function h(){return f?{loaded:!0,version:f.version,loadedAt:f.loadedAt}:{loaded:!1}}async function i(){return f||g||(g=j().finally(()=>{g=null}))}async function j(){let a=(0,e.S1)();if(!a.installed){let a=Error("PXPIPE is not installed");throw a.code="NOT_INSTALLED",a}let b=`${(0,d.pathToFileURL)((0,e.CG)()).href}?v=${encodeURIComponent(a.version||"0")}`,c=await import(b);if("function"!=typeof c.transformAnthropicMessages)throw Error("installed pxpipe package does not export transformAnthropicMessages");return f={module:c,version:a.version,loadedAt:Date.now()}}function k(){let a=!!f;return f=null,a}async function l({autoLoad:a=!0}={}){try{if(!f&&!a)return null;let{module:b}=await i();return b.transformAnthropicMessages}catch{return null}}async function m(){let a=Date.now(),{module:b}=await i(),c=new TextEncoder().encode(JSON.stringify({model:"claude-fable-5",max_tokens:16,messages:[{role:"user",content:"ping"}]})),d=await b.transformAnthropicMessages({body:c,model:"claude-fable-5"});if(!d||"boolean"!=typeof d.applied||!(d.body instanceof Uint8Array))throw Error("transform returned an unexpected shape");return{ok:!0,reason:d.reason,durationMs:Date.now()-a}}},46945:(a,b,c)=>{c.d(b,{V:()=>e});let d=/\[1m\]$/i;function e(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(d);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}},57247:(a,b,c)=>{c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(57786),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},74388:(a,b,c)=>{c.d(b,{Az:()=>l,SP:()=>o,T0:()=>k});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(87155);let i=g().join(h.XF,"events.jsonl"),j=g().join(h.XF,"events.jsonl.1");function k(a){try{e().existsSync(h.XF)||e().mkdirSync(h.XF,{recursive:!0});try{e().statSync(i).size>5242880&&e().renameSync(i,j)}catch{}e().appendFile(i,JSON.stringify({ts:Date.now(),...a})+"\n",()=>{})}catch{}}function l({sinceMs:a=null,limit:b=null}={}){let c=[];for(let b of[j,i])try{if(!e().existsSync(b))continue;for(let d of e().readFileSync(b,"utf8").split("\n"))if(d)try{let b=JSON.parse(d);if(a&&b.ts<a)continue;c.push(b)}catch{}}catch{}return c.sort((a,b)=>a.ts-b.ts),b?c.slice(-b):c}function m(){return{requests:0,compressed:0,bypassed:0,errors:0,tokensBeforeEst:0,tokensAfterEst:0,tokensSavedEst:0,savedPct:0,imagesGenerated:0,compressionTimeMs:0,avgCompressionMs:0}}function n(a,b){a.requests++,b.applied?(a.compressed++,a.tokensBeforeEst+=b.tokensBeforeEst||0,a.tokensAfterEst+=b.tokensAfterEst||0,a.tokensSavedEst+=b.tokensSavedEst||0,a.imagesGenerated+=b.imageCount||0,a.compressionTimeMs+=b.durationMs||0):"transform_error"===b.reason||"timeout"===b.reason?a.errors++:a.bypassed++}function o({timelineDays:a=30,recentLimit:b=100}={}){let c=l(),d=Date.now(),e=new Date(new Date(d).setHours(0,0,0,0)).getTime(),f={all:m(),today:m(),yesterday:m(),last7d:m(),last30d:m()},g=new Map;for(let b=a-1;b>=0;b--){let a=new Date(e-864e5*b);g.set(a.toISOString().slice(0,10),{date:a.toISOString().slice(0,10),tokensSavedEst:0,compressed:0,requests:0})}for(let a of c){n(f.all,a),a.ts>=e?n(f.today,a):a.ts>=e-864e5&&n(f.yesterday,a),a.ts>=d-6048e5&&n(f.last7d,a),a.ts>=d-2592e6&&n(f.last30d,a);let b=new Date(a.ts).toISOString().slice(0,10),c=g.get(b);c&&(c.requests++,a.applied&&(c.compressed++,c.tokensSavedEst+=a.tokensSavedEst||0))}for(let a of Object.values(f))a.savedPct=a.tokensBeforeEst>0?+(a.tokensSavedEst/a.tokensBeforeEst*100).toFixed(2):0,a.avgCompressionMs=a.compressed>0?Math.round(a.compressionTimeMs/a.compressed):0;return{windows:f,timeline:[...g.values()],recent:c.slice(-b).reverse()}}},79489:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{P:()=>C});var e=c(48895),f=c(80238),g=c(45974),h=c(89718),i=c(38775),j=c(92500),k=c(3894),l=c(46634),m=c(74388),n=c(43659),o=c(48136),p=c(25308),q=c(17603),r=c(27349),s=c(41004),t=c(14170),u=c(80662),v=c(7803),w=c(67828),x=c(38160),y=c(46945),z=c(27811),A=c(428),B=a([e,j]);async function C(a,b=null){let c;try{c=await a.json()}catch{return v.warn("CHAT","Invalid JSON body"),(0,n.yj)(s.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:c,headers:Object.fromEntries(a.headers.entries())});let{model:d,contextMarker:e}=(0,y.V)(c.model);e&&(c.model=d);let g=(0,u.bS)({headers:b?.headers,body:c}),j=g?.sessionId||null,k=a.headers.get("Authorization"),l=(0,f.Tr)(a);if(k&&l){let a=v.maskKey(l);v.debug("AUTH",`API Key: ${a}`)}else v.debug("AUTH","No API key provided (local mode)");let m=await (0,h.mt)();if(m.requireApiKey){if(!l)return v.warn("AUTH","Missing API key (requireApiKey=true)"),(0,n.yj)(s.gx.UNAUTHORIZED,"Missing API key");if(!await (0,f.kI)(l))return v.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,n.yj)(s.gx.UNAUTHORIZED,"Invalid API key")}if(!d)return v.warn("CHAT","Missing model"),(0,n.yj)(s.gx.BAD_REQUEST,"Missing model");let o=await (0,z.TM)(a),t=await (0,z.cI)(o,d);if(t)return t;let w=a?.headers?.get("user-agent")||"",x=(0,r.c)(c,d,w,!!m.ccFilterNaming);if(x)return x.response||x;let B=(0,p.t8)(c),E=await (0,i.d_)(d);if(E){let e=m.comboStrategies||{},f=e[d]?.fallbackStrategy||m.comboStrategy||"fallback",g=await (0,z.Ge)(o,(0,q.R8)(E,B,m),E),h=g.filter(a=>!E.includes(a));if("fusion"===f)return v.info("CHAT",`Combo "${d}" with ${E.length} models (strategy: fusion)`),(0,p.vt)({body:c,models:E,handleSingleModel:(c,d,e)=>{let f=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};f={...b,body:d}}return D(c,d,f,a,l)},log:v,comboName:d,judgeModel:e[d]?.judgeModel,tuning:e[d]?.fusionTuning});let i=m.comboStickyRoundRobinLimit,k=e[d]||{};return v.info("CHAT",`Combo "${d}" with ${g.length} models (strategy: ${f}, sticky: ${i})`),(0,p.Pr)({body:c,models:g,handleSingleModel:(0,q.ar)((c,d)=>D(c,d,b,a,l),h),log:v,comboName:d,comboStrategy:f,comboStickyLimit:i,sessionId:j,smartPolicy:k.smartPolicy||"smart",sessionSticky:!1!==k.sessionSticky,confidenceThreshold:"number"==typeof k.confidenceThreshold?k.confidenceThreshold:.8,resolveSmartChoice:"smart"===f?(a,b)=>(0,A.J)({body:a,models:b,routerModel:k.routerModel,log:v}):null})}let F=await (0,z.Ge)(o,(0,q.R8)([d],B,m),[d]);if(F.length>1){let e=F.filter(a=>a!==d);return v.info("CHAT",`Capacity adapter for [${[...B].join(",")}] on "${d}" → trying ${F.join(", ")}`),(0,p.Pr)({body:c,models:F,handleSingleModel:(0,q.ar)((c,d)=>D(c,d,b,a,l),e),log:v,comboName:d,comboStrategy:(0,q.vB)(B,m)})}return D(c,d,b,a,l,e?`${d.slice(d.indexOf("/")+1)}[${e}]`:null)}async function D(a,b,c=null,d=null,e=null,r=null){let y=await (0,i.mA)(b);if(!y.provider){let f=await (0,i.d_)(b);if(f){let g=await (0,h.mt)(),i=g.comboStrategies||{},j=i[b]?.fallbackStrategy||g.comboStrategy||"fallback",k=(0,p.t8)(a),l=await (0,z.TM)(d),m=await (0,z.Ge)(l,(0,q.R8)(f,k,g),f),n=m.filter(a=>!f.includes(a));if("fusion"===j)return v.info("CHAT",`Combo "${b}" with ${f.length} models (strategy: fusion)`),(0,p.vt)({body:a,models:f,handleSingleModel:(a,b,f)=>{let g=c;if(f&&c){let{tools:a,tool_choice:b,...d}=c.body||{};g={...c,body:d}}return D(a,b,g,d,e)},log:v,comboName:b,judgeModel:i[b]?.judgeModel,tuning:i[b]?.fusionTuning});let o=g.comboStickyRoundRobinLimit,r=i[b]||{},s=(0,u.bS)({headers:c?.headers,body:a}),t=s?.sessionId||null;return v.info("CHAT",`Combo "${b}" with ${m.length} models (strategy: ${j}, sticky: ${o})`),(0,p.Pr)({body:a,models:m,handleSingleModel:(0,q.ar)((a,b)=>D(a,b,c,d,e),n),log:v,comboName:b,comboStrategy:j,comboStickyLimit:o,sessionId:t,smartPolicy:r.smartPolicy||"smart",sessionSticky:!1!==r.sessionSticky,confidenceThreshold:"number"==typeof r.confidenceThreshold?r.confidenceThreshold:.8,resolveSmartChoice:"smart"===j?(a,b)=>(0,A.J)({body:a,models:b,routerModel:r.routerModel,log:v}):null})}return v.warn("CHAT","Invalid model format",{model:b}),(0,n.yj)(s.gx.BAD_REQUEST,"Invalid model format")}let{provider:B,model:C}=y,E=d?.headers?.get("user-agent")||"",F=new Set,G=null,H=null,I=null;for(;;){let b=await (0,f.c1)(B,F,C,{requestedModel:r||C});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=G||b.lastError||"Unavailable",c=s.gx.SERVICE_UNAVAILABLE;return v.warn("CHAT",`[${B}/${C}] ${a} (${b.retryAfterHuman})`),(0,n.wO)(c,`[${B}/${C}] ${a}`,b.retryAfter,b.retryAfterHuman,I)}if(0===F.size)return v.warn("AUTH",`No active credentials for provider: ${B}`),(0,n.yj)(s.gx.NOT_FOUND,`No active credentials for provider: ${B}`);return v.warn("CHAT","No more accounts available",{provider:B}),(0,n.yj)(H||s.gx.SERVICE_UNAVAILABLE,G||"All accounts unavailable",I)}let i=await (0,w.checkAndRefreshToken)(B,b);if(("antigravity"===B||"gemini-cli"===B)&&!i.projectId){let a=await (0,x.eG)(b.connectionId,i.accessToken,B);a&&(i.projectId=a,(0,w.vN)(b.connectionId,{projectId:a}).catch(()=>{}))}let p=await (0,h.mt)(),q=(p.providerThinking||{})[B]||null,u=await (0,j.wk)({body:{...a,model:`${B}/${C}`},modelInfo:{provider:B,model:C},credentials:i,log:v,clientRawRequest:c,connectionId:b.connectionId,userAgent:E,apiKey:e,ccFilterNaming:!!p.ccFilterNaming,rtkEnabled:!!p.rtkEnabled,headroomEnabled:!!p.headroomEnabled,headroomUrl:p.headroomUrl||k.ag,headroomCompressUserMessages:!!p.headroomCompressUserMessages,headroomTimeoutMs:p.headroomTimeoutMs,cavemanEnabled:!!p.cavemanEnabled,cavemanLevel:p.cavemanLevel||"full",ponytailEnabled:!!p.ponytailEnabled,ponytailLevel:p.ponytailLevel||"full",customPromptEnabled:!!p.customPromptEnabled,customPrompt:p.customPrompt||"",pxpipeEnabled:!!p.pxpipeEnabled,pxpipeMinChars:p.pxpipeMinChars,pxpipeTimeoutMs:p.pxpipeTimeoutMs,pxpipeTransform:p.pxpipeEnabled?await (0,l.RG)():null,onPxpipeEvent:m.T0,providerThinking:q,providerOverrides:(p.providerOverrides||{})[B]||null,sourceFormatOverride:d?.url?(0,t.t)(new URL(d.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,w.vN)(b.connectionId,{...a,existingProviderSpecificData:b.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,f.Pt)(b.connectionId,b,C),(0,g.vO)(b.connectionId,C)}});if(u.success)return u.response;let y=null,z=u.resetsAtMs;if("antigravity"===B&&(409===u.status||429===u.status)&&(y=await (0,g.XJ)(b.connectionId,u.status,C,i.accessToken,b.providerSpecificData))&&(z=y),"antigravity"===B&&y||(await (0,f.vk)(b.connectionId,u.status,u.error,B,C,z)).shouldFallback){v.warn("FALLBACK",`⇄ ACC:${b.connectionName} UNAVAILABLE (${u.status}) → NEXT ACCOUNT`),F.add(b.connectionId),G=u.error,H=u.status,I=(0,o.d)(u.response?.headers);continue}return u.response}}[e,j]=B.then?(await B)():B,d()}catch(a){d(a)}})},83017:(a,b,c)=>{c.d(b,{l:()=>j});var d=c(43659),e=c(41004),f=c(26070),g=c(57247),h=c(17373);let i=new Set(["opencode","opencode-zen"]);async function j({body:a,modelInfo:b,credentials:c,log:k,onRequestSuccess:l}){let m,n,{provider:o,model:p}=b,q=f.B$[o]?.systemoneConfig,r=function(a,b){let c=a?.trim();if(!c)return b?.baseUrl;if(!b?.path)return c;let d=c.replace(/\/+$/,""),e=b.path.replace(/\/+$/,"");if(d.endsWith(e))return d;let f=e.slice(0,e.lastIndexOf("/"));return f&&d.endsWith(f)?d+e.slice(f.length):d+e}(c?.providerSpecificData?.baseUrl,q);if(!r)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' does not support System One.`);if(r.includes("{accountId}")){let a=c?.providerSpecificData?.accountId;if(!a)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' requires accountId in providerSpecificData.`);r=r.replace("{accountId}",a)}if(r.includes("{model}")&&(r=r.replace(/\{model\}/g,p)),void 0===a.state||null===a.state)return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: state");if(!a.questions||"object"!=typeof a.questions||Array.isArray(a.questions))return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: questions");let s=c?.apiKey||c?.accessToken,t={"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{},...q.headers||{},...i.has(o)?{"x-opencode-session":(0,h.f6)()}:{}},u={...a,model:(0,g.kt)(o,p)||p};k?.debug?.("SYSTEMONE",`${o.toUpperCase()} | ${p}`);try{m=await fetch(r,{method:"POST",headers:t,body:JSON.stringify(u),..."function"==typeof AbortSignal?.timeout?{signal:AbortSignal.timeout(e.pH)}:{}})}catch(b){let a=(0,d.lR)(b,o,p,e.gx.BAD_GATEWAY);return k?.debug?.("SYSTEMONE",`Fetch error: ${a}`),(0,d.A1)(e.gx.BAD_GATEWAY,a)}if(!m.ok){let{statusCode:a,message:b}=await (0,d.zL)(m),c=(0,d.lR)(Error(b),o,p,a);return k?.debug?.("SYSTEMONE",`Provider error: ${c}`),(0,d.A1)(a,c)}try{n=await m.json()}catch{return(0,d.A1)(e.gx.BAD_GATEWAY,`Invalid JSON response from ${o}`)}l&&await l();let v=n?.usage;return{success:!0,usage:v?{prompt_tokens:v.input_tokens||0,completion_tokens:v.output_tokens||0}:null,response:new Response(JSON.stringify(n),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}},87155:(a,b,c)=>{c.d(b,{CG:()=>q,ED:()=>u,S1:()=>s,XF:()=>j,_g:()=>t,no:()=>r,sW:()=>w});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(79646),i=c(49120);let j=g().join(i.n,"pxpipe"),k="pxpipe-proxy",l=g().join(j,"install.log"),m="win32"===process.platform,n=[...m?[`${process.env.ProgramFiles||""}\\nodejs`,`${process.env.APPDATA||""}\\npm`]:["/usr/local/bin","/opt/homebrew/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],process.env.PATH||""].filter(Boolean).join(g().delimiter),o=null;function p(){return g().join(j,"node_modules",k)}function q(){return g().join(p(),"dist","core","library.js")}function r(){try{let a=(0,h.execSync)(`${m?"where":"which"} npm`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:n}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function s(){try{let a=g().join(p(),"package.json");if(!e().existsSync(a)||!e().existsSync(q()))return{installed:!1,version:null,path:null};let b=JSON.parse(e().readFileSync(a,"utf8"));return{installed:!0,version:b.version||null,path:p()}}catch{return{installed:!1,version:null,path:null}}}function t(){return null!==o}function u(){return o||(o=v().finally(()=>{o=null}))}async function v(){let a=r();if(!a){let a=Error("npm not found on PATH — Node.js/npm is required to install PXPIPE");throw a.code="NPM_NOT_FOUND",a}e().existsSync(j)||e().mkdirSync(j,{recursive:!0});let b=g().join(j,"package.json");e().existsSync(b)||e().writeFileSync(b,JSON.stringify({name:"9router-pxpipe-host",private:!0},null,2));let c=e().openSync(l,"a");e().writeSync(c,`
1
+ "use strict";exports.id=9489,exports.ids=[7247,9489],exports.modules={428:(a,b,c)=>{c.d(b,{J:()=>i});var d=c(38775),e=c(80238),f=c(67828),g=c(83017),h=c(57874);async function i({body:a,models:b,routerModel:c=h.UH,log:j,timeoutMs:k=h.rc}){if(!Array.isArray(b)||b.length<=1)return null;let l="string"==typeof c&&c.trim()?c.trim():h.UH,m=(0,h.nn)(a);if(!m)return j?.debug?.("COMBO","smart-router: empty prompt state, skipping classification"),null;let n=(0,h.JE)(b);if(0===Object.keys(n).length)return null;try{let a,b,c=await (0,d.mA)(l);if(!c?.provider)return j?.warn?.("COMBO",`smart-router: unrecognized router model "${l}"`),null;let{provider:i,model:o}=c,p=await (0,e.c1)(i,new Set,o);if(!p||p.allRateLimited)return j?.warn?.("COMBO",`smart-router: no credentials available for router provider "${i}"`),null;let q=await (0,f.checkAndRefreshToken)(i,p),r=new Promise((b,c)=>{a=setTimeout(()=>c(Error(`System One router timed out after ${k}ms`)),k)}),s=(0,g.l)({body:{model:o,state:m,questions:{route:{type:"choice",instructions:"Which of these configured models is the most appropriate for this request?",criteria:n}}},modelInfo:{provider:i,model:o},credentials:q,log:j,onRequestSuccess:()=>{}});try{b=await Promise.race([s,r])}finally{clearTimeout(a)}if(!b?.success||!b.response)return j?.warn?.("COMBO",`smart-router: evaluation failed (${b?.status||"error"})`),null;let t=await b.response.json(),u=(0,h.Kn)(t);if(!u||!u.choice)return j?.warn?.("COMBO","smart-router: response missing valid route choice"),null;return u}catch(a){return j?.warn?.("COMBO",`smart-router: evaluation aborted (${a?.message||String(a)})`),null}}},3894:(a,b,c)=>{c.d(b,{F_:()=>g,Nc:()=>h,Qh:()=>t,Su:()=>q,ag:()=>o,kI:()=>p,rl:()=>u,sy:()=>s});var d=c(79646),e=c(33873),f=c.n(e);let g=["code","ml"],h={code:["tree-sitter","tree-sitter-language-pack"],ml:["torch","huggingface-hub"]},i="win32"===process.platform,j=i?"where":"which",k=i?[`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python313\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python312\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python311\\Scripts`,`${process.env.LOCALAPPDATA||""}\\Programs\\Python\\Python310\\Scripts`,`${process.env.APPDATA||""}\\Python\\Python313\\Scripts`]:["/usr/local/bin","/opt/homebrew/bin","/Library/Frameworks/Python.framework/Versions/3.13/bin","/Library/Frameworks/Python.framework/Versions/3.12/bin","/Library/Frameworks/Python.framework/Versions/3.11/bin","/Library/Frameworks/Python.framework/Versions/3.10/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],l=[...k,process.env.PATH||""].filter(Boolean).join(f().delimiter),m=["python3.13","python3.12","python3.11","python3.10","python3","python"],n=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0"]),o=process.env.HEADROOM_URL||"http://localhost:8787";function p(){try{let a=(0,d.execSync)(`${j} headroom`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function q(){let a=null;for(let b of function(){let a=[],b=p();if(b){let c=f().dirname(b);for(let b of i?["python.exe","python3.exe"]:["python3","python3.13","python"])a.push(f().join(c,b))}for(let b of k)if(b)for(let c of m)a.push(f().join(b,i?`${c}.exe`:c));return a.push(...m),a}())try{let c=(0,d.execSync)(`${b} --version`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:l}}).toString().trim().match(/(\d+)\.(\d+)/);if(!c)continue;let[e,f]=[parseInt(c[1],10),parseInt(c[2],10)];if(!(e>3||3===e&&f>=10))continue;a||(a=b);try{return(0,d.execFileSync)(b,["-m","pip","show","headroom-ai"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}),b}catch{}}catch{}return a}async function r(a){if(!a)return!1;let b=String(a).replace(/\/$/,"");try{return(await fetch(`${b}/health`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}function s(a){try{let b=new URL(a);return n.has(b.hostname)}catch{return!1}}async function t(a){let b=p(),c=q(),d=!!b,e=await r(a),f=s(a),g=d?u(c):{installed:!1,version:null,extras:{code:!1,ml:!1}};return{installed:d,path:b,running:e,python:c,localUrl:f,canStart:d&&f,version:g.version,extras:g.extras}}function u(a){let b=a||q();if(!b)return{installed:!1,version:null,extras:{code:!1,ml:!1}};try{let a=(0,d.execFileSync)(b,["-m","pip","list","--format=json","--disable-pip-version-check"],{stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:8e3,env:{...process.env,PATH:l}}).toString(),c=JSON.parse(a),e=new Set(c.map(a=>String(a.name||"").toLowerCase()));if(!e.has("headroom-ai"))return{installed:!1,version:null,extras:{code:!1,ml:!1}};let f=c.find(a=>a.name?.toLowerCase()==="headroom-ai")?.version||null,i={};for(let a of g)i[a]=h[a].some(a=>e.has(a));return{installed:!0,version:f,extras:i}}catch{return{installed:!1,version:null,extras:{code:!1,ml:!1}}}}},17603:(a,b,c)=>{c.d(b,{R8:()=>l,ar:()=>n,vB:()=>j});var d=c(24);let e=["vision","pdf","audioInput","videoInput"],f=new Set(e),g="oc/mimo-v2.6-flash-free",h=a=>"oc/mimo-v2.5-free"===a?g:a;function i(a,b){var c;let d=Array.isArray(c=b?.capacityAdapter?.[a])?{enabled:!0,roundRobin:!1,models:c.map(a=>h(a?.model||a)).filter(Boolean)}:c&&"object"==typeof c?{enabled:!1!==c.enabled,roundRobin:!!c.roundRobin,models:Array.isArray(c.models)?c.models.map(h).filter(Boolean):[]}:{enabled:!1,roundRobin:!1,models:[]};return d.enabled&&0===d.models.length?{...d,models:[g]}:d}function j(a,b){for(let c of[...a||[]].filter(a=>f.has(a))){let{enabled:a,models:d}=i(c,b);if(a&&0!==d.length)return function(a,b){let{enabled:c,roundRobin:d}=i(a,b);return c&&d?"round-robin":"fallback"}(c,b)}return"fallback"}function k(a,b){let c=a.indexOf("/"),e=c>0?a.slice(0,c):"",f=c>0?a.slice(c+1):a,g=(0,d.getCapabilitiesForModel)(e,f);return b.every(a=>!0===g[a])}function l(a,b,c){let d=[...b||[]].filter(a=>f.has(a));if(0===d.length||!Array.isArray(a)||0===a.length||a.some(a=>k(a,d)))return a;let g=(function(a){let b=new Set,c=[];for(let d of e){let{enabled:e,models:f}=i(d,a);if(e)for(let a of f)b.has(a)||(b.add(a),c.push(a))}return c})(c).filter(b=>!a.includes(b)&&k(b,d));return 0===g.length?a:[...g,...a]}function m(a){return"string"==typeof a?a.length:Array.isArray(a)?a.reduce((a,b)=>a+("string"==typeof b?.text?b.text.length:50),0):0}function n(a,b){let c=new Set(b);return 0===c.size?a:(b,e,...f)=>{if(c.has(e)){let a=e.indexOf("/"),c=a>0?e.slice(0,a):"",f=a>0?e.slice(a+1):e,{contextWindow:g}=(0,d.getCapabilitiesForModel)(c,f);b=function(a,b){let c=Array.isArray(a.messages)?"messages":Array.isArray(a.input)?"input":Array.isArray(a.contents)?"contents":null;if(!c)return a;let d=a[c];if(!d||0===d.length)return a;let e=a=>"system"===a||"developer"===a,f=d.filter(a=>e(a?.role)),g=d.filter(a=>!e(a?.role));if(0===g.length)return a;let h=a=>"assistant"===a||"model"===a,i=g.length-1;for(;i>=0&&!h(g[i]?.role);)i--;let j=g.slice(i+1),k=g.slice(0,i+1);if(0===k.length)return a;let l=a=>a.content??a.parts,n=.8*(b||2e5)*4,o=k.slice(0,6),p=f.concat(o,j).reduce((a,b)=>a+m(l(b)),0);for(;p>n&&o.length>0;)p-=m(l(o.pop()));return o.length===k.length?a:{...a,[c]:[...f,...o,...j]}}(b,g)}return a(b,e,...f)}}},46634:(a,b,c)=>{c.d(b,{Mo:()=>h,RG:()=>l,V:()=>i,Y8:()=>k,xl:()=>m});var d=c(1932),e=c(87155);let f=null,g=null;function h(){return f?{loaded:!0,version:f.version,loadedAt:f.loadedAt}:{loaded:!1}}async function i(){return f||g||(g=j().finally(()=>{g=null}))}async function j(){let a=(0,e.S1)();if(!a.installed){let a=Error("PXPIPE is not installed");throw a.code="NOT_INSTALLED",a}let b=`${(0,d.pathToFileURL)((0,e.CG)()).href}?v=${encodeURIComponent(a.version||"0")}`,c=await import(b);if("function"!=typeof c.transformAnthropicMessages)throw Error("installed pxpipe package does not export transformAnthropicMessages");return f={module:c,version:a.version,loadedAt:Date.now()}}function k(){let a=!!f;return f=null,a}async function l({autoLoad:a=!0}={}){try{if(!f&&!a)return null;let{module:b}=await i();return b.transformAnthropicMessages}catch{return null}}async function m(){let a=Date.now(),{module:b}=await i(),c=new TextEncoder().encode(JSON.stringify({model:"claude-fable-5",max_tokens:16,messages:[{role:"user",content:"ping"}]})),d=await b.transformAnthropicMessages({body:c,model:"claude-fable-5"});if(!d||"boolean"!=typeof d.applied||!(d.body instanceof Uint8Array))throw Error("transform returned an unexpected shape");return{ok:!0,reason:d.reason,durationMs:Date.now()-a}}},46945:(a,b,c)=>{c.d(b,{V:()=>e});let d=/\[1m\]$/i;function e(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(d);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}},57247:(a,b,c)=>{c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(8499),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b,c=null){let d="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,f=d?d[0]:"",h=f?b.slice(0,d.index).trim():b,i=e.vq[a],j=f?f.slice(1,-1).trim().toLowerCase():"",k="xhigh"===j||"max"===j?"high":"minimal"===j?"low":j;if(!k&&c&&"object"==typeof c){let a=c.reasoning_effort||c.output_config?.effort||("object"==typeof c.reasoning?c.reasoning?.effort:null);if("string"==typeof a&&a){let b=a.toLowerCase().trim();k="xhigh"===b||"max"===b?"high":"minimal"===b?"low":b}else if(c.thinking&&"object"==typeof c.thinking){let a=Number(c.thinking.budget_tokens);Number.isFinite(a)&&a>0&&(k=a>16384?"high":a<=4096?"low":"medium")}}let l=k?`${h}-${k}`:null,n=l&&m(i,l,a)||m(i,h,a),o=n?.upstreamModelId||n?.id;if(o){let a=o.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?o.slice(0,a.index).trim():o)+(f||(b&&k?`(${k})`:b))}return"cx"===a&&"string"==typeof h&&h.endsWith(g.d5)?h.slice(0,-g.d5.length)+f:h+f}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},74388:(a,b,c)=>{c.d(b,{Az:()=>l,SP:()=>o,T0:()=>k});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(87155);let i=g().join(h.XF,"events.jsonl"),j=g().join(h.XF,"events.jsonl.1");function k(a){try{e().existsSync(h.XF)||e().mkdirSync(h.XF,{recursive:!0});try{e().statSync(i).size>5242880&&e().renameSync(i,j)}catch{}e().appendFile(i,JSON.stringify({ts:Date.now(),...a})+"\n",()=>{})}catch{}}function l({sinceMs:a=null,limit:b=null}={}){let c=[];for(let b of[j,i])try{if(!e().existsSync(b))continue;for(let d of e().readFileSync(b,"utf8").split("\n"))if(d)try{let b=JSON.parse(d);if(a&&b.ts<a)continue;c.push(b)}catch{}}catch{}return c.sort((a,b)=>a.ts-b.ts),b?c.slice(-b):c}function m(){return{requests:0,compressed:0,bypassed:0,errors:0,tokensBeforeEst:0,tokensAfterEst:0,tokensSavedEst:0,savedPct:0,imagesGenerated:0,compressionTimeMs:0,avgCompressionMs:0}}function n(a,b){a.requests++,b.applied?(a.compressed++,a.tokensBeforeEst+=b.tokensBeforeEst||0,a.tokensAfterEst+=b.tokensAfterEst||0,a.tokensSavedEst+=b.tokensSavedEst||0,a.imagesGenerated+=b.imageCount||0,a.compressionTimeMs+=b.durationMs||0):"transform_error"===b.reason||"timeout"===b.reason?a.errors++:a.bypassed++}function o({timelineDays:a=30,recentLimit:b=100}={}){let c=l(),d=Date.now(),e=new Date(new Date(d).setHours(0,0,0,0)).getTime(),f={all:m(),today:m(),yesterday:m(),last7d:m(),last30d:m()},g=new Map;for(let b=a-1;b>=0;b--){let a=new Date(e-864e5*b);g.set(a.toISOString().slice(0,10),{date:a.toISOString().slice(0,10),tokensSavedEst:0,compressed:0,requests:0})}for(let a of c){n(f.all,a),a.ts>=e?n(f.today,a):a.ts>=e-864e5&&n(f.yesterday,a),a.ts>=d-6048e5&&n(f.last7d,a),a.ts>=d-2592e6&&n(f.last30d,a);let b=new Date(a.ts).toISOString().slice(0,10),c=g.get(b);c&&(c.requests++,a.applied&&(c.compressed++,c.tokensSavedEst+=a.tokensSavedEst||0))}for(let a of Object.values(f))a.savedPct=a.tokensBeforeEst>0?+(a.tokensSavedEst/a.tokensBeforeEst*100).toFixed(2):0,a.avgCompressionMs=a.compressed>0?Math.round(a.compressionTimeMs/a.compressed):0;return{windows:f,timeline:[...g.values()],recent:c.slice(-b).reverse()}}},79489:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{P:()=>C});var e=c(48895),f=c(80238),g=c(45974),h=c(89718),i=c(38775),j=c(92500),k=c(3894),l=c(46634),m=c(74388),n=c(43659),o=c(48136),p=c(25308),q=c(17603),r=c(27349),s=c(41004),t=c(14170),u=c(80662),v=c(7803),w=c(67828),x=c(38160),y=c(46945),z=c(27811),A=c(428),B=a([e,j]);async function C(a,b=null){let c;try{c=await a.json()}catch{return v.warn("CHAT","Invalid JSON body"),(0,n.yj)(s.gx.BAD_REQUEST,"Invalid JSON body")}b||(b={endpoint:new URL(a.url).pathname,body:c,headers:Object.fromEntries(a.headers.entries())});let{model:d,contextMarker:e}=(0,y.V)(c.model);e&&(c.model=d);let g=(0,u.bS)({headers:b?.headers,body:c}),j=g?.sessionId||null,k=a.headers.get("Authorization"),l=(0,f.Tr)(a);if(k&&l){let a=v.maskKey(l);v.debug("AUTH",`API Key: ${a}`)}else v.debug("AUTH","No API key provided (local mode)");let m=await (0,h.mt)();if(m.requireApiKey){if(!l)return v.warn("AUTH","Missing API key (requireApiKey=true)"),(0,n.yj)(s.gx.UNAUTHORIZED,"Missing API key");if(!await (0,f.kI)(l))return v.warn("AUTH","Invalid API key (requireApiKey=true)"),(0,n.yj)(s.gx.UNAUTHORIZED,"Invalid API key")}if(!d)return v.warn("CHAT","Missing model"),(0,n.yj)(s.gx.BAD_REQUEST,"Missing model");let o=await (0,z.TM)(a),t=await (0,z.cI)(o,d);if(t)return t;let w=a?.headers?.get("user-agent")||"",x=(0,r.c)(c,d,w,!!m.ccFilterNaming);if(x)return x.response||x;let B=(0,p.t8)(c),E=await (0,i.d_)(d);if(E){let e=m.comboStrategies||{},f=e[d]?.fallbackStrategy||m.comboStrategy||"fallback",g=await (0,z.Ge)(o,(0,q.R8)(E,B,m),E),h=g.filter(a=>!E.includes(a));if("fusion"===f)return v.info("CHAT",`Combo "${d}" with ${E.length} models (strategy: fusion)`),(0,p.vt)({body:c,models:E,handleSingleModel:(c,d,e)=>{let f=b;if(e&&b){let{tools:a,tool_choice:c,...d}=b.body||{};f={...b,body:d}}return D(c,d,f,a,l)},log:v,comboName:d,judgeModel:e[d]?.judgeModel,tuning:e[d]?.fusionTuning});let i=m.comboStickyRoundRobinLimit,k=e[d]||{};return v.info("CHAT",`Combo "${d}" with ${g.length} models (strategy: ${f}, sticky: ${i})`),(0,p.Pr)({body:c,models:g,handleSingleModel:(0,q.ar)((c,d)=>D(c,d,b,a,l),h),log:v,comboName:d,comboStrategy:f,comboStickyLimit:i,sessionId:j,smartPolicy:k.smartPolicy||"smart",sessionSticky:!1!==k.sessionSticky,confidenceThreshold:"number"==typeof k.confidenceThreshold?k.confidenceThreshold:.8,resolveSmartChoice:"smart"===f?(a,b)=>(0,A.J)({body:a,models:b,routerModel:k.routerModel,log:v}):null})}let F=await (0,z.Ge)(o,(0,q.R8)([d],B,m),[d]);if(F.length>1){let e=F.filter(a=>a!==d);return v.info("CHAT",`Capacity adapter for [${[...B].join(",")}] on "${d}" → trying ${F.join(", ")}`),(0,p.Pr)({body:c,models:F,handleSingleModel:(0,q.ar)((c,d)=>D(c,d,b,a,l),e),log:v,comboName:d,comboStrategy:(0,q.vB)(B,m)})}return D(c,d,b,a,l,e?`${d.slice(d.indexOf("/")+1)}[${e}]`:null)}async function D(a,b,c=null,d=null,e=null,r=null){let y=await (0,i.mA)(b);if(!y.provider){let f=await (0,i.d_)(b);if(f){let g=await (0,h.mt)(),i=g.comboStrategies||{},j=i[b]?.fallbackStrategy||g.comboStrategy||"fallback",k=(0,p.t8)(a),l=await (0,z.TM)(d),m=await (0,z.Ge)(l,(0,q.R8)(f,k,g),f),n=m.filter(a=>!f.includes(a));if("fusion"===j)return v.info("CHAT",`Combo "${b}" with ${f.length} models (strategy: fusion)`),(0,p.vt)({body:a,models:f,handleSingleModel:(a,b,f)=>{let g=c;if(f&&c){let{tools:a,tool_choice:b,...d}=c.body||{};g={...c,body:d}}return D(a,b,g,d,e)},log:v,comboName:b,judgeModel:i[b]?.judgeModel,tuning:i[b]?.fusionTuning});let o=g.comboStickyRoundRobinLimit,r=i[b]||{},s=(0,u.bS)({headers:c?.headers,body:a}),t=s?.sessionId||null;return v.info("CHAT",`Combo "${b}" with ${m.length} models (strategy: ${j}, sticky: ${o})`),(0,p.Pr)({body:a,models:m,handleSingleModel:(0,q.ar)((a,b)=>D(a,b,c,d,e),n),log:v,comboName:b,comboStrategy:j,comboStickyLimit:o,sessionId:t,smartPolicy:r.smartPolicy||"smart",sessionSticky:!1!==r.sessionSticky,confidenceThreshold:"number"==typeof r.confidenceThreshold?r.confidenceThreshold:.8,resolveSmartChoice:"smart"===j?(a,b)=>(0,A.J)({body:a,models:b,routerModel:r.routerModel,log:v}):null})}return v.warn("CHAT","Invalid model format",{model:b}),(0,n.yj)(s.gx.BAD_REQUEST,"Invalid model format")}let{provider:B,model:C}=y,E=d?.headers?.get("user-agent")||"",F=new Set,G=null,H=null,I=null;for(;;){let b=await (0,f.c1)(B,F,C,{requestedModel:r||C});if(!b||b.allRateLimited){if(b?.allRateLimited){let a=G||b.lastError||"Unavailable",c=s.gx.SERVICE_UNAVAILABLE;return v.warn("CHAT",`[${B}/${C}] ${a} (${b.retryAfterHuman})`),(0,n.wO)(c,`[${B}/${C}] ${a}`,b.retryAfter,b.retryAfterHuman,I)}if(0===F.size)return v.warn("AUTH",`No active credentials for provider: ${B}`),(0,n.yj)(s.gx.NOT_FOUND,`No active credentials for provider: ${B}`);return v.warn("CHAT","No more accounts available",{provider:B}),(0,n.yj)(H||s.gx.SERVICE_UNAVAILABLE,G||"All accounts unavailable",I)}let i=await (0,w.checkAndRefreshToken)(B,b);if(("antigravity"===B||"gemini-cli"===B)&&!i.projectId){let a=await (0,x.eG)(b.connectionId,i.accessToken,B);a&&(i.projectId=a,(0,w.vN)(b.connectionId,{projectId:a}).catch(()=>{}))}let p=await (0,h.mt)(),q=(p.providerThinking||{})[B]||null,u=await (0,j.wk)({body:{...a,model:`${B}/${C}`},modelInfo:{provider:B,model:C},credentials:i,log:v,clientRawRequest:c,connectionId:b.connectionId,userAgent:E,apiKey:e,ccFilterNaming:!!p.ccFilterNaming,rtkEnabled:!!p.rtkEnabled,headroomEnabled:!!p.headroomEnabled,headroomUrl:p.headroomUrl||k.ag,headroomCompressUserMessages:!!p.headroomCompressUserMessages,headroomTimeoutMs:p.headroomTimeoutMs,cavemanEnabled:!!p.cavemanEnabled,cavemanLevel:p.cavemanLevel||"full",ponytailEnabled:!!p.ponytailEnabled,ponytailLevel:p.ponytailLevel||"full",customPromptEnabled:!!p.customPromptEnabled,customPrompt:p.customPrompt||"",pxpipeEnabled:!!p.pxpipeEnabled,pxpipeMinChars:p.pxpipeMinChars,pxpipeTimeoutMs:p.pxpipeTimeoutMs,pxpipeTransform:p.pxpipeEnabled?await (0,l.RG)():null,onPxpipeEvent:m.T0,providerThinking:q,providerOverrides:(p.providerOverrides||{})[B]||null,sourceFormatOverride:d?.url?(0,t.t)(new URL(d.url).pathname,a):null,onCredentialsRefreshed:async a=>{await (0,w.vN)(b.connectionId,{...a,existingProviderSpecificData:b.providerSpecificData,testStatus:"active"})},onRequestSuccess:async()=>{await (0,f.Pt)(b.connectionId,b,C),(0,g.vO)(b.connectionId,C)}});if(u.success)return u.response;let y=null,z=u.resetsAtMs;if("antigravity"===B&&(409===u.status||429===u.status)&&(y=await (0,g.XJ)(b.connectionId,u.status,C,i.accessToken,b.providerSpecificData))&&(z=y),"antigravity"===B&&y||(await (0,f.vk)(b.connectionId,u.status,u.error,B,C,z)).shouldFallback){v.warn("FALLBACK",`⇄ ACC:${b.connectionName} UNAVAILABLE (${u.status}) → NEXT ACCOUNT`),F.add(b.connectionId),G=u.error,H=u.status,I=(0,o.d)(u.response?.headers);continue}return u.response}}[e,j]=B.then?(await B)():B,d()}catch(a){d(a)}})},83017:(a,b,c)=>{c.d(b,{l:()=>j});var d=c(43659),e=c(41004),f=c(26070),g=c(57247),h=c(17373);let i=new Set(["opencode","opencode-zen"]);async function j({body:a,modelInfo:b,credentials:c,log:k,onRequestSuccess:l}){let m,n,{provider:o,model:p}=b,q=f.B$[o]?.systemoneConfig,r=function(a,b){let c=a?.trim();if(!c)return b?.baseUrl;if(!b?.path)return c;let d=c.replace(/\/+$/,""),e=b.path.replace(/\/+$/,"");if(d.endsWith(e))return d;let f=e.slice(0,e.lastIndexOf("/"));return f&&d.endsWith(f)?d+e.slice(f.length):d+e}(c?.providerSpecificData?.baseUrl,q);if(!r)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' does not support System One.`);if(r.includes("{accountId}")){let a=c?.providerSpecificData?.accountId;if(!a)return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${o}' requires accountId in providerSpecificData.`);r=r.replace("{accountId}",a)}if(r.includes("{model}")&&(r=r.replace(/\{model\}/g,p)),void 0===a.state||null===a.state)return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: state");if(!a.questions||"object"!=typeof a.questions||Array.isArray(a.questions))return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: questions");let s=c?.apiKey||c?.accessToken,t={"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{},...q.headers||{},...i.has(o)?{"x-opencode-session":(0,h.f6)()}:{}},u={...a,model:(0,g.kt)(o,p)||p};k?.debug?.("SYSTEMONE",`${o.toUpperCase()} | ${p}`);try{m=await fetch(r,{method:"POST",headers:t,body:JSON.stringify(u),..."function"==typeof AbortSignal?.timeout?{signal:AbortSignal.timeout(e.pH)}:{}})}catch(b){let a=(0,d.lR)(b,o,p,e.gx.BAD_GATEWAY);return k?.debug?.("SYSTEMONE",`Fetch error: ${a}`),(0,d.A1)(e.gx.BAD_GATEWAY,a)}if(!m.ok){let{statusCode:a,message:b}=await (0,d.zL)(m),c=(0,d.lR)(Error(b),o,p,a);return k?.debug?.("SYSTEMONE",`Provider error: ${c}`),(0,d.A1)(a,c)}try{n=await m.json()}catch{return(0,d.A1)(e.gx.BAD_GATEWAY,`Invalid JSON response from ${o}`)}l&&await l();let v=n?.usage;return{success:!0,usage:v?{prompt_tokens:v.input_tokens||0,completion_tokens:v.output_tokens||0}:null,response:new Response(JSON.stringify(n),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}},87155:(a,b,c)=>{c.d(b,{CG:()=>q,ED:()=>u,S1:()=>s,XF:()=>j,_g:()=>t,no:()=>r,sW:()=>w});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(79646),i=c(49120);let j=g().join(i.n,"pxpipe"),k="pxpipe-proxy",l=g().join(j,"install.log"),m="win32"===process.platform,n=[...m?[`${process.env.ProgramFiles||""}\\nodejs`,`${process.env.APPDATA||""}\\npm`]:["/usr/local/bin","/opt/homebrew/bin",`${process.env.HOME||""}/.local/bin`,"/usr/bin","/bin"],process.env.PATH||""].filter(Boolean).join(g().delimiter),o=null;function p(){return g().join(j,"node_modules",k)}function q(){return g().join(p(),"dist","core","library.js")}function r(){try{let a=(0,h.execSync)(`${m?"where":"which"} npm`,{stdio:["ignore","pipe","ignore"],windowsHide:!0,env:{...process.env,PATH:n}}).toString().trim();return a?a.split(/\r?\n/)[0].trim():null}catch{return null}}function s(){try{let a=g().join(p(),"package.json");if(!e().existsSync(a)||!e().existsSync(q()))return{installed:!1,version:null,path:null};let b=JSON.parse(e().readFileSync(a,"utf8"));return{installed:!0,version:b.version||null,path:p()}}catch{return{installed:!1,version:null,path:null}}}function t(){return null!==o}function u(){return o||(o=v().finally(()=>{o=null}))}async function v(){let a=r();if(!a){let a=Error("npm not found on PATH — Node.js/npm is required to install PXPIPE");throw a.code="NPM_NOT_FOUND",a}e().existsSync(j)||e().mkdirSync(j,{recursive:!0});let b=g().join(j,"package.json");e().existsSync(b)||e().writeFileSync(b,JSON.stringify({name:"9router-pxpipe-host",private:!0},null,2));let c=e().openSync(l,"a");e().writeSync(c,`
2
2
  [${new Date().toISOString()}] npm install ${k}@latest
3
3
  `),await new Promise((b,d)=>{let e=(0,h.spawn)(a,["install",`${k}@latest`,"--no-audit","--no-fund","--omit=dev"],{cwd:j,stdio:["ignore",c,c],windowsHide:!0,env:{...process.env,PATH:n}}),f=setTimeout(()=>{e.kill("SIGKILL"),d(Error("npm install timed out after 5 minutes — see install.log"))},3e5);e.once("error",a=>{clearTimeout(f),d(a)}),e.once("exit",a=>{clearTimeout(f),0===a?b():d(Error(`npm install exited with code ${a} — see install.log`))})}).finally(()=>e().closeSync(c));let d=s();if(!d.installed)throw Error("install finished but package is missing — see install.log");return d}function w(a=200){try{if(!e().existsSync(l))return"";return e().readFileSync(l,"utf8").split(/\r?\n/).filter(Boolean).slice(-a).join("\n")}catch{return""}}}};