@techysy/10router 1.0.6 → 1.0.7

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 (565) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  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/required-server-files.json +3 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  87. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  112. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  356. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/callback.html +1 -1
  359. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  360. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  361. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
  366. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  367. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  372. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  374. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  375. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
  376. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  377. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  380. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  381. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  382. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  385. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
  386. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  387. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  390. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  391. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  392. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  395. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
  396. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  397. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  400. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
  401. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  402. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  405. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
  406. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  407. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  410. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
  411. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  412. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  415. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  417. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  420. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
  421. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  422. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  428. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  429. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  431. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  433. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
  434. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  435. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  438. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  439. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  440. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  443. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
  444. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  445. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
  449. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  450. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  453. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  454. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  455. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/index.html +1 -1
  458. package/app/.next-cli-build/server/app/index.rsc +4 -4
  459. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  460. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  461. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  463. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  465. package/app/.next-cli-build/server/app/landing.html +1 -1
  466. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  467. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  468. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  470. package/app/.next-cli-build/server/app/login/page.js +1 -1
  471. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  473. package/app/.next-cli-build/server/app/login.html +1 -1
  474. package/app/.next-cli-build/server/app/login.rsc +5 -5
  475. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  476. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  478. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/page.js +1 -1
  480. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  482. package/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  483. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  484. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  485. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  486. package/app/.next-cli-build/server/chunks/295.js +1 -1
  487. package/app/.next-cli-build/server/chunks/318.js +7 -7
  488. package/app/.next-cli-build/server/chunks/3212.js +1 -1
  489. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  490. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  491. package/app/.next-cli-build/server/chunks/4049.js +1 -0
  492. package/app/.next-cli-build/server/chunks/412.js +1 -1
  493. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  494. package/app/.next-cli-build/server/chunks/4293.js +1 -0
  495. package/app/.next-cli-build/server/chunks/4985.js +1 -0
  496. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  497. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  498. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  499. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  500. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  501. package/app/.next-cli-build/server/chunks/6922.js +1 -0
  502. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  503. package/app/.next-cli-build/server/chunks/7598.js +1 -1
  504. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  505. package/app/.next-cli-build/server/chunks/{8038.js → 7913.js} +8 -8
  506. package/app/.next-cli-build/server/chunks/8363.js +1 -0
  507. package/app/.next-cli-build/server/chunks/8444.js +1 -1
  508. package/app/.next-cli-build/server/chunks/8499.js +7 -7
  509. package/app/.next-cli-build/server/chunks/869.js +1 -1
  510. package/app/.next-cli-build/server/chunks/8895.js +3 -3
  511. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  512. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  513. package/app/.next-cli-build/server/chunks/9140.js +19 -3
  514. package/app/.next-cli-build/server/chunks/9463.js +1 -1
  515. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  517. package/app/.next-cli-build/server/middleware.js +1 -1
  518. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/pages/404.html +1 -1
  520. package/app/.next-cli-build/server/pages/500.html +1 -1
  521. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  522. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  523. package/app/.next-cli-build/static/chunks/1321-a54e76efdf16ea12.js +1 -0
  524. package/app/.next-cli-build/static/chunks/{5116-4618105f24431c4a.js → 3346-0ae97d50d86ac1f7.js} +10 -10
  525. package/app/.next-cli-build/static/chunks/5497-cd84151680071f1d.js +7 -0
  526. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-272386fb26fd75c3.js +1 -0
  527. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f098adefd36910e1.js +1 -0
  528. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-d4b67cdea67b89d0.js +1 -0
  529. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-75cd720b6edf6d23.js +1 -0
  530. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d3c784cd4a50bef9.js +14 -0
  531. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-c1757ed34595dcdb.js +1 -0
  532. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7b9bde3902dca2bb.js +1 -0
  533. package/app/package.json +1 -1
  534. package/app/public/i18n/changelog/en.md +133 -114
  535. package/app/public/i18n/changelog/zh-CN.md +131 -112
  536. package/app/public/i18n/changelog/zh-TW.md +133 -114
  537. package/app/public/i18n/literals/zh-CN.json +1521 -1518
  538. package/app/public/i18n/literals/zh-TW.json +309 -307
  539. package/app/server.js +1 -1
  540. package/app/src/sse/services/backgroundTokenRefresh.js +35 -32
  541. package/package.json +52 -52
  542. package/src/cli/i18n/index.js +29 -5
  543. package/src/cli/tray/icon-mono-black.ico +0 -0
  544. package/src/cli/tray/icon-mono-white.ico +0 -0
  545. package/src/cli/tray/icon-template.png +0 -0
  546. package/src/cli/tray/tray.js +13 -8
  547. package/src/cli/tray/trayWin.js +39 -2
  548. package/app/.next-cli-build/server/chunks/1129.js +0 -4
  549. package/app/.next-cli-build/server/chunks/1332.js +0 -1
  550. package/app/.next-cli-build/server/chunks/3350.js +0 -1
  551. package/app/.next-cli-build/server/chunks/4452.js +0 -1
  552. package/app/.next-cli-build/server/chunks/7914.js +0 -1
  553. package/app/.next-cli-build/server/chunks/8162.js +0 -6
  554. package/app/.next-cli-build/server/chunks/9703.js +0 -17
  555. package/app/.next-cli-build/static/chunks/1321-656ff6a3f06c59ae.js +0 -1
  556. package/app/.next-cli-build/static/chunks/5497-7b21d4160c9e592e.js +0 -7
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a217fda9e3b75a4c.js +0 -1
  558. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-5db6b536a4ab4991.js +0 -1
  559. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-56ceed313e85c919.js +0 -1
  560. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-ddb08251c0405731.js +0 -1
  561. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a2431d795923337a.js +0 -14
  562. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-595256b6306fa952.js +0 -1
  563. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-568a544f8e220d5b.js +0 -1
  564. /package/app/.next-cli-build/static/{rPl9WrF0GIBOKSW3yAMMs → aKCEN8jaWm631dVqBrSte}/_buildManifest.js +0 -0
  565. /package/app/.next-cli-build/static/{rPl9WrF0GIBOKSW3yAMMs → aKCEN8jaWm631dVqBrSte}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=869,exports.ids=[615,869,7247],exports.modules={30869:(a,b,c)=>{c.d(b,{Nu:()=>g,UY:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={repoUrl:"https://github.com/techysy/10router",donateUrl:"https://raw.githubusercontent.com/techysy/10router/refs/heads/main/donate.json",changelogUrlBase:"https://raw.githubusercontent.com/techysy/10router/refs/heads/main/public/i18n/changelog/",changelogUrlFallbackBase:"https://gitee.com/techysy/10router/raw/main/public/i18n/changelog/"},h={npmPackageName:"@techysy/10router",installCmd:"npm i -g @techysy/10router",installCmdLatest:"npm i -g @techysy/10router@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},i={maxLines:200,pollIntervalMs:1e3},j={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.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},35024:(a,b,c)=>{c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(26070);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},39006:a=>{a.exports={rE:"1.0.6"}},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(59463);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.A.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","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.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}:{},...a.topologyHiddenByDefault?{topologyHiddenByDefault:!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.community?{community:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.modelsJsonUrl?{modelsJsonUrl:a.modelsJsonUrl}:{},...a.fallbackModelsJsonUrl?{fallbackModelsJsonUrl:a.fallbackModelsJsonUrl}:{}}}(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.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>o,PROVIDER_MODELS:()=>f.vq,SM:()=>i,Xg:()=>r,cY:()=>t,ez:()=>n,fZ:()=>j,kt:()=>p,ux:()=>m});var d=c(35024),e=c(59463),f=c(26070),g=c(99511),h=c(59096);function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];return c?(0,g.ec)(l(c,b,a)):null}function o(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function p(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let q=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),r=Object.fromEntries(Object.keys(d.xq).map(a=>[a,q[a]||a]));function s(a){let b=r[a]||a;return f.vq[b]||[]}function t(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},59096:(a,b,c)=>{c.d(b,{d5:()=>d,nh:()=>e});let d="-review";function e(a){if(!a||"string"!=typeof a)return!1;let b=a.replace(/\([^()]+\)\s*$/,"").trim(),c=b.includes("/")?b.split("/").pop():b;return/^muse[-_]?spark(?:$|[-_:.\s])/i.test(c)}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(57247);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}};
1
+ "use strict";exports.id=869,exports.ids=[615,869,7247],exports.modules={30869:(a,b,c)=>{c.d(b,{Nu:()=>g,UY:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={repoUrl:"https://github.com/techysy/10router",donateUrl:"https://raw.githubusercontent.com/techysy/10router/refs/heads/main/donate.json",changelogUrlBase:"https://raw.githubusercontent.com/techysy/10router/refs/heads/main/public/i18n/changelog/",changelogUrlFallbackBase:"https://gitee.com/techysy/10router/raw/main/public/i18n/changelog/"},h={npmPackageName:"@techysy/10router",installCmd:"npm i -g @techysy/10router",installCmdLatest:"npm i -g @techysy/10router@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},i={maxLines:200,pollIntervalMs:1e3},j={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.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},35024:(a,b,c)=>{c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(26070);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},39006:a=>{a.exports={rE:"1.0.7"}},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(59463);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.A.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","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.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}:{},...a.topologyHiddenByDefault?{topologyHiddenByDefault:!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.community?{community:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.modelsJsonUrl?{modelsJsonUrl:a.modelsJsonUrl}:{},...a.fallbackModelsJsonUrl?{fallbackModelsJsonUrl:a.fallbackModelsJsonUrl}:{}}}(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.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>o,PROVIDER_MODELS:()=>f.vq,SM:()=>i,Xg:()=>r,cY:()=>t,ez:()=>n,fZ:()=>j,kt:()=>p,ux:()=>m});var d=c(35024),e=c(59463),f=c(26070),g=c(99511),h=c(59096);function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];return c?(0,g.ec)(l(c,b,a)):null}function o(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function p(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let q=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),r=Object.fromEntries(Object.keys(d.xq).map(a=>[a,q[a]||a]));function s(a){let b=r[a]||a;return f.vq[b]||[]}function t(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},59096:(a,b,c)=>{c.d(b,{d5:()=>d,nh:()=>e});let d="-review";function e(a){if(!a||"string"!=typeof a)return!1;let b=a.replace(/\([^()]+\)\s*$/,"").trim(),c=b.includes("/")?b.split("/").pop():b;return/^muse[-_]?spark(?:$|[-_:.\s])/i.test(c)}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(57247);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}};
@@ -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:()=>q});var d=c(77598),e=c(14170),f=c(88499),g=c(44236),h=c(39551),i=c(73483),j=c(43659),k=c(41004),l=c(81626),m=c(86171),n=c(47370),o=c(55399),p=c(55673);async function q({providerResponse:a,provider:b,model:c,sourceFormat:r,targetFormat:s,body:t,stream:u,translatedBody:v,finalBody:w,requestStartTime:x,connectionId:y,apiKey:z,clientRawRequest:A,onRequestSuccess:B,reqLogger:C,toolNameMap:D,customToolNames:E,trackDone:F,appendLog:G,pxpipe:H,reqTag:I,log:J}){let K;if(F(),(a.headers.get("content-type")||"").includes("text/event-stream")){let b=await a.text(),d=(0,l.F)(b,c);if(!d)return G({status:`FAILED ${k.gx.BAD_GATEWAY}`}),(0,j.A1)(k.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");K=d}else try{K=await a.json()}catch(a){return G({status:`FAILED ${k.gx.BAD_GATEWAY}`}),console.error(`[ChatCore] Failed to parse JSON from ${b}:`,a.message),(0,j.A1)(k.gx.BAD_GATEWAY,`Invalid JSON response from ${b}`)}C.logProviderResponse(a.status,a.statusText,a.headers,K),B&&Promise.resolve().then(B).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)}),K=(0,o.kR)(K,D);let L=(0,m.MK)(K);G({tokens:L,status:"200 OK"}),(0,m.qr)({provider:b,model:c,tokens:L,connectionId:y,apiKey:z,endpoint:A?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),J?.line&&J.line(I,"\uD83D\uDCCA",(0,m.U$)({usage:L,latency:{total:Date.now()-x}}));let M=(0,f.nZ)(s,r)?function(a,b,c,d=null){if(b===c)return a;if(b===e.h.OPENAI&&c===e.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:p.Du.REASONING,summary:[{type:p.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:p.Du.MESSAGE,role:p.z7.ASSISTANT,content:[{type:p.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?p.Du.CUSTOM_TOOL_CALL:p.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,d);if(b===e.h.OPENAI&&c===e.h.CLAUDE)return function(a){if(!a?.choices?.[0])return a;let b=a.choices[0],c=b.message||{},d=[],f=c.reasoning_content||c.provider_specific_fields?.reasoning_content||"";for(let a of(f&&d.push({type:"thinking",thinking:f}),"string"==typeof c.content&&c.content.length>0&&d.push({type:"text",text:c.content}),c.tool_calls||[])){let b=a.function||{};d.push({type:"tool_use",id:a.id||`toolu_${Date.now()}_${d.length}`,name:b.name||a.name||"",input:function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(b.arguments||a.arguments)})}0===d.length&&d.push({type:"text",text:""});let h=a.usage||{};return{id:String(a.id||`msg_${Date.now()}`).replace(/^chatcmpl-/,""),type:"message",role:"assistant",model:a.model||"unknown",content:d,stop_reason:(0,g.Q)(b.finish_reason,e.h.CLAUDE),stop_sequence:null,usage:{input_tokens:h.prompt_tokens||h.input_tokens||0,output_tokens:h.completion_tokens||h.output_tokens||0}}}(a);if(b===e.h.OPENAI)return a;if(b===e.h.GEMINI||b===e.h.ANTIGRAVITY||b===e.h.GEMINI_CLI||b===e.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:()=>q});var d=c(77598),e=c(14170),f=c(88499),g=c(44236),h=c(39551),i=c(73483),j=c(43659),k=c(41004),l=c(81626),m=c(86171),n=c(47370),o=c(55399),p=c(49622);async function q({providerResponse:a,provider:b,model:c,sourceFormat:r,targetFormat:s,body:t,stream:u,translatedBody:v,finalBody:w,requestStartTime:x,connectionId:y,apiKey:z,clientRawRequest:A,onRequestSuccess:B,reqLogger:C,toolNameMap:D,customToolNames:E,trackDone:F,appendLog:G,pxpipe:H,reqTag:I,log:J}){let K;if(F(),(a.headers.get("content-type")||"").includes("text/event-stream")){let b=await a.text(),d=(0,l.F)(b,c);if(!d)return G({status:`FAILED ${k.gx.BAD_GATEWAY}`}),(0,j.A1)(k.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");K=d}else try{K=await a.json()}catch(a){return G({status:`FAILED ${k.gx.BAD_GATEWAY}`}),console.error(`[ChatCore] Failed to parse JSON from ${b}:`,a.message),(0,j.A1)(k.gx.BAD_GATEWAY,`Invalid JSON response from ${b}`)}C.logProviderResponse(a.status,a.statusText,a.headers,K),B&&Promise.resolve().then(B).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)}),K=(0,o.kR)(K,D);let L=(0,m.MK)(K);G({tokens:L,status:"200 OK"}),(0,m.qr)({provider:b,model:c,tokens:L,connectionId:y,apiKey:z,endpoint:A?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),J?.line&&J.line(I,"\uD83D\uDCCA",(0,m.U$)({usage:L,latency:{total:Date.now()-x}}));let M=(0,f.nZ)(s,r)?function(a,b,c,d=null){if(b===c)return a;if(b===e.h.OPENAI&&c===e.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:p.Du.REASONING,summary:[{type:p.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:p.Du.MESSAGE,role:p.z7.ASSISTANT,content:[{type:p.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?p.Du.CUSTOM_TOOL_CALL:p.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,d);if(b===e.h.OPENAI&&c===e.h.CLAUDE)return function(a){if(!a?.choices?.[0])return a;let b=a.choices[0],c=b.message||{},d=[],f=c.reasoning_content||c.provider_specific_fields?.reasoning_content||"";for(let a of(f&&d.push({type:"thinking",thinking:f}),"string"==typeof c.content&&c.content.length>0&&d.push({type:"text",text:c.content}),c.tool_calls||[])){let b=a.function||{};d.push({type:"tool_use",id:a.id||`toolu_${Date.now()}_${d.length}`,name:b.name||a.name||"",input:function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(b.arguments||a.arguments)})}0===d.length&&d.push({type:"text",text:""});let h=a.usage||{};return{id:String(a.id||`msg_${Date.now()}`).replace(/^chatcmpl-/,""),type:"message",role:"assistant",model:a.model||"unknown",content:d,stop_reason:(0,g.Q)(b.finish_reason,e.h.CLAUDE),stop_sequence:null,usage:{input_tokens:h.prompt_tokens||h.input_tokens||0,output_tokens:h.completion_tokens||h.output_tokens||0}}}(a);if(b===e.h.OPENAI)return a;if(b===e.h.GEMINI||b===e.h.ANTIGRAVITY||b===e.h.GEMINI_CLI||b===e.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===e.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===e.h.OLLAMA?(0,h._)(a):a}(K,s,r,E):K,N=r===e.h.CLAUDE&&M?.type==="message",O=r===e.h.OPENAI_RESPONSES&&M?.object==="response";if(M?.choices?.[0]){let a=M.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(N||O||(M.object||(M.object="chat.completion"),M.created||(M.created=Math.floor(Date.now()/1e3))),!N&&!O&&(delete M.prompt_filter_results,M?.choices))for(let a of M.choices)delete a.content_filter_results;if(M?.usage&&(M.usage=(0,i.WL)((0,i.O9)(M.usage),r)),!N&&!O&&M?.choices)for(let a of M.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;C.logConvertedResponse(M);let P=Date.now()-x;return(0,n.ox)((0,m.$R)({provider:b,model:c,connectionId:y,latency:{ttft:P,total:P},tokens:L||{prompt_tokens:0,completion_tokens:0},request:(0,m.Fo)(t,u),providerRequest:w||v||null,providerResponse:K||null,response:{content:M?.choices?.[0]?.message?.content||M?.content||null,thinking:M?.choices?.[0]?.message?.reasoning_content||M?.reasoning_content||null,finish_reason:M?.choices?.[0]?.finish_reason||"unknown"},pxpipe:H,status:"success"},{endpoint:A?.endpoint||null})).catch(a=>{console.error("[RequestDetail] Failed to save:",a.message)}),{success:!0,response:new Response(JSON.stringify(M),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}},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}},14294:(a,b,c)=>{function d(a){return!!a&&"string"==typeof a&&(/(?:^|\/|-|_)(free|freemium)(?:$|\/|-|_|\.)/i.test(a)||/(?:^|\/)(free)\//i.test(a))}function e(a,b,c=null){let d=`${a}/${b}`,f="";if(Number.isFinite(c)&&c>0){let a=Math.ceil(c/1e3);f=a>=3600?`约 ${(a/3600).toFixed(1)} 小时后可再试`:a>=60?`约 ${Math.ceil(a/60)} 分钟后可再试`:`约 ${a} 秒后可再试`}else f="建议稍后再试(免费额度通常按小时/天窗口重置)";return`免费模型 ${d} 触发限流(rate limit),${f},或切换其它可用模型 / 改用付费档。`}c.d(b,{q:()=>d,u:()=>e})},14724:(a,b,c)=>{c.d(b,{F:()=>g});let d=[{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 e(a){return a?.name||a?.function?.name||""}function f(a,b){return"string"==typeof b?a===b:b instanceof RegExp&&b.test(a)}function g(a){if(!Array.isArray(a)||0===a.length)return{tools:a,stripped:[]};let b=a.map(e),c=new Set;for(let a of d)if(b.some(b=>a.triggers.some(a=>f(b,a))))for(let d of b)a.strip.some(a=>f(d,a))&&c.add(d);return 0===c.size?{tools:a,stripped:[]}:{tools:a.filter(a=>!c.has(e(a))),stripped:Array.from(c)}}},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,{$:()=>q,M:()=>p});var d=c(77598),e=c(14170),f=c(88499),g=c(71857),h=c(59657),i=c(35024),j=c(41004),k=c(30320),l=c(86171),m=c(47370),n=c(78959);let o={[e.h.OPENAI_RESPONSES]:e.h.OPENAI_RESPONSES,[e.h.CLAUDE]:e.h.CLAUDE,[e.h.ANTIGRAVITY]:e.h.ANTIGRAVITY,[e.h.GEMINI]:e.h.ANTIGRAVITY,[e.h.GEMINI_CLI]:e.h.ANTIGRAVITY};async function p({providerResponse:a,provider:b,model:c,sourceFormat:d,targetFormat:q,userAgent:r,body:s,stream:t,translatedBody:u,finalBody:v,requestStartTime:w,connectionId:x,apiKey:y,clientRawRequest:z,onRequestSuccess:A,reqLogger:B,toolNameMap:C,customToolNames:D,streamController:E,onStreamComplete:F,streamDetailId:G,pxpipe:H,reqTag:I,log:J}){A&&Promise.resolve().then(A).catch(a=>{console.error("[ChatCore] onRequestSuccess failed:",a?.message||a)});let K=(a.headers.get("content-type")||"").toLowerCase();if(K&&!K.includes("text/event-stream")&&!K.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 (${K})`),g=a.status||502;return J?.errorLine?J.errorLine(I,"✗",`BLOCKED ${g} \xb7 ${b}/${c} \xb7 non-SSE (${K})
4
4
  ${f}`):console.warn(`[STREAM] ${b} | ${c} | blocked pipe: ${f} [${g}]`),E?.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 L=function({provider:a,sourceFormat:b,targetFormat:c,userAgent:d,reqLogger:h,toolNameMap:j,customToolNames:k,model:l,connectionId:m,body:n,onStreamComplete:p,apiKey:q}){let r=d?.toLowerCase().includes("droid")||d?.toLowerCase().includes("codex-cli");if(i.xq[a]?.format===e.h.OPENAI_RESPONSES&&c===e.h.OPENAI_RESPONSES&&!r){let c=o[b]||e.h.OPENAI;return(0,g.i5)(e.h.OPENAI_RESPONSES,c,a,h,j,l,m,n,p,q,k)}return(0,f.nZ)(c,b)?(0,g.i5)(c,b,a,h,j,l,m,n,p,q,k):(0,g.l2)(a,h,l,m,n,p,q)}({provider:b,sourceFormat:d,targetFormat:q,userAgent:r,reqLogger:B,toolNameMap:C,customToolNames:D,model:c,connectionId:x,body:s,onStreamComplete:F,apiKey:y}),M=d===e.h.OPENAI_RESPONSES&&q===e.h.OPENAI_RESPONSES?k.Hr:null,N=i.xq[b]?.stallTimeoutMs||j.xM,O=(0,h.Jb)(a,L,E,M,N);return(0,m.ox)((0,l.$R)({provider:b,model:c,connectionId:x,latency:{ttft:0,total:Date.now()-w},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,l.Fo)(s,t),providerRequest:v||u||null,providerResponse:"[Streaming - raw response not captured]",response:{content:"[Streaming in progress...]",thinking:null,type:"streaming"},pxpipe:H,status:"success"},{id:G})).catch(a=>{console.error("[RequestDetail] Failed to save streaming request:",a.message)}),{success:!0,response:new Response(O,{headers:n.RK})}}function q({provider:a,model:b,connectionId:c,apiKey:e,requestStartTime:f,body:g,stream:h,finalBody:i,translatedBody:j,clientRawRequest:k,pxpipe:n,reqTag:o,log:p}){let r=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`;return{onStreamComplete:(q,s,t)=>{let u={ttft:t?t-f:Date.now()-f,total:Date.now()-f},v=q?.content||"[Empty streaming response]",w=q?.thinking||null;(0,m.ox)((0,l.$R)({provider:a,model:b,connectionId:c,latency:u,tokens:s||{prompt_tokens:0,completion_tokens:0},request:(0,l.Fo)(g,h),providerRequest:i||j||null,providerResponse:v,response:{content:v,thinking:w,type:"streaming"},pxpipe:n,status:"success"},{id:r})).catch(a=>{console.error("[RequestDetail] Failed to update streaming content:",a.message)}),(0,l.qr)({provider:a,model:b,tokens:s,connectionId:c,apiKey:e,endpoint:k?.endpoint,usageKey:(0,d.randomUUID)(),label:"STREAM USAGE",silent:!0}),p?.line&&p.line(o,"\uD83D\uDCCA",(0,l.U$)({usage:s,latency:u}))},streamDetailId:r}}},24643:(a,b,c)=>{c.d(b,{J:()=>e});var d=c(14170);function e(a,b,c){if(a&&c)switch(b){case d.h.CLAUDE:!function(a,b){if("string"==typeof a.system&&a.system.length>0){a.system=`${a.system}
@@ -57,8 +57,8 @@ ${e.length} files in ${g.length} dirs:
57
57
  `,b.slice(0,10)))h+=` ${c}
58
58
  `;b.length>10&&(h+=` +${b.length-10}
59
59
  `),h+="\n"}return g.length>20&&(h+=`+${g.length-20} more dirs
60
- `),h.replace(/\n+$/,"")}s.filterName="search-list";let t=/^Result of search in '[^']*' \(total (\d+) files?\):/,u=/^diff --git /m,v=/^@@ /m,w=/^On branch |^nothing to commit|^Changes (not |to be )|^Untracked files:/m,x=/^[*|/\\ ]*commit [0-9a-f]{7,40}$/m,y=/^[ MADRCU?!][ MADRCU?!] \S/m,z=/^(npm (warn|error|ERR!)|yarn (warn|error)|\s*Compiling\s+\S+|\s*Downloading\s+\S+|added \d+ package|\[ERROR\]|BUILD (SUCCESS|FAILED)|\s*Finished\s+|Successfully (installed|built)|ERROR:)/im,A=/[├└]──|│ /,B=/^[-dlbcps][rwx-]{9}/m,C=/^total \d+$/m;function D(a){let b=a.indexOf(":");if(-1===b)return!1;let c=a.indexOf(":",b+1);if(-1===c)return!1;let d=a.slice(b+1,c);return/^\d+$/.test(d)}function E(a){let b=a.trim();return 0!==b.length&&(!!/^[A-Za-z]:[\\/]/.test(b)||!b.includes(":")&&(b.startsWith(".")||b.startsWith("/")||b.includes("/")))}function F(a,b){if(!b||!a)return null;if(a.conversationState){var c=a;let b={bytesBefore:0,bytesAfter:0,hits:[]};try{let a=c.conversationState,d=[...Array.isArray(a?.history)?a.history:[]];for(let c of(a?.currentMessage&&d.push(a.currentMessage),d)){let a=c?.userInputMessage?.userInputMessageContext?.toolResults;if(Array.isArray(a)){for(let c of a)if("error"!==c.status&&Array.isArray(c.content))for(let a of c.content)a&&"string"==typeof a.text&&(a.text=G(a.text,b,"kiro-tool-result"))}}}catch(a){return console.warn("[RTK] compressKiroFormat error:",a.message),null}return b}let d=Array.isArray(a.messages)?a.messages:Array.isArray(a.input)?a.input:null;if(!d)return null;let e={bytesBefore:0,bytesAfter:0,hits:[]};try{for(let a=0;a<d.length;a++){let b=d[a];if(b){if("function_call_output"===b.type){if("string"==typeof b.output)b.output=G(b.output,e,"openai-responses-string");else if(Array.isArray(b.output))for(let a=0;a<b.output.length;a++){let c=b.output[a];c&&"input_text"===c.type&&"string"==typeof c.text&&(c.text=G(c.text,e,"openai-responses-array"))}continue}if("tool"===b.role&&"string"==typeof b.content){b.content=G(b.content,e,"openai-tool");continue}if(Array.isArray(b.content)){if("tool"===b.role){for(let a=0;a<b.content.length;a++){let c=b.content[a];c&&"text"===c.type&&"string"==typeof c.text&&(c.text=G(c.text,e,"openai-tool-array"))}continue}for(let a=0;a<b.content.length;a++){let c=b.content[a];if(c&&"tool_result"===c.type&&!0!==c.is_error){if("string"==typeof c.content)c.content=G(c.content,e,"claude-string");else if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let b=c.content[a];b&&"text"===b.type&&"string"==typeof b.text&&(b.text=G(b.text,e,"claude-array"))}}}}}}}catch(a){return console.warn("[RTK] compressMessages error:",a.message),null}return e}function G(a,b,c){let d=a.length;if(b.bytesBefore+=d,d<500||d>0xa00000)return b.bytesAfter+=d,a;let h=function(a){var b,c;let d,h,m=a.length>1024?a.slice(0,1024):a;if(x.test(m))return g;if(u.test(m)||v.test(m))return e;if(w.test(m))return f;if(z.test(m))return i;if(!((d=m.split("\n").filter(a=>a.trim())).length<3)&&d.filter(a=>y.test(a)).length/d.length>=.6)return f;let F=m.split("\n"),G=F.filter(a=>a.trim().length>0);return G.slice(0,5).some(D)?j:G.length>=3&&G.every(E)?k:A.test(m)?o:C.test(m)||(b=m,h=new RegExp((c=B).source,c.flags.includes("g")?c.flags:c.flags+"g"),(b.match(h)||[]).length>=3)?n:t.test(m)?s:F.length>=250&&function(a){let b=0,c=0;for(let d of a.slice(0,100))0!==d.length&&(c++,r.test(d)&&b++);return!(c<5)&&b/c>=.7}(F)?q:G.length>=5?l:a.split("\n").length>=250?p:null}(a);if(!h)return b.bytesAfter+=d,a;let m=function(a,b){if("function"!=typeof a)return b;try{let c=a(b);if("string"!=typeof c)return b;return c}catch(d){let c=a.filterName||a.name||"anonymous";return console.warn(`[rtk] warning: filter '${c}' panicked — passing through raw output: ${d?.message||d}`),b}}(h,a);return!m||0===m.length||m.length>=d?(b.bytesAfter+=d,a):(b.bytesAfter+=m.length,b.hits.push({shape:c,filter:h.filterName||h.name,saved:d-m.length}),m)}function H(a){if(!a||!a.hits||0===a.hits.length)return null;let b=a.bytesBefore-a.bytesAfter,c=a.bytesBefore>0?(b/a.bytesBefore*100).toFixed(1):"0",d=Array.from(new Set(a.hits.map(a=>a.filter))).join(",");return`[RTK] saved ${b}B / ${a.bytesBefore}B (${c}%) via [${d}] hits=${a.hits.length}`}},76083:(a,b,c)=>{c.d(b,{C:()=>h});var d=c(14170),e=c(71301);let f=new Set([d.h.GEMINI,d.h.GEMINI_CLI,d.h.VERTEX,d.h.ANTIGRAVITY,d.h.OLLAMA,d.h.KIRO]);function g(a){return"string"==typeof a&&(a.startsWith("http://")||a.startsWith("https://"))}async function h(a,b,c,i={}){if(!a||!f.has(c))return 0;let j=function(a,b){let c=[],e=a=>{for(let b of a||[])if(Array.isArray(b.content)){for(let a of b.content)if(a?.type==="image_url"){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url;g(b)&&c.push({get:()=>b,set:b=>{"string"==typeof a.image_url?a.image_url=b:a.image_url.url=b}})}}},f=a=>{for(let b of a||[])for(let a of b.parts||[]){let b=a?.fileData?.fileUri;g(b)&&c.push({get:()=>b,part:a})}};switch(b){case d.h.OPENAI:case d.h.OLLAMA:case d.h.KIRO:case d.h.CURSOR:case d.h.COMMANDCODE:e(a.messages);break;case d.h.CLAUDE:for(let b of a.messages||[])if(Array.isArray(b.content))for(let a of b.content)a?.type==="image"&&a.source?.type==="url"&&g(a.source.url)&&c.push({get:()=>a.source.url,claudeBlock:a});break;case d.h.GEMINI:case d.h.GEMINI_CLI:case d.h.VERTEX:f(a.contents);break;case d.h.ANTIGRAVITY:f(a?.request?.contents);break;default:e(a.messages)}return c}(a,b);if(!j.length)return 0;let k=0;for(let a of j){let b=a.get();if((0,e.W$)(b))continue;let c=await (0,e.ni)(b,i);c&&(a.set?a.set(c.url):a.part?(delete a.part.fileData,a.part.inlineData={mimeType:c.mimeType,data:c.url.split(",")[1]}):a.claudeBlock&&(a.claudeBlock.source={type:"base64",media_type:c.mimeType,data:c.url.split(",")[1]}),k++)}return k}},81626:(a,b,c)=>{c.d(b,{I:()=>r,F:()=>q});var d=c(77598);function e(a,b){let c;if(!a.trim())return;let d=a.match(/^event:\s*(.+)$/m),e=a.match(/^data:\s*(.+)$/m);if(!d||!e)return;let f=d[1].trim(),g=e[1].trim();if("[DONE]"!==g){try{c=JSON.parse(g)}catch{return}"response.created"===f?(b.responseId=c.response?.id||b.responseId,b.created=c.response?.created_at||b.created):"response.output_item.done"===f?b.items.set(c.output_index??0,c.item):"response.completed"===f||"response.done"===f?(b.status="completed",c.response?.usage&&(b.usage.input_tokens=c.response.usage.input_tokens||0,b.usage.output_tokens=c.response.usage.output_tokens||0,b.usage.total_tokens=c.response.usage.total_tokens||0)):"response.failed"===f&&(b.status="failed")}}let f={input_tokens:0,output_tokens:0,total_tokens:0};async function g(a){if(!a||"function"!=typeof a.getReader)return{id:`resp_${Date.now()}`,object:"response",created_at:Math.floor(Date.now()/1e3),status:"failed",output:[],usage:{...f}};let b=a.getReader(),c=new TextDecoder,d="",g={responseId:"",created:Math.floor(Date.now()/1e3),status:"in_progress",usage:{...f},items:new Map};try{for(;;){let{done:a,value:f}=await b.read();if(a)break;let h=(d+=c.decode(f,{stream:!0})).split("\n\n");for(let a of(d=h.pop()||"",h))e(a,g)}d.trim()&&e(d,g)}finally{b.releaseLock()}let h=[],i=g.items.size>0?Math.max(...g.items.keys()):-1;for(let a=0;a<=i;a++)h.push(g.items.get(a)||{type:"message",content:[],role:"assistant"});return{id:g.responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:g.created,status:g.status||"completed",output:h,usage:g.usage}}var h=c(43659),i=c(41004),j=c(14170),k=c(35024),l=c(86171),m=c(55673),n=c(47370);let o=a=>k.xq[a]?.format===j.h.OPENAI_RESPONSES;function p(a){if(!a?.content||!Array.isArray(a.content))return"";let b=a.content.find(a=>"output_text"===a.type);if("string"==typeof b?.text)return b.text;let c=a.content.find(a=>"string"==typeof a.text);return"string"==typeof c?.text?c.text:""}function q(a,b){let c=[],d=null;for(let b of String(a||"").split("\n")){let a=b.trim();if(!a.startsWith("data:"))continue;let e=a.slice(5).trim();if(e&&"[DONE]"!==e)try{let a=JSON.parse(e);a?.error?d=a.error:c.push(a)}catch{}}if(d)return{error:d};if(0===c.length)return null;let e=c[0],f=[],g=[],h=new Map,i="stop",j=null;for(let a of c){let b=a?.choices?.[0],c=b?.delta||{};if("string"==typeof c.content&&c.content.length>0&&f.push(c.content),"string"==typeof c.reasoning_content&&c.reasoning_content.length>0&&g.push(c.reasoning_content),b?.finish_reason&&(i=b.finish_reason),a?.usage&&"object"==typeof a.usage&&(j=a.usage),Array.isArray(c.tool_calls))for(let a of c.tool_calls){let b=a.index??0;h.has(b)||h.set(b,{id:a.id||"",type:"function",function:{name:"",arguments:""}});let c=h.get(b);a.id&&(c.id=a.id),a.function?.name&&(c.function.name+=a.function.name),a.function?.arguments&&(c.function.arguments+=a.function.arguments)}}let k={role:"assistant",content:f.join("")||(h.size>0?null:"")};g.length>0&&(k.reasoning_content=g.join("")),h.size>0&&(k.tool_calls=[...h.entries()].sort((a,b)=>a[0]-b[0]).map(([,a])=>a));let l={id:e.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:e.created||Math.floor(Date.now()/1e3),model:e.model||b||"unknown",choices:[{index:0,message:k,finish_reason:i}]};return j&&(l.usage=j),l}async function r({providerResponse:a,sourceFormat:b,targetFormat:c,provider:e,model:f,body:k,stream:s,translatedBody:t,finalBody:u,requestStartTime:v,connectionId:w,apiKey:x,clientRawRequest:y,onRequestSuccess:z,customToolNames:A,trackDone:B,appendLog:C,reqTag:D,log:E}){let F=a.headers.get("content-type")||"";if(!(F.includes("text/event-stream")||""===F&&o(e)))return null;B();let G={provider:e,model:f,connectionId:w,request:(0,l.Fo)(k,s),providerRequest:u||t||null};if(o(e)||c===j.h.OPENAI_RESPONSES)try{let c,h=await g(a.body);z&&await z();let i=h.usage||{};C({tokens:i,status:"200 OK"}),(0,l.qr)({provider:e,model:f,tokens:i,connectionId:w,apiKey:x,endpoint:y?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),E?.line&&E.line(D,"\uD83D\uDCCA",(0,l.U$)({usage:i,latency:{total:Date.now()-v}}));let k=(i.input_tokens||0)+(i.cache_read_input_tokens||i.cached_tokens||0)+(i.cache_creation_input_tokens||0),{msgItem:m,textContent:o}=function(a){if(!Array.isArray(a))return{msgItem:null,textContent:null};let b=a.filter(a=>a?.type==="message");if(0===b.length)return{msgItem:null,textContent:null};for(let a=b.length-1;a>=0;a--){let c=p(b[a]);if(c.length>0)return{msgItem:b[a],textContent:c}}let c=b[b.length-1];return{msgItem:c,textContent:p(c)}}(h.output),q=Date.now()-v;if((0,n.ox)((0,l.$R)({...G,latency:{ttft:q,total:q},tokens:{prompt_tokens:k,completion_tokens:i.output_tokens||0},response:{content:o,thinking:null,finish_reason:h.status||"unknown"},status:"success"},{endpoint:y?.endpoint||null})).catch(()=>{}),b===j.h.OPENAI_RESPONSES)return{success:!0,response:new Response(JSON.stringify(h),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})};let r=i.cache_read_input_tokens||i.cached_tokens||0,s=i.cache_creation_input_tokens||0,t=(i.input_tokens||0)+r+s,u=i.output_tokens||0,A=r>0||s>0?{prompt_tokens_details:{...r>0?{cached_tokens:r}:{},...s>0?{cache_creation_tokens:s}:{}}}:{},B=(h.output||[]).filter(a=>"function_call"===a.type).map((a,b)=>({id:a.call_id||`call_${a.name}_${Date.now()}_${b}`,type:"function",function:{name:a.name,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments||{})}})),F=B.length>0;if(b===j.h.ANTIGRAVITY||b===j.h.GEMINI||b===j.h.GEMINI_CLI)c={response:{candidates:[{content:{role:"model",parts:[{text:o||""}]},finishReason:"STOP",index:0}],usageMetadata:{promptTokenCount:t,candidatesTokenCount:u,totalTokenCount:t+u},modelVersion:f,responseId:h.id||`resp_${Date.now()}`}};else{let a={role:"assistant",content:o||(F?null:"")};F&&(a.tool_calls=B);let b="completed"===h.status||"done"===h.status,d=F?"tool_calls":b?"stop":h.status||"stop";c={id:h.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:h.created_at||Math.floor(Date.now()/1e3),model:h.model||f,choices:[{index:0,message:a,finish_reason:d}],usage:{prompt_tokens:t,completion_tokens:u,total_tokens:t+u,...A}}}return{success:!0,response:new Response(JSON.stringify(c),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Responses API SSE→JSON failed:",a),(0,h.A1)(i.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}try{let c=await a.text(),g=q(c,f);if(!g)return(0,h.A1)(i.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");if(g.error)return(0,h.A1)(i.gx.BAD_GATEWAY,g.error.message||"Upstream SSE stream failed");z&&await z();let k=g.usage||{};C({tokens:k,status:"200 OK"}),(0,l.qr)({provider:e,model:f,tokens:k,connectionId:w,apiKey:x,endpoint:y?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),E?.line&&E.line(D,"\uD83D\uDCCA",(0,l.U$)({usage:k,latency:{total:Date.now()-v}}));let o=Date.now()-v;if((0,n.ox)((0,l.$R)({...G,latency:{ttft:o,total:o},tokens:k,response:{content:g.choices?.[0]?.message?.content||null,thinking:g.choices?.[0]?.message?.reasoning_content||null,finish_reason:g.choices?.[0]?.finish_reason||"unknown"},status:"success"},{endpoint:y?.endpoint||null})).catch(()=>{}),k&&Object.keys(k).length>0&&(g.usage=k),g?.choices)for(let a of g.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;let p=b===j.h.OPENAI_RESPONSES?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:m.Du.REASONING,summary:[{type:m.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:m.Du.MESSAGE,role:m.z7.ASSISTANT,content:[{type:m.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?m.Du.CUSTOM_TOOL_CALL:m.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||{};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:"completed",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)}}}(g,A):g;return{success:!0,response:new Response(JSON.stringify(p),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Chat Completions SSE→JSON failed:",a),(0,h.A1)(i.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}}},86171:(a,b,c)=>{c.d(b,{$R:()=>j,Fo:()=>h,MK:()=>i,U$:()=>k,qr:()=>l});var d=c(47370),e=c(71857),f=c(73483);let g=["temperature","top_p","top_k","max_tokens","max_completion_tokens","thinking","reasoning","enable_thinking","presence_penalty","frequency_penalty","seed","stop","tools","tool_choice","response_format","prediction","store","metadata","n","logprobs","top_logprobs","logit_bias","user","parallel_tool_calls"];function h(a,b){let c={messages:a.messages||[],model:a.model,stream:b};for(let b of g)void 0!==a[b]&&(c[b]=a[b]);return c}function i(a){if(!a||"object"!=typeof a)return null;if(a.usage?.input_tokens!==void 0)return{prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens};if(a.usage?.prompt_tokens!==void 0)return{prompt_tokens:a.usage.prompt_tokens||0,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens};let b=a.usageMetadata||a.response?.usageMetadata;return b?{prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,cached_tokens:b.cachedContentTokenCount||0,reasoning_tokens:b.thoughtsTokenCount||0}:null}function j(a,b={}){return{provider:a.provider||"unknown",model:a.model||"unknown",connectionId:a.connectionId||void 0,timestamp:new Date().toISOString(),latency:a.latency||{ttft:0,total:0},tokens:a.tokens||{prompt_tokens:0,completion_tokens:0},request:a.request,providerRequest:a.providerRequest||null,providerResponse:a.providerResponse||null,response:a.response||{},pxpipe:a.pxpipe||void 0,status:a.status||"success",...b}}function k({usage:a,latency:b}){let c=a||{},d=c.prompt_tokens??c.input_tokens??0,e=c.completion_tokens??c.output_tokens??0,f=c.cache_read_input_tokens??c.cached_tokens??c.prompt_tokens_details?.cached_tokens??0,g=c.cache_creation_input_tokens??0,h=`IN ${d}`;if(f||g){let a=[];f&&a.push(`↻${f}`),g&&a.push(`+${g}`),h+=` (CACHE ${a.join(" ")})`}let i=b?.ttft?` \xb7 TTFT ${b.ttft}ms`:"";return`DONE ${b?.total??0}ms${i} \xb7 ${h} \xb7 OUT ${e}`}function l({provider:a,model:b,tokens:c,connectionId:g,apiKey:h,endpoint:i,label:j="USAGE",silent:k=!1}){if(!c||"object"!=typeof c)return;let m=c.input_tokens??c.prompt_tokens??0,n=c.output_tokens??c.completion_tokens??0;if(0===m&&0===n)return;if(!k){let b=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),c=g?` | account=${g.slice(0,8)}...`:"";console.log(`${e.lm.green}[${b}] 📊 [${j}] ${a.toUpperCase()} | in=${m} | out=${n}${c}${e.lm.reset}`)}let o=(0,f._6)(c)||{prompt_tokens:c.prompt_tokens??c.input_tokens??0,completion_tokens:c.completion_tokens??c.output_tokens??0};(0,d.sZ)({provider:a||"unknown",model:b||"unknown",tokens:o,timestamp:new Date().toISOString(),connectionId:g||void 0,apiKey:h||void 0,endpoint:i||null}).catch(()=>{})}},92500:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{wk:()=>L});var e=c(57647),f=c(88499),g=c(52136),h=c(14170),i=c(95189),j=c(59657),k=c(8521),l=c(71336),m=c(57247),n=c(35024),o=c(43659),p=c(41004),q=c(27349),r=c(47370),s=c(55330),t=c(90737),u=c(86171),v=c(81626),w=c(5016),x=c(20623),y=c(324),z=c(14724),A=c(60125),B=c(60475),C=c(72758),D=c(70190),E=c(14823),F=c(66306),G=c(5263),H=c(76083),I=c(80662),J=c(14294),K=a([s]);async function L({body:a,modelInfo:b,credentials:c,log:d,onCredentialsRefreshed:K,onRequestSuccess:M,onDisconnect:N,clientRawRequest:O,connectionId:P,userAgent:Q,apiKey:R,ccFilterNaming:S,rtkEnabled:T,headroomEnabled:U,headroomUrl:V,headroomCompressUserMessages:W,cavemanEnabled:X,cavemanLevel:Y,ponytailEnabled:Z,ponytailLevel:$,pxpipeEnabled:_,pxpipeMinChars:aa,pxpipeTimeoutMs:ab,pxpipeTransform:ac,onPxpipeEvent:ad,sourceFormatOverride:ae,providerThinking:af}){let ag,ah,ai,aj,ak,al,am,{provider:an,model:ao}=b,ap=Date.now(),aq=(()=>{try{return(0,I.oV)({headers:O?.headers,body:a,connectionId:P,scope:an})}catch{return P||""}})(),ar=d?.tagForSession?d.tagForSession(aq):d?.nextTag?d.nextTag():"",as=ae||(0,e.Tz)(a),at=(0,q.c)(a,ao,Q,S);if(at)return at;let au=m.Xg[an]||an,av=(0,m.ux)(au,ao),aw=(0,m.ez)(au,ao),ax=(0,e.oF)(an,as),ay=!aw||aw.includes(as)?ax:null,az=av||ay?.format||(0,e.jJ)(an,c);ay&&c&&(c.runtimeTransport=ay);let aA=(0,m.cY)(au,ao),aB=(0,m.kt)(au,ao);if(af?.mode&&"auto"!==af.mode){let b=af.mode;"on"!==b||a.thinking?"off"!==b||a.thinking?a.reasoning_effort||(a={...a,reasoning_effort:b}):a={...a,thinking:{type:"disabled"}}:(console.log("Injecting provider-level thinking config override: on"),a={...a,thinking:{type:"enabled",budget_tokens:1e4}})}let aC=!0===a.stream||as===h.h.ANTIGRAVITY||as===h.h.GEMINI||as===h.h.GEMINI_CLI,aD=n.xq[an]?.forceStream===!0,aE=!!aD||!1!==a.stream,aF=(0,m.OA)(au,ao);("imageGen"===aF||/image|imagen|image-generation/i.test(ao))&&("antigravity"===an||"gemini-cli"===an)&&(aE=!1);let aG=(0,y.J)(O?.headers||{},a);"deepseek-tui"===aG&&!0!==a.stream&&(aE=!1);let aH=O?.headers?.accept||"",aI=aH.includes("application/json"),aJ=aH.includes("text/event-stream");!aI||aJ||!0===a.stream||aD||(aE=!1);let aK=await (0,l.q7)(as,az,ao);O&&aK.logClientRawRequest(O.endpoint,O.body,O.headers),aK.logRawRequest(a),d?.debug?.("FORMAT",`${as} → ${az} | stream=${aE}`);let aL=(0,y.J)(O?.headers||{},a),aM=(0,y.Q)(aL,an);if(c&&(c.rawHeaders=O?.headers||{}),!aM){let b=(0,F.nl)(an,ao);(0,G.X)(a,as,b)&&d?.debug?.("MODALITY",`stripped unsupported media for ${an}/${ao}`);try{let b=await (0,H.C)(a,as,az,{signal:void 0});b>0&&d?.debug?.("MODALITY",`prefetched ${b} remote image(s) for ${az}`)}catch(a){d?.warn?.("MODALITY",`image prefetch failed: ${a.message}`)}}if(aM){if(d?.debug?.("PASSTHROUGH",`${aL} → ${an} | native lossless`),ag={...a,model:(0,g.kD)(aB)},"codex"===an){let a={};if((0,g.z)(as,aB,a,an),a.reasoning_effort){let b=ag.reasoning;ag.reasoning={...b&&"object"==typeof b&&!Array.isArray(b)?b:{},effort:a.reasoning_effort},delete ag.reasoning_effort}}"claude"===aL&&(0,i.ui)(ag,ag.model)}else{if(!(ag=(0,f.GH)(as,az,aB,a,aE,c,an,aK,aA,P,aL)))return(0,r.uw)(ao,an,P,!1,!0),(0,o.A1)(p.gx.BAD_REQUEST,`Failed to translate request for ${as} → ${az}`);ah=ag._toolNameMap,delete ag._toolNameMap,ai=ag._customToolNames,delete ag._customToolNames,ag.model=(0,g.kD)(aB),function(a){if(a&&Array.isArray(a.messages))for(let b of a.messages)b&&"object"==typeof b&&(delete b.encrypted_content,delete b.reasoning_encrypted_content)}(ag)}if("claude"===aL&&Array.isArray(ag.tools)){let{tools:a,stripped:b}=(0,z.F)(ag.tools);b.length>0&&(ag.tools=a,d?.debug?.("TOOLDEDUP",`stripped ${b.length}: ${b.slice(0,3).join(", ")}${b.length>3?"...":""}`))}let aN=aM?as:az;if(d?.line){let b=O?.body?.model||`${an}/${ao}`,e=ag.messages?.length||ag.input?.length||ag.contents?.length||a.messages?.length||a.input?.length||0,f=ag.tools?.length||a.tools?.length||0,h=aM?`FMT: ${as} (passthrough)`:`FMT: ${as}→${az}`,i="grok-cli"!==an||(0,t.Au)(ao)?d.fmtThink?.((0,g.sS)(ag)):null,j=c?.connectionName||c?.connectionId?.slice(0,8)||"-",k=[`POST ${b} → ${an}/${ao}`,h,aE?"STREAM":"JSON",`${e} MSG`];f&&k.push(`${f} TOOL`),i&&k.push(`THINK:${i}`),k.push(`ACC:${j}`),d.line(ar,"▶",k.join(" \xb7 "))}"tts"===(0,m.OA)(au,ao)&&ag.messages&&(ag.messages=ag.messages.filter(a=>"tool"!==a.role),delete ag.tools);let aO=O?.headers?.[p.SA]?.toLowerCase()!=="off",aP=(0,C.B)(ag,aO&&T),aQ=(0,C.f)(aP);aQ&&console.log(aQ);let aR={},aS=await (0,D.SI)(ag,{enabled:aO&&U,url:V,model:aB,format:aN,compressUserMessages:W,diagnostics:aR}),aT=(0,D.Nv)(aS),aU=(0,D.O2)(aR);aT?(d?.info?.("HEADROOM",`${aT}${aU?` | ${aU}`:""}`),(0,D.cB)(aS,aR)&&d?.warn?.("HEADROOM",`reported token delta, but outbound JSON shrank <5%; provider may bill near-original payload | ${(0,D.O2)(aR)}`)):aO&&U&&d?.warn?.("HEADROOM",`skipped: ${aR.reason||"compression unavailable"}${aR.endpoint?` (${aR.endpoint})`:""}`);let aV=[];aO&&X&&Y&&((0,A.p)(ag,aN,Y),aV.push(`CAVEMAN:${Y}`)),aO&&Z&&$&&((0,B.U)(ag,aN,$),aV.push(`PONYTAIL:${$}`));let aW=null;if(_){let a=await (0,E.H)(ag,{enabled:!0,format:aN,model:aB,minChars:aa,timeoutMs:ab,transform:ac});aW=a.summary,a.body&&(ag=a.body),aW?.applied&&aV.push(`PXPIPE:${aW.imageCount}img`);try{ad?.({provider:an,model:ao,...aW})}catch{}}aV.length&&d?.line&&d.line(ar,"⚙",aV.join(" \xb7 ")),aM&&"claude"===aL&&(0,i._W)(ag);let aX=(0,s.SB)(an);(0,r.uw)(ao,an,P,!0),(0,r.E5)({model:ao,provider:an,connectionId:P,status:"PENDING"}).catch(()=>{});let aY=ag.messages?.length||ag.input?.length||ag.contents?.length||ag.request?.contents?.length||0;d?.debug?.("REQUEST",`${an.toUpperCase()} | ${ao} | ${aY} msgs`);let aZ=(0,j.jd)({onDisconnect:a=>{(0,r.uw)(ao,an,P,!1),N&&N(a)},onError:()=>(0,r.uw)(ao,an,P,!1),log:d,provider:an,model:ao,reqTag:ar}),a$={connectionProxyEnabled:c?.providerSpecificData?.connectionProxyEnabled===!0,connectionProxyUrl:c?.providerSpecificData?.connectionProxyUrl||"",connectionNoProxy:c?.providerSpecificData?.connectionNoProxy||"",vercelRelayUrl:c?.providerSpecificData?.vercelRelayUrl||""};if(a$.vercelRelayUrl){let a=c?.connectionName||c?.connectionId||"unknown",b=c?.providerSpecificData?.connectionProxyPoolId||"none";d?.info?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${a} | pool=${b} | vercel-relay=${a$.vercelRelayUrl}`)}else if(a$.connectionProxyEnabled&&a$.connectionProxyUrl){let a=a$.connectionProxyUrl;try{let b=new URL(a$.connectionProxyUrl),c=b.hostname||"",d=b.port?`:${b.port}`:"",e=b.protocol||"http:";a=`${e}//${c}${d}`}catch{}let b=c?.providerSpecificData?.connectionProxyPoolId||"none",e=c?.connectionName||c?.connectionId||"unknown";d?.info?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${e} | pool=${b} | url=${a}`)}if(a$.connectionProxyEnabled&&a$.connectionNoProxy){let a=c?.connectionName||c?.connectionId||"unknown";d?.debug?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${a} | no_proxy=${a$.connectionNoProxy}`)}let a_=az;try{let a=await aX.execute({model:ao,body:ag,stream:aE,credentials:c,signal:aZ.signal,log:d,proxyOptions:a$});aj=a.response,ak=a.url,al=a.headers,am=a.transformedBody,a_=a.responseFormat||az,aK.logTargetRequest(ak,al,am)}catch(c){if((0,r.uw)(ao,an,P,!1,!0),(0,r.E5)({model:ao,provider:an,connectionId:P,status:`FAILED ${"AbortError"===c.name?499:p.gx.BAD_GATEWAY}`}).catch(()=>{}),(0,r.ox)((0,u.$R)({provider:an,model:ao,connectionId:P,latency:{ttft:0,total:Date.now()-ap},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,u.Fo)(a,aE),providerRequest:ag||null,response:{error:c.message||String(c),status:"AbortError"===c.name?499:502,thinking:null},pxpipe:aW,status:"error"})).catch(()=>{}),"AbortError"===c.name)return aZ.handleError(c),(0,o.A1)(499,"Request aborted");let b=(0,o.lR)(c,an,ao,p.gx.BAD_GATEWAY);return d?.errorLine&&d.errorLine(ar,"✗",`ERROR 502 \xb7 ${an}/${ao} \xb7 ${Date.now()-ap}ms
60
+ `),h.replace(/\n+$/,"")}s.filterName="search-list";let t=/^Result of search in '[^']*' \(total (\d+) files?\):/,u=/^diff --git /m,v=/^@@ /m,w=/^On branch |^nothing to commit|^Changes (not |to be )|^Untracked files:/m,x=/^[*|/\\ ]*commit [0-9a-f]{7,40}$/m,y=/^[ MADRCU?!][ MADRCU?!] \S/m,z=/^(npm (warn|error|ERR!)|yarn (warn|error)|\s*Compiling\s+\S+|\s*Downloading\s+\S+|added \d+ package|\[ERROR\]|BUILD (SUCCESS|FAILED)|\s*Finished\s+|Successfully (installed|built)|ERROR:)/im,A=/[├└]──|│ /,B=/^[-dlbcps][rwx-]{9}/m,C=/^total \d+$/m;function D(a){let b=a.indexOf(":");if(-1===b)return!1;let c=a.indexOf(":",b+1);if(-1===c)return!1;let d=a.slice(b+1,c);return/^\d+$/.test(d)}function E(a){let b=a.trim();return 0!==b.length&&(!!/^[A-Za-z]:[\\/]/.test(b)||!b.includes(":")&&(b.startsWith(".")||b.startsWith("/")||b.includes("/")))}function F(a,b){if(!b||!a)return null;if(a.conversationState){var c=a;let b={bytesBefore:0,bytesAfter:0,hits:[]};try{let a=c.conversationState,d=[...Array.isArray(a?.history)?a.history:[]];for(let c of(a?.currentMessage&&d.push(a.currentMessage),d)){let a=c?.userInputMessage?.userInputMessageContext?.toolResults;if(Array.isArray(a)){for(let c of a)if("error"!==c.status&&Array.isArray(c.content))for(let a of c.content)a&&"string"==typeof a.text&&(a.text=G(a.text,b,"kiro-tool-result"))}}}catch(a){return console.warn("[RTK] compressKiroFormat error:",a.message),null}return b}let d=Array.isArray(a.messages)?a.messages:Array.isArray(a.input)?a.input:null;if(!d)return null;let e={bytesBefore:0,bytesAfter:0,hits:[]};try{for(let a=0;a<d.length;a++){let b=d[a];if(b){if("function_call_output"===b.type){if("string"==typeof b.output)b.output=G(b.output,e,"openai-responses-string");else if(Array.isArray(b.output))for(let a=0;a<b.output.length;a++){let c=b.output[a];c&&"input_text"===c.type&&"string"==typeof c.text&&(c.text=G(c.text,e,"openai-responses-array"))}continue}if("tool"===b.role&&"string"==typeof b.content){b.content=G(b.content,e,"openai-tool");continue}if(Array.isArray(b.content)){if("tool"===b.role){for(let a=0;a<b.content.length;a++){let c=b.content[a];c&&"text"===c.type&&"string"==typeof c.text&&(c.text=G(c.text,e,"openai-tool-array"))}continue}for(let a=0;a<b.content.length;a++){let c=b.content[a];if(c&&"tool_result"===c.type&&!0!==c.is_error){if("string"==typeof c.content)c.content=G(c.content,e,"claude-string");else if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let b=c.content[a];b&&"text"===b.type&&"string"==typeof b.text&&(b.text=G(b.text,e,"claude-array"))}}}}}}}catch(a){return console.warn("[RTK] compressMessages error:",a.message),null}return e}function G(a,b,c){let d=a.length;if(b.bytesBefore+=d,d<500||d>0xa00000)return b.bytesAfter+=d,a;let h=function(a){var b,c;let d,h,m=a.length>1024?a.slice(0,1024):a;if(x.test(m))return g;if(u.test(m)||v.test(m))return e;if(w.test(m))return f;if(z.test(m))return i;if(!((d=m.split("\n").filter(a=>a.trim())).length<3)&&d.filter(a=>y.test(a)).length/d.length>=.6)return f;let F=m.split("\n"),G=F.filter(a=>a.trim().length>0);return G.slice(0,5).some(D)?j:G.length>=3&&G.every(E)?k:A.test(m)?o:C.test(m)||(b=m,h=new RegExp((c=B).source,c.flags.includes("g")?c.flags:c.flags+"g"),(b.match(h)||[]).length>=3)?n:t.test(m)?s:F.length>=250&&function(a){let b=0,c=0;for(let d of a.slice(0,100))0!==d.length&&(c++,r.test(d)&&b++);return!(c<5)&&b/c>=.7}(F)?q:G.length>=5?l:a.split("\n").length>=250?p:null}(a);if(!h)return b.bytesAfter+=d,a;let m=function(a,b){if("function"!=typeof a)return b;try{let c=a(b);if("string"!=typeof c)return b;return c}catch(d){let c=a.filterName||a.name||"anonymous";return console.warn(`[rtk] warning: filter '${c}' panicked — passing through raw output: ${d?.message||d}`),b}}(h,a);return!m||0===m.length||m.length>=d?(b.bytesAfter+=d,a):(b.bytesAfter+=m.length,b.hits.push({shape:c,filter:h.filterName||h.name,saved:d-m.length}),m)}function H(a){if(!a||!a.hits||0===a.hits.length)return null;let b=a.bytesBefore-a.bytesAfter,c=a.bytesBefore>0?(b/a.bytesBefore*100).toFixed(1):"0",d=Array.from(new Set(a.hits.map(a=>a.filter))).join(",");return`[RTK] saved ${b}B / ${a.bytesBefore}B (${c}%) via [${d}] hits=${a.hits.length}`}},76083:(a,b,c)=>{c.d(b,{C:()=>h});var d=c(14170),e=c(71301);let f=new Set([d.h.GEMINI,d.h.GEMINI_CLI,d.h.VERTEX,d.h.ANTIGRAVITY,d.h.OLLAMA,d.h.KIRO]);function g(a){return"string"==typeof a&&(a.startsWith("http://")||a.startsWith("https://"))}async function h(a,b,c,i={}){if(!a||!f.has(c))return 0;let j=function(a,b){let c=[],e=a=>{for(let b of a||[])if(Array.isArray(b.content)){for(let a of b.content)if(a?.type==="image_url"){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url;g(b)&&c.push({get:()=>b,set:b=>{"string"==typeof a.image_url?a.image_url=b:a.image_url.url=b}})}}},f=a=>{for(let b of a||[])for(let a of b.parts||[]){let b=a?.fileData?.fileUri;g(b)&&c.push({get:()=>b,part:a})}};switch(b){case d.h.OPENAI:case d.h.OLLAMA:case d.h.KIRO:case d.h.CURSOR:case d.h.COMMANDCODE:e(a.messages);break;case d.h.CLAUDE:for(let b of a.messages||[])if(Array.isArray(b.content))for(let a of b.content)a?.type==="image"&&a.source?.type==="url"&&g(a.source.url)&&c.push({get:()=>a.source.url,claudeBlock:a});break;case d.h.GEMINI:case d.h.GEMINI_CLI:case d.h.VERTEX:f(a.contents);break;case d.h.ANTIGRAVITY:f(a?.request?.contents);break;default:e(a.messages)}return c}(a,b);if(!j.length)return 0;let k=0;for(let a of j){let b=a.get();if((0,e.W$)(b))continue;let c=await (0,e.ni)(b,i);c&&(a.set?a.set(c.url):a.part?(delete a.part.fileData,a.part.inlineData={mimeType:c.mimeType,data:c.url.split(",")[1]}):a.claudeBlock&&(a.claudeBlock.source={type:"base64",media_type:c.mimeType,data:c.url.split(",")[1]}),k++)}return k}},81626:(a,b,c)=>{c.d(b,{I:()=>r,F:()=>q});var d=c(77598);function e(a,b){let c;if(!a.trim())return;let d=a.match(/^event:\s*(.+)$/m),e=a.match(/^data:\s*(.+)$/m);if(!d||!e)return;let f=d[1].trim(),g=e[1].trim();if("[DONE]"!==g){try{c=JSON.parse(g)}catch{return}"response.created"===f?(b.responseId=c.response?.id||b.responseId,b.created=c.response?.created_at||b.created):"response.output_item.done"===f?b.items.set(c.output_index??0,c.item):"response.completed"===f||"response.done"===f?(b.status="completed",c.response?.usage&&(b.usage.input_tokens=c.response.usage.input_tokens||0,b.usage.output_tokens=c.response.usage.output_tokens||0,b.usage.total_tokens=c.response.usage.total_tokens||0)):"response.failed"===f&&(b.status="failed")}}let f={input_tokens:0,output_tokens:0,total_tokens:0};async function g(a){if(!a||"function"!=typeof a.getReader)return{id:`resp_${Date.now()}`,object:"response",created_at:Math.floor(Date.now()/1e3),status:"failed",output:[],usage:{...f}};let b=a.getReader(),c=new TextDecoder,d="",g={responseId:"",created:Math.floor(Date.now()/1e3),status:"in_progress",usage:{...f},items:new Map};try{for(;;){let{done:a,value:f}=await b.read();if(a)break;let h=(d+=c.decode(f,{stream:!0})).split("\n\n");for(let a of(d=h.pop()||"",h))e(a,g)}d.trim()&&e(d,g)}finally{b.releaseLock()}let h=[],i=g.items.size>0?Math.max(...g.items.keys()):-1;for(let a=0;a<=i;a++)h.push(g.items.get(a)||{type:"message",content:[],role:"assistant"});return{id:g.responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:g.created,status:g.status||"completed",output:h,usage:g.usage}}var h=c(43659),i=c(41004),j=c(14170),k=c(35024),l=c(86171),m=c(49622),n=c(47370);let o=a=>k.xq[a]?.format===j.h.OPENAI_RESPONSES;function p(a){if(!a?.content||!Array.isArray(a.content))return"";let b=a.content.find(a=>"output_text"===a.type);if("string"==typeof b?.text)return b.text;let c=a.content.find(a=>"string"==typeof a.text);return"string"==typeof c?.text?c.text:""}function q(a,b){let c=[],d=null;for(let b of String(a||"").split("\n")){let a=b.trim();if(!a.startsWith("data:"))continue;let e=a.slice(5).trim();if(e&&"[DONE]"!==e)try{let a=JSON.parse(e);a?.error?d=a.error:c.push(a)}catch{}}if(d)return{error:d};if(0===c.length)return null;let e=c[0],f=[],g=[],h=new Map,i="stop",j=null;for(let a of c){let b=a?.choices?.[0],c=b?.delta||{};if("string"==typeof c.content&&c.content.length>0&&f.push(c.content),"string"==typeof c.reasoning_content&&c.reasoning_content.length>0&&g.push(c.reasoning_content),b?.finish_reason&&(i=b.finish_reason),a?.usage&&"object"==typeof a.usage&&(j=a.usage),Array.isArray(c.tool_calls))for(let a of c.tool_calls){let b=a.index??0;h.has(b)||h.set(b,{id:a.id||"",type:"function",function:{name:"",arguments:""}});let c=h.get(b);a.id&&(c.id=a.id),a.function?.name&&(c.function.name+=a.function.name),a.function?.arguments&&(c.function.arguments+=a.function.arguments)}}let k={role:"assistant",content:f.join("")||(h.size>0?null:"")};g.length>0&&(k.reasoning_content=g.join("")),h.size>0&&(k.tool_calls=[...h.entries()].sort((a,b)=>a[0]-b[0]).map(([,a])=>a));let l={id:e.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:e.created||Math.floor(Date.now()/1e3),model:e.model||b||"unknown",choices:[{index:0,message:k,finish_reason:i}]};return j&&(l.usage=j),l}async function r({providerResponse:a,sourceFormat:b,targetFormat:c,provider:e,model:f,body:k,stream:s,translatedBody:t,finalBody:u,requestStartTime:v,connectionId:w,apiKey:x,clientRawRequest:y,onRequestSuccess:z,customToolNames:A,trackDone:B,appendLog:C,reqTag:D,log:E}){let F=a.headers.get("content-type")||"";if(!(F.includes("text/event-stream")||""===F&&o(e)))return null;B();let G={provider:e,model:f,connectionId:w,request:(0,l.Fo)(k,s),providerRequest:u||t||null};if(o(e)||c===j.h.OPENAI_RESPONSES)try{let c,h=await g(a.body);z&&await z();let i=h.usage||{};C({tokens:i,status:"200 OK"}),(0,l.qr)({provider:e,model:f,tokens:i,connectionId:w,apiKey:x,endpoint:y?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),E?.line&&E.line(D,"\uD83D\uDCCA",(0,l.U$)({usage:i,latency:{total:Date.now()-v}}));let k=(i.input_tokens||0)+(i.cache_read_input_tokens||i.cached_tokens||0)+(i.cache_creation_input_tokens||0),{msgItem:m,textContent:o}=function(a){if(!Array.isArray(a))return{msgItem:null,textContent:null};let b=a.filter(a=>a?.type==="message");if(0===b.length)return{msgItem:null,textContent:null};for(let a=b.length-1;a>=0;a--){let c=p(b[a]);if(c.length>0)return{msgItem:b[a],textContent:c}}let c=b[b.length-1];return{msgItem:c,textContent:p(c)}}(h.output),q=Date.now()-v;if((0,n.ox)((0,l.$R)({...G,latency:{ttft:q,total:q},tokens:{prompt_tokens:k,completion_tokens:i.output_tokens||0},response:{content:o,thinking:null,finish_reason:h.status||"unknown"},status:"success"},{endpoint:y?.endpoint||null})).catch(()=>{}),b===j.h.OPENAI_RESPONSES)return{success:!0,response:new Response(JSON.stringify(h),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})};let r=i.cache_read_input_tokens||i.cached_tokens||0,s=i.cache_creation_input_tokens||0,t=(i.input_tokens||0)+r+s,u=i.output_tokens||0,A=r>0||s>0?{prompt_tokens_details:{...r>0?{cached_tokens:r}:{},...s>0?{cache_creation_tokens:s}:{}}}:{},B=(h.output||[]).filter(a=>"function_call"===a.type).map((a,b)=>({id:a.call_id||`call_${a.name}_${Date.now()}_${b}`,type:"function",function:{name:a.name,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments||{})}})),F=B.length>0;if(b===j.h.ANTIGRAVITY||b===j.h.GEMINI||b===j.h.GEMINI_CLI)c={response:{candidates:[{content:{role:"model",parts:[{text:o||""}]},finishReason:"STOP",index:0}],usageMetadata:{promptTokenCount:t,candidatesTokenCount:u,totalTokenCount:t+u},modelVersion:f,responseId:h.id||`resp_${Date.now()}`}};else{let a={role:"assistant",content:o||(F?null:"")};F&&(a.tool_calls=B);let b="completed"===h.status||"done"===h.status,d=F?"tool_calls":b?"stop":h.status||"stop";c={id:h.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:h.created_at||Math.floor(Date.now()/1e3),model:h.model||f,choices:[{index:0,message:a,finish_reason:d}],usage:{prompt_tokens:t,completion_tokens:u,total_tokens:t+u,...A}}}return{success:!0,response:new Response(JSON.stringify(c),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Responses API SSE→JSON failed:",a),(0,h.A1)(i.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}try{let c=await a.text(),g=q(c,f);if(!g)return(0,h.A1)(i.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");if(g.error)return(0,h.A1)(i.gx.BAD_GATEWAY,g.error.message||"Upstream SSE stream failed");z&&await z();let k=g.usage||{};C({tokens:k,status:"200 OK"}),(0,l.qr)({provider:e,model:f,tokens:k,connectionId:w,apiKey:x,endpoint:y?.endpoint,usageKey:(0,d.randomUUID)(),silent:!0}),E?.line&&E.line(D,"\uD83D\uDCCA",(0,l.U$)({usage:k,latency:{total:Date.now()-v}}));let o=Date.now()-v;if((0,n.ox)((0,l.$R)({...G,latency:{ttft:o,total:o},tokens:k,response:{content:g.choices?.[0]?.message?.content||null,thinking:g.choices?.[0]?.message?.reasoning_content||null,finish_reason:g.choices?.[0]?.finish_reason||"unknown"},status:"success"},{endpoint:y?.endpoint||null})).catch(()=>{}),k&&Object.keys(k).length>0&&(g.usage=k),g?.choices)for(let a of g.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;let p=b===j.h.OPENAI_RESPONSES?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:m.Du.REASONING,summary:[{type:m.Du.SUMMARY_TEXT,text:f}]});let g="string"==typeof d.content?d.content:"";for(let a of(g.length>0&&e.push({type:m.Du.MESSAGE,role:m.z7.ASSISTANT,content:[{type:m.Du.OUTPUT_TEXT,text:g,annotations:[]}]}),d.tool_calls||[])){let c=a.function||{},d=b?.has(c.name);e.push({type:d?m.Du.CUSTOM_TOOL_CALL:m.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||{};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:"completed",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)}}}(g,A):g;return{success:!0,response:new Response(JSON.stringify(p),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Chat Completions SSE→JSON failed:",a),(0,h.A1)(i.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}}},86171:(a,b,c)=>{c.d(b,{$R:()=>j,Fo:()=>h,MK:()=>i,U$:()=>k,qr:()=>l});var d=c(47370),e=c(71857),f=c(73483);let g=["temperature","top_p","top_k","max_tokens","max_completion_tokens","thinking","reasoning","enable_thinking","presence_penalty","frequency_penalty","seed","stop","tools","tool_choice","response_format","prediction","store","metadata","n","logprobs","top_logprobs","logit_bias","user","parallel_tool_calls"];function h(a,b){let c={messages:a.messages||[],model:a.model,stream:b};for(let b of g)void 0!==a[b]&&(c[b]=a[b]);return c}function i(a){if(!a||"object"!=typeof a)return null;if(a.usage?.input_tokens!==void 0)return{prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens};if(a.usage?.prompt_tokens!==void 0)return{prompt_tokens:a.usage.prompt_tokens||0,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens};let b=a.usageMetadata||a.response?.usageMetadata;return b?{prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,cached_tokens:b.cachedContentTokenCount||0,reasoning_tokens:b.thoughtsTokenCount||0}:null}function j(a,b={}){return{provider:a.provider||"unknown",model:a.model||"unknown",connectionId:a.connectionId||void 0,timestamp:new Date().toISOString(),latency:a.latency||{ttft:0,total:0},tokens:a.tokens||{prompt_tokens:0,completion_tokens:0},request:a.request,providerRequest:a.providerRequest||null,providerResponse:a.providerResponse||null,response:a.response||{},pxpipe:a.pxpipe||void 0,status:a.status||"success",...b}}function k({usage:a,latency:b}){let c=a||{},d=c.prompt_tokens??c.input_tokens??0,e=c.completion_tokens??c.output_tokens??0,f=c.cache_read_input_tokens??c.cached_tokens??c.prompt_tokens_details?.cached_tokens??0,g=c.cache_creation_input_tokens??0,h=`IN ${d}`;if(f||g){let a=[];f&&a.push(`↻${f}`),g&&a.push(`+${g}`),h+=` (CACHE ${a.join(" ")})`}let i=b?.ttft?` \xb7 TTFT ${b.ttft}ms`:"";return`DONE ${b?.total??0}ms${i} \xb7 ${h} \xb7 OUT ${e}`}function l({provider:a,model:b,tokens:c,connectionId:g,apiKey:h,endpoint:i,label:j="USAGE",silent:k=!1}){if(!c||"object"!=typeof c)return;let m=c.input_tokens??c.prompt_tokens??0,n=c.output_tokens??c.completion_tokens??0;if(0===m&&0===n)return;if(!k){let b=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),c=g?` | account=${g.slice(0,8)}...`:"";console.log(`${e.lm.green}[${b}] 📊 [${j}] ${a.toUpperCase()} | in=${m} | out=${n}${c}${e.lm.reset}`)}let o=(0,f._6)(c)||{prompt_tokens:c.prompt_tokens??c.input_tokens??0,completion_tokens:c.completion_tokens??c.output_tokens??0};(0,d.sZ)({provider:a||"unknown",model:b||"unknown",tokens:o,timestamp:new Date().toISOString(),connectionId:g||void 0,apiKey:h||void 0,endpoint:i||null}).catch(()=>{})}},92500:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{wk:()=>L});var e=c(57647),f=c(88499),g=c(52136),h=c(14170),i=c(95189),j=c(59657),k=c(8521),l=c(71336),m=c(57247),n=c(35024),o=c(43659),p=c(41004),q=c(27349),r=c(47370),s=c(55330),t=c(90737),u=c(86171),v=c(81626),w=c(5016),x=c(20623),y=c(324),z=c(14724),A=c(60125),B=c(60475),C=c(72758),D=c(70190),E=c(14823),F=c(66306),G=c(5263),H=c(76083),I=c(80662),J=c(14294),K=a([s]);async function L({body:a,modelInfo:b,credentials:c,log:d,onCredentialsRefreshed:K,onRequestSuccess:M,onDisconnect:N,clientRawRequest:O,connectionId:P,userAgent:Q,apiKey:R,ccFilterNaming:S,rtkEnabled:T,headroomEnabled:U,headroomUrl:V,headroomCompressUserMessages:W,cavemanEnabled:X,cavemanLevel:Y,ponytailEnabled:Z,ponytailLevel:$,pxpipeEnabled:_,pxpipeMinChars:aa,pxpipeTimeoutMs:ab,pxpipeTransform:ac,onPxpipeEvent:ad,sourceFormatOverride:ae,providerThinking:af}){let ag,ah,ai,aj,ak,al,am,{provider:an,model:ao}=b,ap=Date.now(),aq=(()=>{try{return(0,I.oV)({headers:O?.headers,body:a,connectionId:P,scope:an})}catch{return P||""}})(),ar=d?.tagForSession?d.tagForSession(aq):d?.nextTag?d.nextTag():"",as=ae||(0,e.Tz)(a),at=(0,q.c)(a,ao,Q,S);if(at)return at;let au=m.Xg[an]||an,av=(0,m.ux)(au,ao),aw=(0,m.ez)(au,ao),ax=(0,e.oF)(an,as),ay=!aw||aw.includes(as)?ax:null,az=av||ay?.format||(0,e.jJ)(an,c);ay&&c&&(c.runtimeTransport=ay);let aA=(0,m.cY)(au,ao),aB=(0,m.kt)(au,ao);if(af?.mode&&"auto"!==af.mode){let b=af.mode;"on"!==b||a.thinking?"off"!==b||a.thinking?a.reasoning_effort||(a={...a,reasoning_effort:b}):a={...a,thinking:{type:"disabled"}}:(console.log("Injecting provider-level thinking config override: on"),a={...a,thinking:{type:"enabled",budget_tokens:1e4}})}let aC=!0===a.stream||as===h.h.ANTIGRAVITY||as===h.h.GEMINI||as===h.h.GEMINI_CLI,aD=n.xq[an]?.forceStream===!0,aE=!!aD||!1!==a.stream,aF=(0,m.OA)(au,ao);("imageGen"===aF||/image|imagen|image-generation/i.test(ao))&&("antigravity"===an||"gemini-cli"===an)&&(aE=!1);let aG=(0,y.J)(O?.headers||{},a);"deepseek-tui"===aG&&!0!==a.stream&&(aE=!1);let aH=O?.headers?.accept||"",aI=aH.includes("application/json"),aJ=aH.includes("text/event-stream");!aI||aJ||!0===a.stream||aD||(aE=!1);let aK=await (0,l.q7)(as,az,ao);O&&aK.logClientRawRequest(O.endpoint,O.body,O.headers),aK.logRawRequest(a),d?.debug?.("FORMAT",`${as} → ${az} | stream=${aE}`);let aL=(0,y.J)(O?.headers||{},a),aM=(0,y.Q)(aL,an);if(c&&(c.rawHeaders=O?.headers||{}),!aM){let b=(0,F.nl)(an,ao);(0,G.X)(a,as,b)&&d?.debug?.("MODALITY",`stripped unsupported media for ${an}/${ao}`);try{let b=await (0,H.C)(a,as,az,{signal:void 0});b>0&&d?.debug?.("MODALITY",`prefetched ${b} remote image(s) for ${az}`)}catch(a){d?.warn?.("MODALITY",`image prefetch failed: ${a.message}`)}}if(aM){if(d?.debug?.("PASSTHROUGH",`${aL} → ${an} | native lossless`),ag={...a,model:(0,g.kD)(aB)},"codex"===an){let a={};if((0,g.z)(as,aB,a,an),a.reasoning_effort){let b=ag.reasoning;ag.reasoning={...b&&"object"==typeof b&&!Array.isArray(b)?b:{},effort:a.reasoning_effort},delete ag.reasoning_effort}}"claude"===aL&&(0,i.ui)(ag,ag.model)}else{if(!(ag=(0,f.GH)(as,az,aB,a,aE,c,an,aK,aA,P,aL)))return(0,r.uw)(ao,an,P,!1,!0),(0,o.A1)(p.gx.BAD_REQUEST,`Failed to translate request for ${as} → ${az}`);ah=ag._toolNameMap,delete ag._toolNameMap,ai=ag._customToolNames,delete ag._customToolNames,ag.model=(0,g.kD)(aB),function(a){if(a&&Array.isArray(a.messages))for(let b of a.messages)b&&"object"==typeof b&&(delete b.encrypted_content,delete b.reasoning_encrypted_content)}(ag)}if("claude"===aL&&Array.isArray(ag.tools)){let{tools:a,stripped:b}=(0,z.F)(ag.tools);b.length>0&&(ag.tools=a,d?.debug?.("TOOLDEDUP",`stripped ${b.length}: ${b.slice(0,3).join(", ")}${b.length>3?"...":""}`))}let aN=aM?as:az;if(d?.line){let b=O?.body?.model||`${an}/${ao}`,e=ag.messages?.length||ag.input?.length||ag.contents?.length||a.messages?.length||a.input?.length||0,f=ag.tools?.length||a.tools?.length||0,h=aM?`FMT: ${as} (passthrough)`:`FMT: ${as}→${az}`,i="grok-cli"!==an||(0,t.Au)(ao)?d.fmtThink?.((0,g.sS)(ag)):null,j=c?.connectionName||c?.connectionId?.slice(0,8)||"-",k=[`POST ${b} → ${an}/${ao}`,h,aE?"STREAM":"JSON",`${e} MSG`];f&&k.push(`${f} TOOL`),i&&k.push(`THINK:${i}`),k.push(`ACC:${j}`),d.line(ar,"▶",k.join(" \xb7 "))}"tts"===(0,m.OA)(au,ao)&&ag.messages&&(ag.messages=ag.messages.filter(a=>"tool"!==a.role),delete ag.tools);let aO=O?.headers?.[p.SA]?.toLowerCase()!=="off",aP=(0,C.B)(ag,aO&&T),aQ=(0,C.f)(aP);aQ&&console.log(aQ);let aR={},aS=await (0,D.SI)(ag,{enabled:aO&&U,url:V,model:aB,format:aN,compressUserMessages:W,diagnostics:aR}),aT=(0,D.Nv)(aS),aU=(0,D.O2)(aR);aT?(d?.info?.("HEADROOM",`${aT}${aU?` | ${aU}`:""}`),(0,D.cB)(aS,aR)&&d?.warn?.("HEADROOM",`reported token delta, but outbound JSON shrank <5%; provider may bill near-original payload | ${(0,D.O2)(aR)}`)):aO&&U&&d?.warn?.("HEADROOM",`skipped: ${aR.reason||"compression unavailable"}${aR.endpoint?` (${aR.endpoint})`:""}`);let aV=[];aO&&X&&Y&&((0,A.p)(ag,aN,Y),aV.push(`CAVEMAN:${Y}`)),aO&&Z&&$&&((0,B.U)(ag,aN,$),aV.push(`PONYTAIL:${$}`));let aW=null;if(_){let a=await (0,E.H)(ag,{enabled:!0,format:aN,model:aB,minChars:aa,timeoutMs:ab,transform:ac});aW=a.summary,a.body&&(ag=a.body),aW?.applied&&aV.push(`PXPIPE:${aW.imageCount}img`);try{ad?.({provider:an,model:ao,...aW})}catch{}}aV.length&&d?.line&&d.line(ar,"⚙",aV.join(" \xb7 ")),aM&&"claude"===aL&&(0,i._W)(ag);let aX=(0,s.SB)(an);(0,r.uw)(ao,an,P,!0),(0,r.E5)({model:ao,provider:an,connectionId:P,status:"PENDING"}).catch(()=>{});let aY=ag.messages?.length||ag.input?.length||ag.contents?.length||ag.request?.contents?.length||0;d?.debug?.("REQUEST",`${an.toUpperCase()} | ${ao} | ${aY} msgs`);let aZ=(0,j.jd)({onDisconnect:a=>{(0,r.uw)(ao,an,P,!1),N&&N(a)},onError:()=>(0,r.uw)(ao,an,P,!1),log:d,provider:an,model:ao,reqTag:ar}),a$={connectionProxyEnabled:c?.providerSpecificData?.connectionProxyEnabled===!0,connectionProxyUrl:c?.providerSpecificData?.connectionProxyUrl||"",connectionNoProxy:c?.providerSpecificData?.connectionNoProxy||"",vercelRelayUrl:c?.providerSpecificData?.vercelRelayUrl||""};if(a$.vercelRelayUrl){let a=c?.connectionName||c?.connectionId||"unknown",b=c?.providerSpecificData?.connectionProxyPoolId||"none";d?.info?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${a} | pool=${b} | vercel-relay=${a$.vercelRelayUrl}`)}else if(a$.connectionProxyEnabled&&a$.connectionProxyUrl){let a=a$.connectionProxyUrl;try{let b=new URL(a$.connectionProxyUrl),c=b.hostname||"",d=b.port?`:${b.port}`:"",e=b.protocol||"http:";a=`${e}//${c}${d}`}catch{}let b=c?.providerSpecificData?.connectionProxyPoolId||"none",e=c?.connectionName||c?.connectionId||"unknown";d?.info?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${e} | pool=${b} | url=${a}`)}if(a$.connectionProxyEnabled&&a$.connectionNoProxy){let a=c?.connectionName||c?.connectionId||"unknown";d?.debug?.("PROXY",`${an.toUpperCase()} | ${ao} | conn=${a} | no_proxy=${a$.connectionNoProxy}`)}let a_=az;try{let a=await aX.execute({model:ao,body:ag,stream:aE,credentials:c,providerSessionId:aq,clientTool:aL,signal:aZ.signal,log:d,proxyOptions:a$});aj=a.response,ak=a.url,al=a.headers,am=a.transformedBody,a_=a.responseFormat||az,aK.logTargetRequest(ak,al,am)}catch(c){if((0,r.uw)(ao,an,P,!1,!0),(0,r.E5)({model:ao,provider:an,connectionId:P,status:`FAILED ${"AbortError"===c.name?499:p.gx.BAD_GATEWAY}`}).catch(()=>{}),(0,r.ox)((0,u.$R)({provider:an,model:ao,connectionId:P,latency:{ttft:0,total:Date.now()-ap},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,u.Fo)(a,aE),providerRequest:ag||null,response:{error:c.message||String(c),status:"AbortError"===c.name?499:502,thinking:null},pxpipe:aW,status:"error"})).catch(()=>{}),"AbortError"===c.name)return aZ.handleError(c),(0,o.A1)(499,"Request aborted");let b=(0,o.lR)(c,an,ao,p.gx.BAD_GATEWAY);return d?.errorLine&&d.errorLine(ar,"✗",`ERROR 502 \xb7 ${an}/${ao} \xb7 ${Date.now()-ap}ms
61
61
  ${b}${c.stack?`
62
- ${c.stack}`:""}`),(0,o.A1)(p.gx.BAD_GATEWAY,b)}if(!aX.noAuth&&(aj.status===p.gx.UNAUTHORIZED||aj.status===p.gx.FORBIDDEN))try{let a=await (0,k.qZ)(async()=>{let a=await aX.refreshCredentials(c,d);return a?.refreshToken&&a.refreshToken!==c.refreshToken&&(a.accessToken&&(c.accessToken=a.accessToken),c.refreshToken=a.refreshToken),a},3,d);if(a?.accessToken||a?.copilotToken){if(d?.line&&d.line(ar,"\uD83D\uDD11",`TOKEN REFRESHED \xb7 ${an}/${ao}`),Object.assign(c,a),K)try{await K(a)}catch(a){d?.warn?.("TOKEN",`onCredentialsRefreshed failed: ${a.message}`)}try{let a=await aX.execute({model:ao,body:ag,stream:aE,credentials:c,signal:aZ.signal,log:d,proxyOptions:a$});a.response.ok&&(aj=a.response,ak=a.url,a_=a.responseFormat||az)}catch{d?.warn?.("TOKEN",`${an.toUpperCase()} | retry after refresh failed`)}}else d?.warn?.("TOKEN",`${an.toUpperCase()} | refresh failed`)}catch(a){d?.warn?.("TOKEN",`${an.toUpperCase()} | refresh threw: ${a.message}`)}if(!aj.ok){(0,r.uw)(ao,an,P,!1,!0);let{statusCode:b,message:c,resetsAtMs:e}=await (0,o.zL)(aj,aX);(0,r.E5)({model:ao,provider:an,connectionId:P,status:`FAILED ${b}`}).catch(()=>{}),(0,r.ox)((0,u.$R)({provider:an,model:ao,connectionId:P,latency:{ttft:0,total:Date.now()-ap},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,u.Fo)(a,aE),providerRequest:am||ag||null,response:{error:c,status:b,thinking:null},pxpipe:aW,status:"error"})).catch(()=>{});let f=(0,o.lR)(Error(c),an,ao,b);if(d?.errorLine){let a=ak?`
62
+ ${c.stack}`:""}`),(0,o.A1)(p.gx.BAD_GATEWAY,b)}if(!aX.noAuth&&(aj.status===p.gx.UNAUTHORIZED||aj.status===p.gx.FORBIDDEN))try{let a=await (0,k.qZ)(async()=>{let a=await aX.refreshCredentials(c,d);return a?.refreshToken&&a.refreshToken!==c.refreshToken&&(a.accessToken&&(c.accessToken=a.accessToken),c.refreshToken=a.refreshToken),a},3,d);if(a?.accessToken||a?.copilotToken){if(d?.line&&d.line(ar,"\uD83D\uDD11",`TOKEN REFRESHED \xb7 ${an}/${ao}`),Object.assign(c,a),K)try{await K(a)}catch(a){d?.warn?.("TOKEN",`onCredentialsRefreshed failed: ${a.message}`)}try{let a=await aX.execute({model:ao,body:ag,stream:aE,credentials:c,providerSessionId:aq,clientTool:aL,signal:aZ.signal,log:d,proxyOptions:a$});a.response.ok&&(aj=a.response,ak=a.url,a_=a.responseFormat||az)}catch{d?.warn?.("TOKEN",`${an.toUpperCase()} | retry after refresh failed`)}}else d?.warn?.("TOKEN",`${an.toUpperCase()} | refresh failed`)}catch(a){d?.warn?.("TOKEN",`${an.toUpperCase()} | refresh threw: ${a.message}`)}if(!aj.ok){(0,r.uw)(ao,an,P,!1,!0);let{statusCode:b,message:c,resetsAtMs:e}=await (0,o.zL)(aj,aX);(0,r.E5)({model:ao,provider:an,connectionId:P,status:`FAILED ${b}`}).catch(()=>{}),(0,r.ox)((0,u.$R)({provider:an,model:ao,connectionId:P,latency:{ttft:0,total:Date.now()-ap},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,u.Fo)(a,aE),providerRequest:am||ag||null,response:{error:c,status:b,thinking:null},pxpipe:aW,status:"error"})).catch(()=>{});let f=(0,o.lR)(Error(c),an,ao,b);if(d?.errorLine){let a=ak?`
63
63
  URL: ${ak}`:"";d.errorLine(ar,"✗",`ERROR ${b} \xb7 ${an}/${ao} \xb7 ${Date.now()-ap}ms${a}
64
64
  ${f}`)}if(aK.logError(Error(c),am||ag),429===b&&(0,J.q)(ao)){let a=e?Math.max(0,e-Date.now()):null;return(0,o.A1)(b,(0,J.u)(an,ao,a),e)}return(0,o.A1)(b,f,e)}let a0={provider:an,model:ao,body:a,stream:aE,translatedBody:ag,finalBody:am,requestStartTime:ap,connectionId:P,apiKey:R,clientRawRequest:O,onRequestSuccess:M,pxpipe:aW,reqTag:ar,log:d},a1=a=>(0,r.E5)({model:ao,provider:an,connectionId:P,...a}).catch(()=>{}),a2=()=>(0,r.uw)(ao,an,P,!1);if(!aC&&aD){let a=await (0,v.I)({...a0,providerResponse:aj,sourceFormat:as,targetFormat:a_,customToolNames:ai,trackDone:a2,appendLog:a1});if(a)return aZ.handleComplete(),a}if(!aE){let a=await (0,w.N)({...a0,providerResponse:aj,sourceFormat:as,targetFormat:a_,reqLogger:aK,toolNameMap:ah,customToolNames:ai,trackDone:a2,appendLog:a1});return aZ.handleComplete(),a}let{onStreamComplete:a3,streamDetailId:a4}=(0,x.$)({...a0});return(0,x.M)({...a0,providerResponse:aj,sourceFormat:as,targetFormat:a_,userAgent:Q,reqLogger:aK,toolNameMap:ah,customToolNames:ai,streamController:aZ,onStreamComplete:a3,streamDetailId:a4})}s=(K.then?(await K)():K)[0],d()}catch(a){d(a)}})}};
@@ -1,2 +1,2 @@
1
1
  "use strict";exports.id=8910,exports.ids=[8910],exports.modules={18910:(a,b,c)=>{c.d(b,{Pr:()=>q,UP:()=>o,Vu:()=>p,t8:()=>n,vt:()=>s});var d=c(12557),e=c(43659),f=c(66306),g=c(26922);let h=new Set(["vision","pdf","audioInput","videoInput"]),i="[Called tools: ",j="[Tool result: ";function k(a){return a.filter(a=>a).map(a=>{if("tool"===a.role||"function"===a.role)return{role:"assistant",content:`${j}${(0,g.kU)(a.content)||String(a.content??"")}]`};if("assistant"===a.role&&Array.isArray(a.tool_calls)){let{tool_calls:b,...c}=a,d=b.map(a=>a?.function?.name||a?.name||"tool").join(", "),e=(0,g.kU)(c.content)||("string"==typeof c.content?c.content:"");return{...c,content:`${e}${e?"\n":""}${i}${d}]`}}if(Array.isArray(a.content)){let b=a.content.some(a=>"tool_use"===a.type),c=a.content.some(a=>"tool_result"===a.type);if(b||c){let b=[],c=[],d=[];for(let e of a.content)"text"===e.type&&e.text&&b.push(e.text),"tool_use"===e.type&&c.push(e.name||"tool"),"tool_result"===e.type&&d.push((0,g.kU)(e.content)||String(e.content??""));let{...e}=a,f=b.join("\n");return c.length>0&&(f=`${f}${f?"\n":""}${i}${c.join(", ")}]`),d.length>0&&(f=`${f}${f?"\n":""}${j}${d.join("\n")}]`),{...e,content:f}}}return a})}let l=new Map;function m(a){if(!Array.isArray(a)||0===a.length)return[];let b=a=>"assistant"===a||"model"===a,c=a.length-1;for(;c>=0&&!b(a[c]?.role);)c--;return a.slice(c+1)}function n(a){let b=new Set;if(!a||"object"!=typeof a)return b;let c=a=>{"string"==typeof a&&(a.startsWith("image/")?b.add("vision"):"application/pdf"===a?b.add("pdf"):a.startsWith("audio/")?b.add("audioInput"):a.startsWith("video/")&&b.add("videoInput"))},d=a=>{if(!a||"object"!=typeof a)return;let d=a.type;if(("image_url"===d||"image"===d||"input_image"===d)&&b.add("vision"),("input_audio"===d||"audio_url"===d||"audio"===d)&&b.add("audioInput"),("input_video"===d||"video_url"===d||"video"===d)&&b.add("videoInput"),"file"===d||"document"===d||"input_file"===d){let d=null;a.input_audio?.format?d=`audio/${a.input_audio.format}`:a.file?.file_data?d=String(a.file.file_data).match(/^data:([^;,]+)/)?.[1]:a.source?.media_type?d=a.source.media_type:a.source?.data&&(d=String(a.source.data).match(/^data:([^;,]+)/)?.[1]),d?c(d):b.add("pdf")}c(a.inlineData?.mimeType||a.fileData?.mimeType)},e=a=>{if(Array.isArray(a))for(let b of a)d(b)},f=a=>{if(!a||"object"!=typeof a)return;Array.isArray(a.images)&&a.images.length>0&&b.add("vision");let d=a.experimental_attachments||a.attachments;if(Array.isArray(d))for(let a of d){if(!a)continue;let d=a.contentType||a.mediaType||"string"==typeof a.url&&a.url.match(/^data:([^;,]+)/)?.[1];d?c(d):(a.url||a.data)&&b.add("vision")}(a.image_url||a.image)&&b.add("vision"),(a.audio_url||a.audio)&&b.add("audioInput"),e(a.content),"string"==typeof a.content&&(a.content.includes("data:image/")?b.add("vision"):a.content.includes("data:audio/")?b.add("audioInput"):a.content.includes("data:application/pdf")&&b.add("pdf"))};for(let b of m(a.messages))f(b);for(let b of m(a.input))e(b.content);for(let b of m(a.contents||a.request?.contents))e(b.parts);return b}function o(a){a?l.delete(a):l.clear()}function p(a,b){if(a.includes("/"))return null;let c=(Array.isArray(b)?b:b?.combos||[]).find(b=>b.name===a);return c&&c.models&&c.models.length>0?c.models:null}async function q({body:a,models:b,handleSingleModel:c,log:g,comboName:i,comboStrategy:j,comboStickyLimit:k=1,autoSwitch:m=!0}){let o=function(a,b,c,d=1){let e;if(!a||a.length<=1||"round-robin"!==c)return a;let f=b||"__default__",g=Number.isFinite(e=Number.parseInt(d,10))&&e>0?e:1,h=l.get(f),i="number"==typeof h?{index:h,consecutiveUseCount:0}:h||{index:0,consecutiveUseCount:0},j=i.index%a.length,k=function(a,b){let c=[...a];for(let a=0;a<b;a++){let a=c.shift();c.push(a)}return c}(a,j),m=i.consecutiveUseCount+1;return m>=g?l.set(f,{index:(j+1)%a.length,consecutiveUseCount:0}):l.set(f,{index:j,consecutiveUseCount:m}),k}(b,i,j,k);if(m){let b=n(a);if(b.size>0){let a=function(a,b){if(!b||0===b.size||!Array.isArray(a)||a.length<=1)return a;let c=[...b].filter(a=>h.has(a)),d=[...b].filter(a=>!h.has(a));return a.map((a,b)=>{let e,g,h,i;return{m:a,i:b,t:(g=(e="string"==typeof a?a.indexOf("/"):-1)>0?a.slice(0,e):"",h=e>0?a.slice(e+1):a,i=(0,f.nl)(g,h),c.every(a=>!0===i[a])?+!d.every(a=>!0===i[a]):2)}}).sort((a,b)=>a.t-b.t||a.i-b.i).map(a=>a.m)}(o,b);a[0]!==o[0]&&g.info("COMBO",`auto-switch for [${[...b].join(",")}] → ${a[0]}`),o=a}}let p=null,r=null,s=null;for(let b=0;b<o.length;b++){let e=o[b];g.info("COMBO",`Trying model ${b+1}/${o.length}: ${e}`);try{let b=await c(a,e);if(b.ok)return g.info("COMBO",`Model ${e} succeeded`),b;let f=b.statusText||"",h=null;try{let a=await b.clone().json();f=a?.error?.message||a?.error||a?.message||f,h=a?.retryAfter||null}catch{}if(h&&(!r||new Date(h)<new Date(r))&&(r=h),"string"!=typeof f)try{f=JSON.stringify(f)}catch{f=String(f)}let{shouldFallback:i,cooldownMs:j}=(0,d.hk)(b.status,f);if(!i)return g.warn("COMBO",`Model ${e} failed (no fallback)`,{status:b.status}),b;j&&j>0&&j<=5e3&&(503===b.status||502===b.status||504===b.status)&&(g.info("COMBO",`Model ${e} transient ${b.status}, waiting ${j}ms before next`),await new Promise(a=>setTimeout(a,j))),p=f||String(b.status),s||(s=b.status),g.warn("COMBO",`Model ${e} failed, trying next`,{status:b.status})}catch(a){p=a.message||String(a),s||(s=500),g.warn("COMBO",`Model ${e} threw error, trying next`,{error:p})}}let t=p&&p.toLowerCase().includes("no credentials")?503:s||503,u=p||"All combo models unavailable";if(r){let a=(0,d.Qo)(r);return g.warn("COMBO",`All models failed | ${u} (${a})`),(0,e.wO)(t,u,r,a)}return g.warn("COMBO",`All models failed | ${u}`),new Response(JSON.stringify({error:{message:u}}),{status:t,headers:{"Content-Type":"application/json"}})}let r={minPanel:2,stragglerGraceMs:8e3,panelHardTimeoutMs:9e4};async function s({body:a,models:b,handleSingleModel:c,log:d,comboName:e,judgeModel:f,tuning:h}){var i;let j,l,m=Array.isArray(b)?b.filter(Boolean):[];if(0===m.length)return new Response(JSON.stringify({error:{message:"Fusion combo has no models"}}),{status:400,headers:{"Content-Type":"application/json"}});if(1===m.length)return c(a,m[0]);let n={...r,...h||{}},o=Math.min(Math.max(2,n.minPanel),m.length),p=f&&f.trim()?f.trim():m[0];d.info("FUSION",`Combo "${e}" | panel=${m.length} [${m.join(", ")}] | judge=${p} | quorum=${o}`);let{tools:q,tool_choice:t,stream_options:u,...v}=a,w={...v,stream:!1};Array.isArray(w.messages)?w.messages=k(w.messages):Array.isArray(w.input)&&(w.input=k(w.input));let x=Date.now(),y=m.map(a=>{var b,d;return b=c(w,a,!0),d=n.panelHardTimeoutMs,new Promise(a=>{let c=setTimeout(()=>a({__timeout:!0}),d);Promise.resolve(b).then(b=>{clearTimeout(c),a(b)}).catch(b=>{clearTimeout(c),a({__error:b})})})}),z=await function(a,{minPanel:b,stragglerGraceMs:c,panelHardTimeoutMs:d}){return new Promise(e=>{let f=Array(a.length),g=0,h=0,i=!1,j=null,k=()=>{i||(i=!0,clearTimeout(l),j&&clearTimeout(j),e(f))},l=setTimeout(k,d);a.forEach((d,e)=>{Promise.resolve(d).then(a=>{f[e]=a}).catch(a=>{f[e]={__error:a}}).finally(()=>{if(g++,f[e]&&f[e].ok&&h++,g===a.length)return k();h>=b&&!j&&(j=setTimeout(k,c))})})})}(y,{...n,minPanel:o});d.info("FUSION",`fan-out collected in ${Date.now()-x}ms`);let A=[];for(let a=0;a<z.length;a++){let b=z[a],c=m[a];if(!b){d.warn("FUSION",`Panel ${c} dropped (straggler/timeout)`);continue}if(b.__timeout){d.warn("FUSION",`Panel ${c} timed out`);continue}if(b.__error){d.warn("FUSION",`Panel ${c} threw`,{error:b.__error?.message||String(b.__error)});continue}if(!b.ok){d.warn("FUSION",`Panel ${c} failed`,{status:b.status});continue}try{let a=await b.clone().json(),e=function(a){if(!a||"object"!=typeof a)return"";let b=a.choices?.[0];if(b){let a=b.message??b.delta??{},c=(0,g.kU)(a.content);if(c.trim())return c;if("string"==typeof b.text&&b.text.trim())return b.text}let c=(0,g.kU)(a.content);if(c.trim())return c;let d=a.candidates?.[0]?.content?.parts;if(Array.isArray(d)){let a=d.map(a=>a?.text||"").join("");if(a.trim())return a}if(Array.isArray(a.output)){let b=a.output.flatMap(a=>Array.isArray(a.content)?a.content.map(a=>a?.text||""):[]).join("");if(b.trim())return b}return""}(a);e?(A.push({model:c,text:e}),d.info("FUSION",`Panel ${c} ok (${e.length} chars)`)):d.warn("FUSION",`Panel ${c} returned empty content`)}catch(a){d.warn("FUSION",`Panel ${c} unparseable`,{error:a.message||String(a)})}}if(0===A.length)return d.warn("FUSION","All panel models failed"),new Response(JSON.stringify({error:{message:"All fusion panel models failed"}}),{status:503,headers:{"Content-Type":"application/json"}});if(1===A.length)return d.info("FUSION",`Only ${A[0].model} succeeded — answering directly (no fusion)`),c(a,A[0].model);let B=(j=A.map((a,b)=>`[Source ${b+1}]
2
- ${a.text}`).join("\n\n"),i=[`You are the JUDGE in a model-fusion panel. ${A.length} expert models independently answered the user's most recent request. Their responses are below, anonymized by source.`,"\nDo NOT mention that multiple models were used, and do NOT refer to the sources. Produce ONE authoritative final answer addressed directly to the user.\n\nFirst, internally analyze the panel along these dimensions: consensus (points most sources agree on — treat as higher-confidence), contradictions (where they disagree — resolve with your own judgment), partial coverage, unique insights only one source surfaced, and blind spots every source missed. Then write the best possible final answer grounded in that analysis — more complete and correct than any single response, with no filler.\n\n=== PANEL RESPONSES ===",j,"=== END PANEL RESPONSES ===\n\nNow write the final answer to the user's original request."].join("\n"),l={...a},Array.isArray(a.messages)?l.messages=[...a.messages,{role:"user",content:i}]:Array.isArray(a.input)?l.input=[...a.input,{role:"user",content:i}]:Array.isArray(a.contents)?l.contents=[...a.contents,{role:"user",parts:[{text:i}]}]:l.messages=[{role:"user",content:i}],l);return d.info("FUSION",`Judging ${A.length} answers with ${p}`),c(B,p)}},26922:(a,b,c)=>{c.d(b,{KZ:()=>k,S6:()=>h,Yr:()=>o,f6:()=>l,fc:()=>g,kU:()=>i,pT:()=>j,w_:()=>m});var d=c(62842),e=c(55673);let f=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","minItems","maxItems","format","multipleOf","uniqueItems","contains","unevaluatedProperties","unevaluatedItems","contentSchema","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"],g=[{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 h(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 i(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 j(a){return(0,d.N)(a,null)}function k(){return`agent-${crypto.randomUUID()}`}function l(){return crypto.randomUUID()+Date.now().toString()}function m(){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 n(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 o(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(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=n(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=n(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 of(b.properties&&!b.type&&(b.type="object"),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,f),!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}},55673:(a,b,c)=>{c.d(b,{R4:()=>g,BY:()=>l,a_:()=>j.a_,RV:()=>e,rP:()=>k,x4:()=>f,bC:()=>j.bC,Du:()=>h,z7:()=>d,m8:()=>i});let d={USER:"user",ASSISTANT:"assistant",TOOL:"tool",SYSTEM:"system",DEVELOPER:"developer"},e={USER:"user",MODEL:"model"},f={TEXT:"text",IMAGE_URL:"image_url",IMAGE:"image",INPUT_AUDIO:"input_audio",AUDIO_URL:"audio_url",FILE:"file",FUNCTION:"function"},g={TEXT:"text",IMAGE:"image",DOCUMENT:"document",TOOL_USE:"tool_use",TOOL_RESULT:"tool_result",THINKING:"thinking",REDACTED_THINKING:"redacted_thinking"},h={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"},i=[f.TEXT,f.IMAGE_URL,f.IMAGE,f.INPUT_AUDIO,f.AUDIO_URL,f.FILE];f.TEXT,f.IMAGE_URL,f.IMAGE,g.TOOL_RESULT;var j=c(69320);let k="unknown",l="image/png"},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,{Ut:()=>e,a_:()=>f,bC:()=>d});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"},f={STOP:"STOP",MAX_TOKENS:"MAX_TOKENS",SAFETY:"SAFETY",RECITATION:"RECITATION",BLOCKLIST:"BLOCKLIST",PROHIBITED_CONTENT:"PROHIBITED_CONTENT"}}};
2
+ ${a.text}`).join("\n\n"),i=[`You are the JUDGE in a model-fusion panel. ${A.length} expert models independently answered the user's most recent request. Their responses are below, anonymized by source.`,"\nDo NOT mention that multiple models were used, and do NOT refer to the sources. Produce ONE authoritative final answer addressed directly to the user.\n\nFirst, internally analyze the panel along these dimensions: consensus (points most sources agree on — treat as higher-confidence), contradictions (where they disagree — resolve with your own judgment), partial coverage, unique insights only one source surfaced, and blind spots every source missed. Then write the best possible final answer grounded in that analysis — more complete and correct than any single response, with no filler.\n\n=== PANEL RESPONSES ===",j,"=== END PANEL RESPONSES ===\n\nNow write the final answer to the user's original request."].join("\n"),l={...a},Array.isArray(a.messages)?l.messages=[...a.messages,{role:"user",content:i}]:Array.isArray(a.input)?l.input=[...a.input,{role:"user",content:i}]:Array.isArray(a.contents)?l.contents=[...a.contents,{role:"user",parts:[{text:i}]}]:l.messages=[{role:"user",content:i}],l);return d.info("FUSION",`Judging ${A.length} answers with ${p}`),c(B,p)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8920,exports.ids=[8920],exports.modules={58920:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>e,calculateCostFromTokens:()=>i,gH:()=>g,getPricingForModel:()=>h});let d={"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-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.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},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-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-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},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}},e={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},"tencent/hy4-preview":{input:.834,output:2.501,cached:.042,reasoning:2.501},"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}}},f=[{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 g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(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:()=>e,calculateCostFromTokens:()=>i,gH:()=>g,getPricingForModel:()=>h});let d={"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-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.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:5,output:30,cached:.5,reasoning:30,cache_creation:5},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-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-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},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}},e={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},"tencent/hy4-preview":{input:.834,output:2.501,cached:.042,reasoning:2.501},"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}}},f=[{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 g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(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}}};