@rabbi696/ezrouter 0.6.25 → 0.6.26

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 (876) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +3 -3
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -12
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.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/models/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.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 +6 -6
  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.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  84. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  85. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  87. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  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 +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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/changelog/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -5
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +4 -3
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/convoy/rules/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/ha/resolve/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/ha/status/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/models-dev/import/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/models-dev/import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/models-dev/refresh/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/models-dev/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/provider-order/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/provider-order/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/models/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/models/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +2 -2
  391. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/callback.html +1 -1
  455. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  456. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  457. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  459. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  464. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  469. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  471. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  479. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  481. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  484. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  491. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +6 -6
  494. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  501. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  511. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/ha.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/ha.rsc +5 -5
  514. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha/__PAGE__.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/ha.segments/_full.segment.rsc +5 -5
  519. package/app/.next-cli-build/server/app/dashboard/ha.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/ha.segments/_index.segment.rsc +4 -4
  521. package/app/.next-cli-build/server/app/dashboard/ha.segments/_tree.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +4 -4
  532. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +6 -6
  541. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +4 -4
  543. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +6 -6
  546. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +6 -6
  551. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +4 -4
  553. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  561. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  564. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  567. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  568. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  572. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  574. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/models.html +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/models.rsc +6 -6
  577. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models/__PAGE__.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/dashboard/models.segments/_full.segment.rsc +6 -6
  582. package/app/.next-cli-build/server/app/dashboard/models.segments/_head.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/models.segments/_index.segment.rsc +4 -4
  584. package/app/.next-cli-build/server/app/dashboard/models.segments/_tree.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  587. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  591. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  592. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  594. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  597. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  598. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  603. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  605. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  608. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  613. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  615. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  618. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  625. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  628. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  629. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  633. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  635. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  636. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  637. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  638. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  639. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  641. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  642. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  643. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  645. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  646. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +6 -6
  648. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  649. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  651. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  652. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +6 -6
  653. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  655. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  656. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  660. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  661. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  663. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  664. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  665. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  667. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  670. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  671. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  673. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  674. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  675. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  676. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  677. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  678. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  680. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  681. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  683. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  685. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  687. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  688. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  689. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  690. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  691. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  692. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  694. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  695. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  697. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  698. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  699. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  700. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  701. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  704. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  705. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  706. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  707. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  708. package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +5 -5
  710. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  713. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  714. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +5 -5
  715. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
  716. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +4 -4
  717. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +2 -2
  718. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  719. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  720. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  721. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  722. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  724. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  728. package/app/.next-cli-build/server/app/index.html +1 -1
  729. package/app/.next-cli-build/server/app/index.rsc +4 -4
  730. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  732. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  733. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  734. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  735. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  736. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  737. package/app/.next-cli-build/server/app/landing.html +1 -1
  738. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  739. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  740. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  742. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  743. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  744. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  745. package/app/.next-cli-build/server/app/login/page.js +1 -1
  746. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  747. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  748. package/app/.next-cli-build/server/app/login.html +1 -1
  749. package/app/.next-cli-build/server/app/login.rsc +5 -5
  750. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  751. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  752. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  753. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  754. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  755. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  756. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  757. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  758. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  759. package/app/.next-cli-build/server/app-paths-manifest.json +3 -3
  760. package/app/.next-cli-build/server/chunks/1103.js +1 -1
  761. package/app/.next-cli-build/server/chunks/1195.js +1 -1
  762. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  763. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  764. package/app/.next-cli-build/server/chunks/1708.js +1 -1
  765. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  766. package/app/.next-cli-build/server/chunks/1923.js +1 -1
  767. package/app/.next-cli-build/server/chunks/2072.js +37 -37
  768. package/app/.next-cli-build/server/chunks/2269.js +1 -1
  769. package/app/.next-cli-build/server/chunks/{1038.js → 2364.js} +1 -1
  770. package/app/.next-cli-build/server/chunks/2414.js +1 -1
  771. package/app/.next-cli-build/server/chunks/2596.js +1 -0
  772. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  773. package/app/.next-cli-build/server/chunks/290.js +1 -1
  774. package/app/.next-cli-build/server/chunks/3428.js +14 -0
  775. package/app/.next-cli-build/server/chunks/3484.js +1 -1
  776. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  777. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  778. package/app/.next-cli-build/server/chunks/369.js +45 -42
  779. package/app/.next-cli-build/server/chunks/412.js +8 -8
  780. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  781. package/app/.next-cli-build/server/chunks/447.js +1 -0
  782. package/app/.next-cli-build/server/chunks/4574.js +1 -1
  783. package/app/.next-cli-build/server/chunks/4646.js +1 -1
  784. package/app/.next-cli-build/server/chunks/4757.js +1 -1
  785. package/app/.next-cli-build/server/chunks/4767.js +20 -0
  786. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  787. package/app/.next-cli-build/server/chunks/5345.js +1 -1
  788. package/app/.next-cli-build/server/chunks/5434.js +17 -16
  789. package/app/.next-cli-build/server/chunks/5461.js +1 -1
  790. package/app/.next-cli-build/server/chunks/5703.js +1 -1
  791. package/app/.next-cli-build/server/chunks/5749.js +1 -1
  792. package/app/.next-cli-build/server/chunks/5752.js +1 -1
  793. package/app/.next-cli-build/server/chunks/5817.js +1 -1
  794. package/app/.next-cli-build/server/chunks/595.js +1 -1
  795. package/app/.next-cli-build/server/chunks/6004.js +1 -1
  796. package/app/.next-cli-build/server/chunks/6038.js +1 -1
  797. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  798. package/app/.next-cli-build/server/chunks/6283.js +1 -0
  799. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  800. package/app/.next-cli-build/server/chunks/6477.js +1 -1
  801. package/app/.next-cli-build/server/chunks/6569.js +1 -1
  802. package/app/.next-cli-build/server/chunks/6587.js +1 -1
  803. package/app/.next-cli-build/server/chunks/6644.js +1 -0
  804. package/app/.next-cli-build/server/chunks/6723.js +2 -2
  805. package/app/.next-cli-build/server/chunks/6947.js +1 -1
  806. package/app/.next-cli-build/server/chunks/7110.js +1 -0
  807. package/app/.next-cli-build/server/chunks/7699.js +2 -2
  808. package/app/.next-cli-build/server/chunks/7726.js +1 -1
  809. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  810. package/app/.next-cli-build/server/chunks/7982.js +1 -1
  811. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  812. package/app/.next-cli-build/server/chunks/823.js +1 -0
  813. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  814. package/app/.next-cli-build/server/chunks/8243.js +2 -2
  815. package/app/.next-cli-build/server/chunks/8391.js +1 -0
  816. package/app/.next-cli-build/server/chunks/8552.js +1 -1
  817. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  818. package/app/.next-cli-build/server/chunks/8716.js +20 -0
  819. package/app/.next-cli-build/server/chunks/8750.js +2 -0
  820. package/app/.next-cli-build/server/chunks/8881.js +1 -0
  821. package/app/.next-cli-build/server/chunks/8950.js +1 -1
  822. package/app/.next-cli-build/server/chunks/9143.js +1 -0
  823. package/app/.next-cli-build/server/chunks/915.js +1 -1
  824. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  825. package/app/.next-cli-build/server/chunks/9340.js +1 -0
  826. package/app/.next-cli-build/server/chunks/9476.js +1 -1
  827. package/app/.next-cli-build/server/chunks/{8976.js → 9623.js} +1 -1
  828. package/app/.next-cli-build/server/chunks/9726.js +1 -0
  829. package/app/.next-cli-build/server/chunks/9761.js +1 -1
  830. package/app/.next-cli-build/server/chunks/9898.js +1 -1
  831. package/app/.next-cli-build/server/chunks/9900.js +263 -0
  832. package/app/.next-cli-build/server/instrumentation.js +1 -1
  833. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  834. package/app/.next-cli-build/server/middleware.js +3 -3
  835. package/app/.next-cli-build/server/pages/404.html +1 -1
  836. package/app/.next-cli-build/server/pages/500.html +1 -1
  837. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  838. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  839. package/app/.next-cli-build/static/chunks/{1321-e24d239eca85d2ee.js → 1321-2fb3acf98678a17a.js} +1 -1
  840. package/app/.next-cli-build/static/chunks/5497-6d8e5deee33dd8c2.js +17 -0
  841. package/app/.next-cli-build/static/chunks/{6252-2c9263bdf82cfcc7.js → 6252-7fb56cf78f6f7acf.js} +17 -16
  842. package/app/.next-cli-build/static/chunks/8105-7223feec2e3f1a09.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0f417115771f2b17.js → page-a0907899ceaf136b.js} +17 -17
  844. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d08c7e6e5aac5fe2.js +27 -0
  845. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-7c6c3a69f4ab4600.js → layout-e28530936918eb8e.js} +1 -1
  846. package/app/.next-cli-build/static/chunks/app/login/page-175fe4ab69a7d876.js +1 -0
  847. package/app/.next-cli-build/static/css/6b3b2cabd78e8b17.css +1 -0
  848. package/app/CHANGELOG.md +35 -1
  849. package/app/package.json +1 -1
  850. package/app/public/CHANGELOG.md +35 -1
  851. package/app/src/lib/db/adapters/sqljsAdapter.js +7 -5
  852. package/app/src/mitm/server.js +2 -2
  853. package/cli.js +14 -15
  854. package/package.json +1 -1
  855. package/src/cli/utils/ownedProcess.js +56 -0
  856. package/app/.next-cli-build/server/chunks/1407.js +0 -1
  857. package/app/.next-cli-build/server/chunks/1719.js +0 -1
  858. package/app/.next-cli-build/server/chunks/211.js +0 -1
  859. package/app/.next-cli-build/server/chunks/2751.js +0 -263
  860. package/app/.next-cli-build/server/chunks/4378.js +0 -18
  861. package/app/.next-cli-build/server/chunks/4704.js +0 -18
  862. package/app/.next-cli-build/server/chunks/4755.js +0 -1
  863. package/app/.next-cli-build/server/chunks/4878.js +0 -1
  864. package/app/.next-cli-build/server/chunks/5009.js +0 -1
  865. package/app/.next-cli-build/server/chunks/6211.js +0 -1
  866. package/app/.next-cli-build/server/chunks/6651.js +0 -14
  867. package/app/.next-cli-build/server/chunks/8403.js +0 -1
  868. package/app/.next-cli-build/server/chunks/8459.js +0 -1
  869. package/app/.next-cli-build/server/chunks/9865.js +0 -1
  870. package/app/.next-cli-build/static/chunks/5497-2c918212e5805fde.js +0 -17
  871. package/app/.next-cli-build/static/chunks/8105-768dd009ef59bd6c.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b0a7773579bee0e4.js +0 -27
  873. package/app/.next-cli-build/static/chunks/app/login/page-34d2b211721b83e6.js +0 -1
  874. package/app/.next-cli-build/static/css/a55a3dbc1e459ce4.css +0 -1
  875. /package/app/.next-cli-build/static/{lNMGBdqGoXWqbIsBF3nEf → DtJULoSkZ-eyHGG_X3Yoy}/_buildManifest.js +0 -0
  876. /package/app/.next-cli-build/static/{lNMGBdqGoXWqbIsBF3nEf → DtJULoSkZ-eyHGG_X3Yoy}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=2269,exports.ids=[2269],exports.modules={92269:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,calculateCostFromTokens:()=>l,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5,long_context:{threshold:272e3,input:5,output:22.5,cached:.5,reasoning:22.5,cache_creation:5}},"gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5,cache_creation:.75},"gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25,cache_creation:.2},"gpt-5.5":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5,long_context:{threshold:272e3,input:10,output:45,cached:1,reasoning:45,cache_creation:10}},"gpt-5.6":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-5.6-luna":{input:.2,output:1.2,cached:.02,reasoning:1.2,cache_creation:.25,long_context:{threshold:272e3,input:.4,output:1.8,cached:.04,reasoning:1.8,cache_creation:.5}},"gpt-5.6-terra":{input:2,output:12,cached:.2,reasoning:12,cache_creation:2.5,long_context:{threshold:272e3,input:4,output:18,cached:.4,reasoning:18,cache_creation:5}},"gpt-5.6-sol":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5,long_context:{threshold:272e3,input:20,output:75,cached:2,reasoning:75,cache_creation:25}},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"agnes-3.0-pro":{input:.45,output:.9,cached:.045},"gemini-4-argon":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"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},"qwen3-coder-plus":{input:.65,output:3.25,cached:.5,reasoning:3.25,cache_creation:1},"qwen3-coder-flash":{input:.195,output:.975,cached:.25,reasoning:.975,cache_creation:.5},"qwen3-coder-next":{input:.12,output:.8,cached:.06,reasoning:.8,cache_creation:.5},"qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.8-27b":{input:.4,output:3,cached:.05,reasoning:3},"qwen3.8-2.4t-a95b":{input:2,output:6,cached:.25,reasoning:6},"qwen3.7-max":{input:1.475,output:4.425,cached:.25,reasoning:4.425},"qwen3.7-plus":{input:.32,output:1.28,cached:.08,reasoning:1.28},"qwen3.6-plus":{input:.325,output:1.95,reasoning:1.95},"qwen3.6-flash":{input:.1875,output:1.125,cached:.01875,cache_creation:.2344,reasoning:1.125},"qwen3.6-35b-a3b":{input:.098,output:.95,reasoning:.95},"qwen3.6-27b":{input:.289,output:2.4,reasoning:2.4},"qwen3.6-max-preview":{input:1.027,output:6.162,reasoning:6.162},"qwen3.5-plus":{input:.3,output:1.8,reasoning:1.8},"qwen3.5-flash":{input:.065,output:.26,reasoning:.26},"qwen3.5-27b":{input:.195,output:1.56,reasoning:1.56},"qwen3.5-35b-a3b":{input:.14,output:1,reasoning:1},"qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen3.5-397b-a17b":{input:.3025,output:1.925,reasoning:1.925},"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-latest":{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04},"deepseek-v4-flash":{input:.05,output:.16,cached:.013,reasoning:.16,cache_creation:.05},"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},"glm-5.1":{input:.95,output:3.15,cached:.179,reasoning:3.15,cache_creation:.95},"glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5,cache_creation:.15},"glm-5.3":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"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},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:.6,reasoning:12,cache_creation:4}},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:1,reasoning:12,cache_creation:4}},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},meta:{"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-v4-flash*",pricing:{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04}},{pattern:"deepseek-v4-pro*",pricing:{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435}},{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.3-flash*",pricing:{input:.15,output:.5,cached:.075,reasoning:.5,cache_creation:.15}},{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}},{pattern:"*muse-spark*contributor*",pricing:{input:.1,output:.2,cached:.002,reasoning:.3,cache_creation:.1}},{pattern:"*muse-spark*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}},{pattern:"*muse-glimmer*",pricing:{input:.3,output:1.2,cached:.04,reasoning:1.8,cache_creation:.3}},{pattern:"*muse*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}}];function i(a,b){let c=i._cache||(i._cache=new Map),d=c.get(a);return void 0===d&&(d=RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i"),c.set(a,d)),d.test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(a){if(null==a||""===a)return null;let b=Number(a);return Number.isFinite(b)&&b>=0?b:null}function l(a,b){if(!a)return 0;let c=k(a.cost_usd??a.cost_in_usd);if(null!==c)return c;let d=k(a.cost_in_usd_ticks);if(null!==d)return d/1e10;if(!b)return 0;let e=0,f=a.prompt_tokens||a.input_tokens||0,g=a.cached_tokens||a.cache_read_input_tokens||0,h=a.cache_creation_input_tokens||0;e+=Math.max(0,f-g-h)*(b.input/1e6),g>0&&(e+=g*((b.cached||b.input)/1e6)),e+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let i=a.reasoning_tokens||0;i>0&&(e+=i*((b.reasoning||b.output)/1e6)),h>0&&(e+=h*((b.cache_creation||b.input)/1e6));let j=Number(a.pricing_multiplier);return e*(Number.isFinite(j)&&j>0?j:1)}}};
1
+ "use strict";exports.id=2269,exports.ids=[2269],exports.modules={92269:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,calculateCostFromTokens:()=>l,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5,long_context:{threshold:272e3,input:5,output:22.5,cached:.5,reasoning:22.5,cache_creation:5}},"gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5,cache_creation:.75},"gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25,cache_creation:.2},"gpt-5.5":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5,long_context:{threshold:272e3,input:10,output:45,cached:1,reasoning:45,cache_creation:10}},"gpt-5.6":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-5.6-luna":{input:.2,output:1.2,cached:.02,reasoning:1.2,cache_creation:.25,long_context:{threshold:272e3,input:.4,output:1.8,cached:.04,reasoning:1.8,cache_creation:.5}},"gpt-5.6-terra":{input:2,output:12,cached:.2,reasoning:12,cache_creation:2.5,long_context:{threshold:272e3,input:4,output:18,cached:.4,reasoning:18,cache_creation:5}},"gpt-5.6-sol":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5,long_context:{threshold:272e3,input:20,output:75,cached:2,reasoning:75,cache_creation:25}},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"agnes-3.0-pro":{input:.45,output:.9,cached:.045},"gemini-4-argon":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-4-argon-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"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},"qwen3-coder-plus":{input:.65,output:3.25,cached:.5,reasoning:3.25,cache_creation:1},"qwen3-coder-flash":{input:.195,output:.975,cached:.25,reasoning:.975,cache_creation:.5},"qwen3-coder-next":{input:.12,output:.8,cached:.06,reasoning:.8,cache_creation:.5},"qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.8-27b":{input:.4,output:3,cached:.05,reasoning:3},"qwen3.8-2.4t-a95b":{input:2,output:6,cached:.25,reasoning:6},"qwen3.7-max":{input:1.475,output:4.425,cached:.25,reasoning:4.425},"qwen3.7-plus":{input:.32,output:1.28,cached:.08,reasoning:1.28},"qwen3.6-plus":{input:.325,output:1.95,reasoning:1.95},"qwen3.6-flash":{input:.1875,output:1.125,cached:.01875,cache_creation:.2344,reasoning:1.125},"qwen3.6-35b-a3b":{input:.098,output:.95,reasoning:.95},"qwen3.6-27b":{input:.289,output:2.4,reasoning:2.4},"qwen3.6-max-preview":{input:1.027,output:6.162,reasoning:6.162},"qwen3.5-plus":{input:.3,output:1.8,reasoning:1.8},"qwen3.5-flash":{input:.065,output:.26,reasoning:.26},"qwen3.5-27b":{input:.195,output:1.56,reasoning:1.56},"qwen3.5-35b-a3b":{input:.14,output:1,reasoning:1},"qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen3.5-397b-a17b":{input:.3025,output:1.925,reasoning:1.925},"kimi-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k3.1-pro":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash-latest":{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04},"deepseek-v4-flash":{input:.05,output:.16,cached:.013,reasoning:.16,cache_creation:.05},"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},"glm-5.1":{input:.95,output:3.15,cached:.179,reasoning:3.15,cache_creation:.95},"glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5,cache_creation:.15},"glm-5.3":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"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},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:.6,reasoning:12,cache_creation:4}},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:1,reasoning:12,cache_creation:4}},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},meta:{"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-v4-flash*",pricing:{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04}},{pattern:"deepseek-v4-pro*",pricing:{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435}},{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.3-flash*",pricing:{input:.15,output:.5,cached:.075,reasoning:.5,cache_creation:.15}},{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}},{pattern:"*muse-spark*contributor*",pricing:{input:.1,output:.2,cached:.002,reasoning:.3,cache_creation:.1}},{pattern:"*muse-spark*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}},{pattern:"*muse-glimmer*",pricing:{input:.3,output:1.2,cached:.04,reasoning:1.8,cache_creation:.3}},{pattern:"*muse*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}}];function i(a,b){let c=i._cache||(i._cache=new Map),d=c.get(a);return void 0===d&&(d=RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i"),c.set(a,d)),d.test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(a){if(null==a||""===a)return null;let b=Number(a);return Number.isFinite(b)&&b>=0?b:null}function l(a,b){if(!a)return 0;let c=k(a.cost_usd??a.cost_in_usd);if(null!==c)return c;let d=k(a.cost_in_usd_ticks);if(null!==d)return d/1e10;if(!b)return 0;let e=0,f=a.prompt_tokens||a.input_tokens||0,g=a.cached_tokens||a.cache_read_input_tokens||0,h=a.cache_creation_input_tokens||0;e+=Math.max(0,f-g-h)*(b.input/1e6),g>0&&(e+=g*((b.cached||b.input)/1e6)),e+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let i=a.reasoning_tokens||0;i>0&&(e+=i*((b.reasoning||b.output)/1e6)),h>0&&(e+=h*((b.cache_creation||b.input)/1e6));let j=Number(a.pricing_multiplier);return e*(Number.isFinite(j)&&j>0?j:1)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=1038,exports.ids=[1038],exports.modules={2364:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>Z,OPTIONS:()=>Y,buildModelsList:()=>V,comboSeatLimits:()=>R,fetchCompatibleModelIds:()=>O,getCachedModelsList:()=>X,getModelListPolicy:()=>_});var d=c(81329),e=c(63825),f=c(40615),g=c(89718),h=c(23433),i=c(99471);c(38775);var j=c(16655),k=c(74452),l=c(50287),m=c(72162),n=c(27811),o=c(58569),p=c(86925),q=c(9155),r=c(89843),s=c(28730),t=c(85640),u=c(11847);let v=new Map;async function w(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),1e4);try{let d=await (0,r.proxyAwareFetch)("https://api.githubcopilot.com/models",{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json","Copilot-Integration-Id":"vscode-chat","editor-version":`vscode/${s.x0.VSCODE_VERSION}`,"editor-plugin-version":`copilot-chat/${s.x0.COPILOT_CHAT_VERSION}`,"user-agent":s.x0.USER_AGENT,"x-github-api-version":s.x0.API_VERSION},cache:"no-store",signal:b||c.signal});if(!d.ok){let a=Error(`Copilot /models returned ${d.status}`);throw a.status=d.status,a}let e=await d.json();return Array.isArray(e?.data)?e.data:[]}finally{clearTimeout(d)}}async function x(a,b={}){let c,d=a?.providerSpecificData?.copilotToken||a?.accessToken;if(!d)return b.log?.debug?.("COPILOT_MODELS","No copilotToken/accessToken; skipping live fetch"),null;let e=a?.providerSpecificData?.copilotToken||a?.accessToken||"copilot-anonymous",f=Date.now();if(!b.forceRefresh){let a=v.get(e);if(a&&a.expiresAt>f)return{models:a.models}}try{c=await w(d,b.signal)}catch(d){if(!d||401!==d.status&&403!==d.status||!a.accessToken)return b.log?.warn?.("COPILOT_MODELS",`Live model fetch failed: ${d?.message||d}`),null;{b.log?.info?.("COPILOT_MODELS",`Got ${d.status}; refreshing Copilot token`);let e=await (0,t.jR)(a.accessToken);if(!e?.token)return b.log?.warn?.("COPILOT_MODELS","Token refresh did not return a token"),null;if("function"==typeof b.onCredentialsRefreshed)try{await b.onCredentialsRefreshed({copilotToken:e.token,copilotTokenExpiresAt:e.expiresAt})}catch(a){b.log?.warn?.("COPILOT_MODELS",`onCredentialsRefreshed failed: ${a?.message||a}`)}try{c=await w(e.token,b.signal)}catch(a){return b.log?.warn?.("COPILOT_MODELS",`Retry after refresh failed: ${a?.message||a}`),null}}}let g=function(a){let b=new Set(["auto"]),c=[{id:"auto",name:"Auto"}];for(let d of a){if(!d||"object"!=typeof d||d.capabilities?.type!=="chat"||d.policy&&"enabled"!==d.policy.state)continue;let a=d.id;if(!a||b.has(a))continue;b.add(a);let e=d.capabilities||{},f=e.limits||{},g=e.supports||{},h={...(0,u.getCapabilitiesForModel)("github",a),...Number.isFinite(f.max_context_window_tokens)?{contextWindow:f.max_context_window_tokens}:{},...Number.isFinite(f.max_prompt_tokens)?{maxPrompt:f.max_prompt_tokens}:{},...Number.isFinite(f.max_output_tokens)?{maxOutput:f.max_output_tokens}:{},..."boolean"==typeof g.vision?{vision:g.vision}:{},..."boolean"==typeof g.tool_calls?{tools:g.tool_calls}:{},...!0===g.adaptive_thinking||Array.isArray(g.reasoning_effort)?{reasoning:!0}:{}};c.push({id:a,name:d.name||a,capabilities:h})}return c}(c);return g.length?(v.set(e,{expiresAt:f+3e5,models:g}),{models:g}):null}var y=c(40694),z=c(63123),A=c(26588);c(49934);var B=c(49476),C=c(67828),D=c(39326),E=c(68001),F=c(54402);async function G(a,b){let c=await (0,q.EV)({provider:b,accessToken:a.accessToken,apiKey:a.apiKey,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}}),d=(0,q.So)(c);return d.length?{models:d.map(a=>({id:a.id,name:a.name}))}:null}let H={...Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a])),...f.js};function I(a){let b=a.indexOf("/");if(b<=0)return null;let c=a.slice(0,b);return(0,u.getCapabilitiesForModel)(H[c]||c,a.slice(b+1))}let J={kiro:async a=>{let b=await (0,o.cW)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},qoder:async a=>G(a,"qoder"),"qoder-cn":async a=>G(a,"qoder-cn"),kimchi:async a=>{let b=await (0,p.av)({accessToken:a.accessToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},github:async a=>{let b=await x({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console,onCredentialsRefreshed:async b=>{await (0,C.vN)(a.id,{copilotToken:b.copilotToken,copilotTokenExpiresAt:b.copilotTokenExpiresAt,existingProviderSpecificData:a.providerSpecificData||{}})}});return b?.models?.length?{models:b.models}:null},clinepass:async a=>{let b=await (0,y.P)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},cline:async a=>{let b=await (0,y.M)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},"grok-cli":async a=>{let b=await (0,D.B)(a.providerSpecificData||{}),c=await (0,z.M)({...a,connectionId:a.id},{log:console,proxyOptions:{connectionProxyEnabled:!0===b.connectionProxyEnabled,connectionProxyUrl:b.connectionProxyUrl||"",connectionNoProxy:b.connectionNoProxy||"",vercelRelayUrl:b.vercelRelayUrl||"",strictProxy:!0===b.strictProxy},onCredentialsRefreshed:async b=>{await (0,C.vN)(a.id,{...b,existingProviderSpecificData:a.providerSpecificData||{}})}});return c?.models?.length?{models:c.models}:null},cursor:async a=>{let b=await (0,A.FD)({accessToken:a.accessToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null}},K="x-9r-internal-models-fetch",L={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText",video:"video"};function M(a){let b=a?.kind||a?.type;return b&&L[b]||"llm"}function N(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}async function O(a){if(!a?.apiKey)return[];let b="string"==typeof a?.providerSpecificData?.baseUrl?a.providerSpecificData.baseUrl.trim().replace(/\/$/,""):"";if(!b)return[];let c=`${b}/models`,d={"Content-Type":"application/json"};if((0,f.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,f.gb)(a.provider))return[];c.endsWith("/messages/models")?c=c.slice(0,-9):c.endsWith("/messages")&&(c=`${c.slice(0,-9)}/models`),d["x-api-key"]=a.apiKey,d["anthropic-version"]="2023-06-01",d.Authorization=`Bearer ${a.apiKey}`}try{var e;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),f=await fetch(c,{method:"GET",headers:{...d,[K]:"1"},cache:"no-store",signal:a.signal});if(clearTimeout(b),!f.ok)return[];let g=(e=await f.json(),Array.isArray(e)?e:e?.data||e?.models||e?.results||[]);return Array.from(new Set(g.map(a=>a?.id||a?.name||a?.model).filter(a=>"string"==typeof a&&""!==a.trim())))}catch{return[]}}function P(a,b){let c=f.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}function Q(a,b){let c=a?.kind||"llm";return b.includes(c)}function R(a,b,c=null,d={},e=new Set){let f="string"==typeof a?.name?a.name:null;if(f){if(e.has(f))return{contextWindow:void 0,maxOutput:void 0};e.add(f)}let g=Array.isArray(a?.models)?a.models:[],h=c&&c.size>0,i=h?g.filter(a=>{if(!h||"string"!=typeof a)return!0;let b=a.indexOf("/");if(b<=0)return!0;let d=a.slice(0,b),e=H[d]||d;return c.has(e)}):g,j=i.length>0?i:g,k=[],l=1/0;try{for(let a of j){if("string"!=typeof a)continue;if(0>=a.indexOf("/")){let f=b?.get(a);if(f){let a=R(f,b,c,d,e);Number.isFinite(a.contextWindow)&&k.push(a.contextWindow),Number.isFinite(a.maxOutput)&&(l=Math.min(l,a.maxOutput));continue}}let f=I(a)||(0,u.getCapabilitiesForModel)(null,a);Number.isFinite(f?.contextWindow)&&k.push(f.contextWindow),Number.isFinite(f?.maxOutput)&&(l=Math.min(l,f.maxOutput))}}finally{f&&e.delete(f)}let{mode:m,custom:n}=(0,u.comboWindowSetting)(d?.[f]);return{contextWindow:(0,u.comboContextWindow)(k,m,n),seatMinWindow:k.length?Math.min(...k):void 0,seatMaxWindow:k.length?Math.max(...k):void 0,maxOutput:Number.isFinite(l)?l:void 0}}function S(a,b,c,d=null,f={}){let g={id:a.name,object:"model",owned_by:"combo",name:(0,e.X)(a.name)};if("webSearch"===a.kind||"webFetch"===a.kind)g.kind=a.kind;else{let e=(0,u.aggregateComboCapabilities)(a.models,b,I);e&&(g.capabilities=e);let{contextWindow:h,maxOutput:i}=R(a,c,d,f);Number.isFinite(h)&&(g.context_length=h,g.capabilities&&(g.capabilities.contextWindow=h)),Number.isFinite(i)&&(g.max_completion_tokens=i)}return g}let T=new Map;async function U(a){if(!a?.url||!a?.type)return[];let b=T.get(a.url);if(b&&Date.now()<b.expiresAt)return b.ids;try{let b=new AbortController,c=setTimeout(()=>b.abort(),5e3),d=await fetch(a.url,{cache:"no-store",signal:b.signal});if(clearTimeout(c),!d.ok)return[];let e=await d.json(),f=e.data??e.models??e,g=E.S[a.type];if(!g)return[];let h=(g(Array.isArray(f)?f:[])||[]).map(a=>a?.id).filter(a=>"string"==typeof a&&""!==a.trim());return T.set(a.url,{ids:h,expiresAt:Date.now()+6e5}),h}catch{return[]}}async function V(a,b={}){let c=!0===b.skipDynamicFetch,h=[],k=!1;try{h=(h=await (0,g.getProviderConnections)()).filter(a=>!1!==a.isActive)}catch(a){k=!0,console.log("Could not fetch providers, returning all models")}let l=[];try{l=await (0,g.Uv)()}catch(a){console.log("Could not fetch combos")}let n=Object.fromEntries(l.map(a=>[a.name,a.models])),o=new Map(l.filter(a=>"string"==typeof a?.name).map(a=>[a.name,a])),p={};try{p=await (0,g.mt)()}catch(a){console.log("Could not fetch settings, using defaults")}let q=p?.comboStrategies||{};if(p.exposeComboOnly){let b=new Set,c=[];for(let d of l){if(!Q(d,a))continue;let e=S(d,n,o,null,q);b.has(e.id)||(b.add(e.id),c.push(e))}return c}let r=[];try{r=await (0,g.uv)()}catch(a){console.log("Could not fetch custom models")}let s={};try{s=await (0,g.OM)()}catch(a){console.log("Could not fetch model aliases")}let t={};try{t=await (0,j.vF)()}catch(a){console.log("Could not fetch disabled models")}let v=(a,b)=>Array.isArray(t[a])&&t[a].includes(b),w={};try{w=await (0,m.Kz)()}catch(a){console.log("Could not fetch enabled models")}let x=(a,b)=>{let c=d.Xg[a]||a;for(let d of[w[(b?.providerSpecificData?.prefix||(0,f.wG)(a)||c).trim()],w[c],w[a],b?.providerSpecificData?.enabledModels]){if(!Array.isArray(d))continue;let a=Array.from(new Set(d.filter(a=>"string"==typeof a&&""!==a.trim())));if(a.length>0)return a}return[]},y=new Map;for(let a of h)a.isActive&&!y.has(a.provider)&&y.set(a.provider,a);for(let[a,b]of Object.entries(f.IS||{}))b?.noAuth&&!y.has(a)&&y.set(a,{id:"noauth",provider:a,isActive:!0});let z=[];for(let b of l){if(!Q(b,a))continue;let c=S(b,n,o,y,q);z.push(c)}if(0===h.length){let b=new Set;if(!k)for(let a of B.default)(!0===a.noAuth||a.transport?.noAuth===!0)&&b.add(a.id);for(let[c,f]of Object.entries(d.vq)){let d=H[c]||c;if(!P(d,a)||!k&&!b.has(d))continue;let g=x(d,null);for(let b of f)a.includes(M(b))&&(!(g.length>0)||g.includes(b.id))&&(v(c,b.id)||v(d,b.id)||z.push({id:`${c}/${b.id}`,object:"model",owned_by:c,name:(0,e.X)(b.id,b.name),capabilities:{...(0,u.getCapabilitiesForModel)(d,b.id),...(0,F.F)(r,[c,d],b.id)}}))}for(let b of r){if(!b?.id||b.type&&"llm"!==b.type||!a.includes("llm"))continue;let c=b.providerAlias;if(!c)continue;let d=String(b.id).trim();d&&z.push({id:`${c}/${d}`,object:"model",owned_by:c,name:(0,e.X)(d,b.name)})}}else for(let[b,g]of y.entries()){if(!P(b,a))continue;let h=d.Xg[b]||b,i=(g?.providerSpecificData?.prefix||(0,f.wG)(b)||h).trim(),j=d.vq[h]||[],k=x(b,g),l=k.length>0,m=(0,f.mq)(b)||(0,f.gb)(b),n=new Map(j.map(a=>[a.id,M(a)])),o=new Map(j.filter(a=>a?.id).map(a=>[a.id,a.name])),p=new Map,q=new Map,t=new Map,w=l?k:j.map(a=>a.id),y=new Map,A=new Map,B=new Map,C=r.filter(c=>{if(!c?.id)return!1;let e=(0,d.CP)(c)||"llm";if(!a.includes(e)&&!("imageToText"===e&&a.includes("llm")))return!1;let f=c.providerAlias;return f===h||f===i||f===b}).map(a=>{let b=String(a.id).trim();return b&&(y.set(b,(0,d.CP)(a)||"llm"),"string"==typeof a.name&&A.set(b,a.name),a.caps&&"object"==typeof a.caps&&B.set(b,a.caps)),b}).filter(a=>""!==a);m&&0===w.length&&0===C.length&&!c&&(w=await O(g));let D=J[b];if(D&&!l&&0===j.length&&0===C.length)try{let a=await D(g);a?.models?.length&&(w=a.models.map(a=>a.id),p=new Map(a.models.filter(a=>a?.id).map(a=>[a.id,M(a)])),q=new Map(a.models.filter(a=>a?.id&&"string"==typeof a.name).map(a=>[a.id,a.name])),t=new Map(a.models.filter(a=>a?.id&&a.capabilities).map(a=>[a.id,a.capabilities])))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}for(let c of Array.from(new Set([...w.map(a=>a.startsWith(`${i}/`)?a.slice(i.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim()),...C,...Object.values(s||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${i}/`)||a.startsWith(`${h}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${i}/`)?a.slice(i.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let d=y.get(c),f=p.get(c),g=d||f||n.get(c)||N(c),j="imageToText"===g&&a.includes("llm");if(!a.includes(g)&&!j||v(i,c)||v(h,c)||v(b,c))continue;let k={id:`${i}/${c}`,object:"model",owned_by:i,name:(0,e.X)(c,A.get(c)||q.get(c)||o.get(c))},l=t.get(c)||(0,u.capabilitiesFromServiceKind)(d||f)||("llm"===g?(0,u.getCapabilitiesForModel)(b,c):null),m=(0,u.withDeclaredCapabilities)(l,B.get(c));if(m&&(k.capabilities=m),"llm"===g||j){let a=m?.contextWindow,d=m?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(d)){let e=(0,u.getCapabilitiesForModel)(b,c);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(d)||(d=e.maxOutput)}Number.isFinite(a)&&(k.context_length=a),Number.isFinite(d)&&(k.max_completion_tokens=d)}z.push(k)}let E=f.AI_PROVIDERS[b];a.includes("webSearch")&&E?.searchConfig&&z.push({id:`${i}/search`,object:"model",kind:"webSearch",owned_by:i}),a.includes("webFetch")&&E?.fetchConfig&&z.push({id:`${i}/fetch`,object:"model",kind:"webFetch",owned_by:i})}for(let[b,e]of Object.entries(f.AI_PROVIDERS)){if(e?.noAuth!==!0||e?.hidden===!0||y.has(b)||!P(b,a))continue;let g=d.Xg[b]||b,h=((0,f.wG)(b)||g).trim(),i=d.vq[g]||[],j=i.map(a=>a.id);e.modelsFetcher&&(!0===e.passthroughModels||0===j.length)&&!c&&(j=Array.from(new Set([...j,...await U(e.modelsFetcher)])));let k=new Map(i.map(a=>[a.id,M(a)]));for(let b of j){let c=k.get(b)||N(b);if(!a.includes(c)||v(h,b)||v(g,b))continue;let d={id:`${h}/${b}`,object:"model",owned_by:h};if("llm"===c){let a=(0,u.getCapabilitiesForModel)(g,b);a&&(d.capabilities=a),Number.isFinite(a?.contextWindow)&&(d.context_length=a.contextWindow),Number.isFinite(a?.maxOutput)&&(d.max_completion_tokens=a.maxOutput)}z.push(d)}}let A={};try{A=await (0,g.Br)()}catch{console.log("Could not fetch capability overrides")}let C=new Map,D=new Map;for(let[a,b]of y){let c=(b.providerSpecificData?.prefix||(0,f.wG)(a)||a).trim();C.set(c,a),D.set(a,c)}for(let a of z){let b=a.id.indexOf("/");if(b<0)continue;let c=a.id.slice(0,b),d=a.id.slice(b+1),e=C.get(c)||H[c]||c,g=(0,f.wG)(e)||e,h=A[`${c}|${d}`]||A[`${g}|${d}`]||A[`${e}|${d}`];h&&(a.capabilities={...a.capabilities||{},...h},Number.isFinite(h.contextWindow)&&(a.context_length=h.contextWindow),Number.isFinite(h.maxOutput)&&(a.max_completion_tokens=h.maxOutput))}let E=new Map(z.map(a=>[a.id,a]));for(let[a,b]of Object.entries(s||{})){if(!a||"string"!=typeof b)continue;let c=b.indexOf("/"),d=c<0?null:b.slice(0,c),e=H[d]||d,g=c<0?b:`${D.get(e)||(0,f.wG)(e)||e}/${b.slice(c+1)}`,h=E.get(g);h&&z.push({...h,id:a,owned_by:"alias"})}let G=[],I=new Set;for(let a of z)!a?.id||I.has(a.id)||(I.add(a.id),G.push(a));if(a.includes("llm")){let b=new Set;for(let a of h){let c=a.provider,e=d.Xg[c]||c,g=(a?.providerSpecificData?.prefix||(0,f.wG)(c)||e).trim();b.add(g),b.add(e),b.add(c)}for(let c of r){if(!c?.id)continue;let e=(0,d.CP)(c)||"llm",f="imageToText"===e;if(!a.includes(e)&&!f)continue;let g=c.providerAlias;if(!g||b.has(g))continue;let h=String(c.id).trim();if(!h||v(g,h))continue;let i=`${g}/${h}`;if(I.has(i))continue;I.add(i);let j={id:i,object:"model",owned_by:g},k=(0,u.getCapabilitiesForModel)(g,h);k&&(j.capabilities=k),Number.isFinite(k?.contextWindow)&&(j.context_length=k.contextWindow),Number.isFinite(k?.maxOutput)&&(j.max_completion_tokens=k.maxOutput),G.push(j)}if(!c&&h.some(a=>"opencode"===a.provider))for(let a of(await (0,i.Y)())){if(!a?.id)continue;let b=String(a.id).trim();if(!b||v("oc",b))continue;let c=`oc/${b}`;if(I.has(c))continue;I.add(c);let d={id:c,object:"model",owned_by:"oc"},e=(0,u.getCapabilitiesForModel)("oc",b);e&&(d.capabilities=e),Number.isFinite(e?.contextWindow)&&(d.context_length=e.contextWindow),Number.isFinite(e?.maxOutput)&&(d.max_completion_tokens=e.maxOutput),G.push(d)}}let K=b.apiKey,L=K?.allowedModels;return Array.isArray(L)&&0!==L.length?G.filter(a=>L.includes(a.id)):G}let W=new Map;async function X(a,b={}){var c,d;let e=(c=!0===b.skipDynamicFetch,d=b.apiKey?.id,`${c?"internal":"full"}::${d||"public"}::${a.join("|")}`),f=W.get(e);if(!0===b.forceFresh){let c=await V(a,b);return W.set(e,{data:c,builtAt:Date.now()}),c}if(f?.building)return f.data??f.building;if(f&&Date.now()-f.builtAt<3e4)return f.data;let g=V(a,b).then(a=>{let b=W.get(e),c=Array.isArray(b?.data)&&b.data.length>0;return 0===a.length&&c?b.data:(W.set(e,{data:a,builtAt:Date.now()}),a)}).catch(a=>{let b=W.get(e);throw b?.data?W.set(e,{data:b.data,builtAt:b.builtAt}):W.delete(e),a});return(W.set(e,f?{...f,building:g}:{data:null,builtAt:0,building:g}),f)?(g.catch(()=>{}),f.data):g}async function Y(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function Z(a){try{let b=a?.headers?.get(K)==="1",c=await _(a);if(c.error)return Response.json({error:{message:"Invalid API key",type:"authentication_error"}},{status:401,headers:{"Access-Control-Allow-Origin":"*"}});let d=await X(["llm"],{skipDynamicFetch:b,apiKey:c.key}),e=(0,h.Tr)(a),f=e?await (0,k.getApiKeyScopeByKey)(e):null,g=(0,l.C)(d,f),i=await (0,n.j)(await (0,n.TM)(a),g),j=[],m=new Set,o=(a,b)=>{if(!a||m.has(a))return;m.add(a);let c=b.context_length||b.capabilities?.contextWindow||272e3,d=Math.floor(.75*c);j.push({slug:a,id:a,display_name:a,description:b.description||"",context_window:c,max_context_window:c,auto_compact_token_limit:d,visibility:"list",supported_in_api:!0,priority:1,shell_type:"unified_exec",support_verbosity:!0,default_verbosity:"low",apply_patch_tool_type:"freeform",web_search_tool_type:"text_and_image",input_modalities:["text","image"],supports_image_detail_original:!0,truncation_policy:{mode:"tokens",limit:1e4},supports_parallel_tool_calls:!0,tool_mode:"code_mode_only",multi_agent_version:"v1",multi_agent_reasoning_effort:"xhigh",use_responses_lite:!0,supports_reasoning_effort_updates:!0,supports_reasoning_summary_parameter:!0,supports_reasoning_summaries:!0,supports_search_tool:!0,prefer_websockets:!1,default_reasoning_summary:"none",default_reasoning_level:"low",supported_reasoning_levels:[{effort:"low",description:"Fast responses with lighter reasoning"},{effort:"medium",description:"Balances speed and reasoning depth for everyday tasks"},{effort:"high",description:"Greater reasoning depth for complex problems"},{effort:"xhigh",description:"Extra high reasoning depth for complex problems"},{effort:"max",description:"Maximum reasoning depth for the hardest problems"}],experimental_supported_tools:["multi_agent_v1","send_user_message_async","clock"],base_instructions:"You are Codex, a coding agent.",model_messages:{instructions_template:"You are Codex, a coding agent."}})};for(let a of i)o(a.id,a),"string"==typeof a.id&&a.id.includes("/")&&o(a.id.slice(a.id.indexOf("/")+1),a);return Response.json({object:"list",data:i,models:j},{headers:{"Access-Control-Allow-Origin":"*"}})}catch(a){return console.log("Error fetching models:",a),Response.json({error:{message:a.message,type:"server_error"}},{status:500})}}async function $(a){let b=(0,h.Tr)(a);if(!b)return{present:!1,key:null};let c=await (0,g.y7)(b),d=c?.expiresAt&&new Date(c.expiresAt).getTime()<=Date.now();return{present:!0,key:c?.isActive&&!d?c:null}}async function _(a){let b=await (0,g.mt)(),c=await $(a);return b.requireApiKey&&!c.key||c.present&&!c.key?{error:!0}:{key:c.key}}},4905:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}},16655:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(11708)},40694:(a,b,c)=>{c.d(b,{M:()=>i,P:()=>f});var d=c(7866);async function e(a){let b=!!a?.apiKey,c=b?a.apiKey:a?.accessToken;if(!c)return null;let e=new AbortController,f=setTimeout(()=>e.abort(),5e3);try{let a=b?{Accept:"application/json",Authorization:`Bearer ${c}`}:(0,d.w$)(c,{Accept:"application/json"}),f=await fetch("https://api.cline.bot/api/v1/models",{method:"GET",headers:a,signal:e.signal});if(!f.ok)return null;let g=await f.json(),h=Array.isArray(g)?g:g?.data;return Array.isArray(h)?h:null}catch{return null}finally{clearTimeout(f)}}async function f(a){let b=(await h("clinePass"))?.filter(a=>a.id.startsWith("cline-pass/"));if(b?.length)return{models:b};let c=await e(a);if(!c)return null;let d=c.filter(a=>"string"==typeof a?.id&&a.id.startsWith("cline-pass/")).map(a=>({id:a.id,name:a.name||a.id}));return d.length?{models:d}:null}async function g(){return h("free")}async function h(a){let b=new AbortController,c=setTimeout(()=>b.abort(),5e3);try{let c=await fetch("https://api.cline.bot/api/v1/ai/cline/recommended-models",{method:"GET",headers:{Accept:"application/json"},signal:b.signal});if(!c.ok)return null;let d=await c.json(),e=Array.isArray(d?.[a])?d[a]:[];if(!e.length)return null;return e.filter(a=>"string"==typeof a?.id&&""!==a.id.trim()).map(a=>({id:a.id,name:a.name||a.id}))}catch{return null}finally{clearTimeout(c)}}async function i(a){let b=await e(a);if(!b)return null;let c=b.filter(a=>"string"==typeof a?.id&&""!==a.id.trim()&&!a.id.startsWith("cline-pass/")).map(a=>({id:a.id,name:a.name||a.id})),d=await g(),f=new Map(c.map(a=>[a.id,a]));for(let a of d||[])f.has(a.id)||f.set(a.id,a);let h=Array.from(f.values());return h.length?{models:h}:null}},50287:(a,b,c)=>{c.d(b,{C:()=>e});var d=c(29686);function e(a,b){return b&&Array.isArray(a)?a.filter(a=>(0,d.MH)(b,a?.id)):a}},54402:(a,b,c)=>{c.d(b,{F:()=>e,G:()=>f});var d=c(11708);function e(a,b,c){let d=a.find(a=>b.includes(a.providerAlias)&&a.id===c&&(!a.type||"llm"===a.type));return d?.caps&&"object"==typeof d.caps?d.caps:null}async function f(a,b){try{return e(await (0,d.uv)(),a,b)}catch{return null}}},63123:(a,b,c)=>{c.d(b,{M:()=>h});var d=c(13247),e=c(18129),f=c(89843);let g=`${d.Nr}/models`;async function h(a,b={}){let{fetchFn:c=f.proxyAwareFetch,log:i=console,proxyOptions:j=null,onCredentialsRefreshed:k}=b,l=a?.accessToken;if(!l)return{models:[],warning:"Grok CLI access token is missing."};let m=b=>c(g,{method:"GET",headers:function(a,b={}){let c={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":d.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG,"x-grok-client-identifier":d.rK,"x-grok-client-mode":"headless"},e=b?.email,f=b?.userId||b?.principalId;return e&&(c["x-email"]=e),f&&(c["x-userid"]=f),c}(b,a?.providerSpecificData)},j);try{let b=await m(l);if((401===b.status||403===b.status)&&a?.refreshToken){let c=await (0,e.Vq)("grok-cli",a,i,j);if(c?.accessToken){l=c.accessToken;try{await k?.(c)}catch(a){i?.warn?.("Grok CLI credential persistence failed",a)}b=await m(l)}}if(!b.ok){let a=await b.text().catch(()=>"");return{models:[],warning:`Grok CLI model discovery failed (${b.status})${a?`: ${a.slice(0,160)}`:""}`}}let c=function(a){let b,c=new Set,e=[];for(let[f,g]of(b=Array.isArray(a)?a:a?.data??a?.models??a?.results??[],Array.isArray(b)?b.map(a=>[null,a]):b&&"object"==typeof b?Object.entries(b):[])){let a="string"==typeof g?{id:g}:g;if(!a||"object"!=typeof a||Array.isArray(a))continue;let b=String(a.id??a.model_id??a.modelId??a.model??a.slug??f??a.name??"").trim();if(!b||c.has(b))continue;c.add(b);let h={...a,id:b,name:a.display_name??a.displayName??a.name??b},i=Number(a.context_length??a.contextLength??a.context_window??a.contextWindow),j=Number(a.max_output_tokens??a.maxOutputTokens);Number.isFinite(i)&&i>0&&(h.contextLength=i),Number.isFinite(j)&&j>0&&(h.maxOutputTokens=j),b===d.to&&(h.contextLength||=5e5,h.maxOutputTokens||=64e3),e.push(h)}return e}(await b.json());return c.length?{models:c}:{models:[],warning:"Grok CLI returned no selectable models."}}catch(a){return{models:[],warning:`Grok CLI model discovery failed: ${a.message}`}}}},63825:(a,b,c)=>{c.d(b,{X:()=>j});let d={ai:"AI",claude:"Claude",deepseek:"DeepSeek",gemma:"Gemma",gemini:"Gemini",glm:"GLM",gpt:"GPT",grok:"Grok",hf:"HF",kimi:"Kimi",llama:"Llama",mimo:"MiMo",mistral:"Mistral",mixtral:"Mixtral",moonshot:"Moonshot",nova:"Nova",oss:"OSS",phi:"Phi",qwen:"Qwen",stt:"STT",tts:"TTS",vl:"VL"},e=new Set(["gpt"]),f=/^(19|20)\d{6}$/,g=/^v\d+([.\d]*)$/i,h=/^([A-Za-z]+)(\d[.\d]*)$/,i=a=>a.charAt(0).toUpperCase()+a.slice(1);function j(a,b){let c="string"==typeof a?a.trim():"",j="string"==typeof b?b.trim():"";return c&&j&&j!==c?j:function(a){let b,c,j=-1===(c=(b="string"==typeof a?a.trim():"").lastIndexOf("/"))?b:b.slice(c+1);if(!j)return"";let k=j.split(/[-_\s]+/).filter(Boolean),l=[];for(let a=0;a<k.length;a+=1){let b=k[a];if(f.test(b))continue;let c=b;for(;/^\d+$/.test(c)&&/^\d+$/.test(k[a+1]||"")&&!f.test(k[a+1]);)a+=1,c=`${c}.${k[a]}`;l.push(c)}if(0===l.length)return j;let m="",n=!1;for(let a of l){let b,c=a.toLowerCase(),f=d[c];if(!f){let b=a.match(h),c=b?d[b[1].toLowerCase()]:null;if(c){m=(m?`${m} ${c}`:c)+(e.has(b[1].toLowerCase())?`-${b[2]}`:` ${b[2]}`),n=!1;continue}}b=f||(g.test(a)?i(a):/^\d/.test(a)?a.toUpperCase():i(a));let j=/^\d/.test(a)||g.test(a);m?m+=n&&j?`-${b}`:` ${b}`:m=b,n=!!f&&e.has(c)}return m||j}(c||j)}},72162:(a,b,c)=>{c.d(b,{Kz:()=>d.Kz,gy:()=>d.gy});var d=c(11708)},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},86925:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(89843);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}}};
1
+ "use strict";exports.id=2364,exports.ids=[2364],exports.modules={2364:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>Z,OPTIONS:()=>Y,buildModelsList:()=>V,comboSeatLimits:()=>R,fetchCompatibleModelIds:()=>O,getCachedModelsList:()=>X,getModelListPolicy:()=>_});var d=c(81329),e=c(63825),f=c(40615),g=c(89718),h=c(23433),i=c(99471);c(38775);var j=c(16655),k=c(74452),l=c(50287),m=c(72162),n=c(27811),o=c(58569),p=c(86925),q=c(9155),r=c(89843),s=c(28730),t=c(85640),u=c(11847);let v=new Map;async function w(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),1e4);try{let d=await (0,r.proxyAwareFetch)("https://api.githubcopilot.com/models",{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json","Copilot-Integration-Id":"vscode-chat","editor-version":`vscode/${s.x0.VSCODE_VERSION}`,"editor-plugin-version":`copilot-chat/${s.x0.COPILOT_CHAT_VERSION}`,"user-agent":s.x0.USER_AGENT,"x-github-api-version":s.x0.API_VERSION},cache:"no-store",signal:b||c.signal});if(!d.ok){let a=Error(`Copilot /models returned ${d.status}`);throw a.status=d.status,a}let e=await d.json();return Array.isArray(e?.data)?e.data:[]}finally{clearTimeout(d)}}async function x(a,b={}){let c,d=a?.providerSpecificData?.copilotToken||a?.accessToken;if(!d)return b.log?.debug?.("COPILOT_MODELS","No copilotToken/accessToken; skipping live fetch"),null;let e=a?.providerSpecificData?.copilotToken||a?.accessToken||"copilot-anonymous",f=Date.now();if(!b.forceRefresh){let a=v.get(e);if(a&&a.expiresAt>f)return{models:a.models}}try{c=await w(d,b.signal)}catch(d){if(!d||401!==d.status&&403!==d.status||!a.accessToken)return b.log?.warn?.("COPILOT_MODELS",`Live model fetch failed: ${d?.message||d}`),null;{b.log?.info?.("COPILOT_MODELS",`Got ${d.status}; refreshing Copilot token`);let e=await (0,t.jR)(a.accessToken);if(!e?.token)return b.log?.warn?.("COPILOT_MODELS","Token refresh did not return a token"),null;if("function"==typeof b.onCredentialsRefreshed)try{await b.onCredentialsRefreshed({copilotToken:e.token,copilotTokenExpiresAt:e.expiresAt})}catch(a){b.log?.warn?.("COPILOT_MODELS",`onCredentialsRefreshed failed: ${a?.message||a}`)}try{c=await w(e.token,b.signal)}catch(a){return b.log?.warn?.("COPILOT_MODELS",`Retry after refresh failed: ${a?.message||a}`),null}}}let g=function(a){let b=new Set(["auto"]),c=[{id:"auto",name:"Auto"}];for(let d of a){if(!d||"object"!=typeof d||d.capabilities?.type!=="chat"||d.policy&&"enabled"!==d.policy.state)continue;let a=d.id;if(!a||b.has(a))continue;b.add(a);let e=d.capabilities||{},f=e.limits||{},g=e.supports||{},h={...(0,u.getCapabilitiesForModel)("github",a),...Number.isFinite(f.max_context_window_tokens)?{contextWindow:f.max_context_window_tokens}:{},...Number.isFinite(f.max_prompt_tokens)?{maxPrompt:f.max_prompt_tokens}:{},...Number.isFinite(f.max_output_tokens)?{maxOutput:f.max_output_tokens}:{},..."boolean"==typeof g.vision?{vision:g.vision}:{},..."boolean"==typeof g.tool_calls?{tools:g.tool_calls}:{},...!0===g.adaptive_thinking||Array.isArray(g.reasoning_effort)?{reasoning:!0}:{}};c.push({id:a,name:d.name||a,capabilities:h})}return c}(c);return g.length?(v.set(e,{expiresAt:f+3e5,models:g}),{models:g}):null}var y=c(40694),z=c(63123),A=c(26588);c(49934);var B=c(49476),C=c(67828),D=c(39326),E=c(68001),F=c(54402);async function G(a,b){let c=await (0,q.EV)({provider:b,accessToken:a.accessToken,apiKey:a.apiKey,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}}),d=(0,q.So)(c);return d.length?{models:d.map(a=>({id:a.id,name:a.name}))}:null}let H={...Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a])),...f.js};function I(a){let b=a.indexOf("/");if(b<=0)return null;let c=a.slice(0,b);return(0,u.getCapabilitiesForModel)(H[c]||c,a.slice(b+1))}let J={kiro:async a=>{let b=await (0,o.cW)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},qoder:async a=>G(a,"qoder"),"qoder-cn":async a=>G(a,"qoder-cn"),kimchi:async a=>{let b=await (0,p.av)({accessToken:a.accessToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},github:async a=>{let b=await x({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console,onCredentialsRefreshed:async b=>{await (0,C.vN)(a.id,{copilotToken:b.copilotToken,copilotTokenExpiresAt:b.copilotTokenExpiresAt,existingProviderSpecificData:a.providerSpecificData||{}})}});return b?.models?.length?{models:b.models}:null},clinepass:async a=>{let b=await (0,y.P)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},cline:async a=>{let b=await (0,y.M)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},"grok-cli":async a=>{let b=await (0,D.B)(a.providerSpecificData||{}),c=await (0,z.M)({...a,connectionId:a.id},{log:console,proxyOptions:{connectionProxyEnabled:!0===b.connectionProxyEnabled,connectionProxyUrl:b.connectionProxyUrl||"",connectionNoProxy:b.connectionNoProxy||"",vercelRelayUrl:b.vercelRelayUrl||"",strictProxy:!0===b.strictProxy},onCredentialsRefreshed:async b=>{await (0,C.vN)(a.id,{...b,existingProviderSpecificData:a.providerSpecificData||{}})}});return c?.models?.length?{models:c.models}:null},cursor:async a=>{let b=await (0,A.FD)({accessToken:a.accessToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null}},K="x-9r-internal-models-fetch",L={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText",video:"video"};function M(a){let b=a?.kind||a?.type;return b&&L[b]||"llm"}function N(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}async function O(a){if(!a?.apiKey)return[];let b="string"==typeof a?.providerSpecificData?.baseUrl?a.providerSpecificData.baseUrl.trim().replace(/\/$/,""):"";if(!b)return[];let c=`${b}/models`,d={"Content-Type":"application/json"};if((0,f.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,f.gb)(a.provider))return[];c.endsWith("/messages/models")?c=c.slice(0,-9):c.endsWith("/messages")&&(c=`${c.slice(0,-9)}/models`),d["x-api-key"]=a.apiKey,d["anthropic-version"]="2023-06-01",d.Authorization=`Bearer ${a.apiKey}`}try{var e;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),f=await fetch(c,{method:"GET",headers:{...d,[K]:"1"},cache:"no-store",signal:a.signal});if(clearTimeout(b),!f.ok)return[];let g=(e=await f.json(),Array.isArray(e)?e:e?.data||e?.models||e?.results||[]);return Array.from(new Set(g.map(a=>a?.id||a?.name||a?.model).filter(a=>"string"==typeof a&&""!==a.trim())))}catch{return[]}}function P(a,b){let c=f.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}function Q(a,b){let c=a?.kind||"llm";return b.includes(c)}function R(a,b,c=null,d={},e=new Set){let f="string"==typeof a?.name?a.name:null;if(f){if(e.has(f))return{contextWindow:void 0,maxOutput:void 0};e.add(f)}let g=Array.isArray(a?.models)?a.models:[],h=c&&c.size>0,i=h?g.filter(a=>{if(!h||"string"!=typeof a)return!0;let b=a.indexOf("/");if(b<=0)return!0;let d=a.slice(0,b),e=H[d]||d;return c.has(e)}):g,j=i.length>0?i:g,k=[],l=1/0;try{for(let a of j){if("string"!=typeof a)continue;if(0>=a.indexOf("/")){let f=b?.get(a);if(f){let a=R(f,b,c,d,e);Number.isFinite(a.contextWindow)&&k.push(a.contextWindow),Number.isFinite(a.maxOutput)&&(l=Math.min(l,a.maxOutput));continue}}let f=I(a)||(0,u.getCapabilitiesForModel)(null,a);Number.isFinite(f?.contextWindow)&&k.push(f.contextWindow),Number.isFinite(f?.maxOutput)&&(l=Math.min(l,f.maxOutput))}}finally{f&&e.delete(f)}let{mode:m,custom:n}=(0,u.comboWindowSetting)(d?.[f]);return{contextWindow:(0,u.comboContextWindow)(k,m,n),seatMinWindow:k.length?Math.min(...k):void 0,seatMaxWindow:k.length?Math.max(...k):void 0,maxOutput:Number.isFinite(l)?l:void 0}}function S(a,b,c,d=null,f={}){let g={id:a.name,object:"model",owned_by:"combo",name:(0,e.X)(a.name)};if("webSearch"===a.kind||"webFetch"===a.kind)g.kind=a.kind;else{let e=(0,u.aggregateComboCapabilities)(a.models,b,I);e&&(g.capabilities=e);let{contextWindow:h,maxOutput:i}=R(a,c,d,f);Number.isFinite(h)&&(g.context_length=h,g.capabilities&&(g.capabilities.contextWindow=h)),Number.isFinite(i)&&(g.max_completion_tokens=i)}return g}let T=new Map;async function U(a){if(!a?.url||!a?.type)return[];let b=T.get(a.url);if(b&&Date.now()<b.expiresAt)return b.ids;try{let b=new AbortController,c=setTimeout(()=>b.abort(),5e3),d=await fetch(a.url,{cache:"no-store",signal:b.signal});if(clearTimeout(c),!d.ok)return[];let e=await d.json(),f=e.data??e.models??e,g=E.S[a.type];if(!g)return[];let h=(g(Array.isArray(f)?f:[])||[]).map(a=>a?.id).filter(a=>"string"==typeof a&&""!==a.trim());return T.set(a.url,{ids:h,expiresAt:Date.now()+6e5}),h}catch{return[]}}async function V(a,b={}){let c=!0===b.skipDynamicFetch,h=[],k=!1;try{h=(h=await (0,g.getProviderConnections)()).filter(a=>!1!==a.isActive)}catch(a){k=!0,console.log("Could not fetch providers, returning all models")}let l=[];try{l=await (0,g.Uv)()}catch(a){console.log("Could not fetch combos")}let n=Object.fromEntries(l.map(a=>[a.name,a.models])),o=new Map(l.filter(a=>"string"==typeof a?.name).map(a=>[a.name,a])),p={};try{p=await (0,g.mt)()}catch(a){console.log("Could not fetch settings, using defaults")}let q=p?.comboStrategies||{};if(p.exposeComboOnly){let b=new Set,c=[];for(let d of l){if(!Q(d,a))continue;let e=S(d,n,o,null,q);b.has(e.id)||(b.add(e.id),c.push(e))}return c}let r=[];try{r=await (0,g.uv)()}catch(a){console.log("Could not fetch custom models")}let s={};try{s=await (0,g.OM)()}catch(a){console.log("Could not fetch model aliases")}let t={};try{t=await (0,j.vF)()}catch(a){console.log("Could not fetch disabled models")}let v=(a,b)=>Array.isArray(t[a])&&t[a].includes(b),w={};try{w=await (0,m.Kz)()}catch(a){console.log("Could not fetch enabled models")}let x=(a,b)=>{let c=d.Xg[a]||a;for(let d of[w[(b?.providerSpecificData?.prefix||(0,f.wG)(a)||c).trim()],w[c],w[a],b?.providerSpecificData?.enabledModels]){if(!Array.isArray(d))continue;let a=Array.from(new Set(d.filter(a=>"string"==typeof a&&""!==a.trim())));if(a.length>0)return a}return[]},y=new Map;for(let a of h)a.isActive&&!y.has(a.provider)&&y.set(a.provider,a);for(let[a,b]of Object.entries(f.IS||{}))b?.noAuth&&!y.has(a)&&y.set(a,{id:"noauth",provider:a,isActive:!0});let z=[];for(let b of l){if(!Q(b,a))continue;let c=S(b,n,o,y,q);z.push(c)}if(0===h.length){let b=new Set;if(!k)for(let a of B.default)(!0===a.noAuth||a.transport?.noAuth===!0)&&b.add(a.id);for(let[c,f]of Object.entries(d.vq)){let d=H[c]||c;if(!P(d,a)||!k&&!b.has(d))continue;let g=x(d,null);for(let b of f)a.includes(M(b))&&(!(g.length>0)||g.includes(b.id))&&(v(c,b.id)||v(d,b.id)||z.push({id:`${c}/${b.id}`,object:"model",owned_by:c,name:(0,e.X)(b.id,b.name),capabilities:{...(0,u.getCapabilitiesForModel)(d,b.id),...(0,F.F)(r,[c,d],b.id)}}))}for(let b of r){if(!b?.id||b.type&&"llm"!==b.type||!a.includes("llm"))continue;let c=b.providerAlias;if(!c)continue;let d=String(b.id).trim();d&&z.push({id:`${c}/${d}`,object:"model",owned_by:c,name:(0,e.X)(d,b.name)})}}else for(let[b,g]of y.entries()){if(!P(b,a))continue;let h=d.Xg[b]||b,i=(g?.providerSpecificData?.prefix||(0,f.wG)(b)||h).trim(),j=d.vq[h]||[],k=x(b,g),l=k.length>0,m=(0,f.mq)(b)||(0,f.gb)(b),n=new Map(j.map(a=>[a.id,M(a)])),o=new Map(j.filter(a=>a?.id).map(a=>[a.id,a.name])),p=new Map,q=new Map,t=new Map,w=l?k:j.map(a=>a.id),y=new Map,A=new Map,B=new Map,C=r.filter(c=>{if(!c?.id)return!1;let e=(0,d.CP)(c)||"llm";if(!a.includes(e)&&!("imageToText"===e&&a.includes("llm")))return!1;let f=c.providerAlias;return f===h||f===i||f===b}).map(a=>{let b=String(a.id).trim();return b&&(y.set(b,(0,d.CP)(a)||"llm"),"string"==typeof a.name&&A.set(b,a.name),a.caps&&"object"==typeof a.caps&&B.set(b,a.caps)),b}).filter(a=>""!==a);m&&0===w.length&&0===C.length&&!c&&(w=await O(g));let D=J[b];if(D&&!l&&0===j.length&&0===C.length)try{let a=await D(g);a?.models?.length&&(w=a.models.map(a=>a.id),p=new Map(a.models.filter(a=>a?.id).map(a=>[a.id,M(a)])),q=new Map(a.models.filter(a=>a?.id&&"string"==typeof a.name).map(a=>[a.id,a.name])),t=new Map(a.models.filter(a=>a?.id&&a.capabilities).map(a=>[a.id,a.capabilities])))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}for(let c of Array.from(new Set([...w.map(a=>a.startsWith(`${i}/`)?a.slice(i.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim()),...C,...Object.values(s||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${i}/`)||a.startsWith(`${h}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${i}/`)?a.slice(i.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let d=y.get(c),f=p.get(c),g=d||f||n.get(c)||N(c),j="imageToText"===g&&a.includes("llm");if(!a.includes(g)&&!j||v(i,c)||v(h,c)||v(b,c))continue;let k={id:`${i}/${c}`,object:"model",owned_by:i,name:(0,e.X)(c,A.get(c)||q.get(c)||o.get(c))},l=t.get(c)||(0,u.capabilitiesFromServiceKind)(d||f)||("llm"===g?(0,u.getCapabilitiesForModel)(b,c):null),m=(0,u.withDeclaredCapabilities)(l,B.get(c));if(m&&(k.capabilities=m),"llm"===g||j){let a=m?.contextWindow,d=m?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(d)){let e=(0,u.getCapabilitiesForModel)(b,c);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(d)||(d=e.maxOutput)}Number.isFinite(a)&&(k.context_length=a),Number.isFinite(d)&&(k.max_completion_tokens=d)}z.push(k)}let E=f.AI_PROVIDERS[b];a.includes("webSearch")&&E?.searchConfig&&z.push({id:`${i}/search`,object:"model",kind:"webSearch",owned_by:i}),a.includes("webFetch")&&E?.fetchConfig&&z.push({id:`${i}/fetch`,object:"model",kind:"webFetch",owned_by:i})}for(let[b,e]of Object.entries(f.AI_PROVIDERS)){if(e?.noAuth!==!0||e?.hidden===!0||y.has(b)||!P(b,a))continue;let g=d.Xg[b]||b,h=((0,f.wG)(b)||g).trim(),i=d.vq[g]||[],j=i.map(a=>a.id);e.modelsFetcher&&(!0===e.passthroughModels||0===j.length)&&!c&&(j=Array.from(new Set([...j,...await U(e.modelsFetcher)])));let k=new Map(i.map(a=>[a.id,M(a)]));for(let b of j){let c=k.get(b)||N(b);if(!a.includes(c)||v(h,b)||v(g,b))continue;let d={id:`${h}/${b}`,object:"model",owned_by:h};if("llm"===c){let a=(0,u.getCapabilitiesForModel)(g,b);a&&(d.capabilities=a),Number.isFinite(a?.contextWindow)&&(d.context_length=a.contextWindow),Number.isFinite(a?.maxOutput)&&(d.max_completion_tokens=a.maxOutput)}z.push(d)}}let A={};try{A=await (0,g.Br)()}catch{console.log("Could not fetch capability overrides")}let C=new Map,D=new Map;for(let[a,b]of y){let c=(b.providerSpecificData?.prefix||(0,f.wG)(a)||a).trim();C.set(c,a),D.set(a,c)}for(let a of z){let b=a.id.indexOf("/");if(b<0)continue;let c=a.id.slice(0,b),d=a.id.slice(b+1),e=C.get(c)||H[c]||c,g=(0,f.wG)(e)||e,h=A[`${c}|${d}`]||A[`${g}|${d}`]||A[`${e}|${d}`];h&&(a.capabilities={...a.capabilities||{},...h},Number.isFinite(h.contextWindow)&&(a.context_length=h.contextWindow),Number.isFinite(h.maxOutput)&&(a.max_completion_tokens=h.maxOutput))}let E=new Map(z.map(a=>[a.id,a]));for(let[a,b]of Object.entries(s||{})){if(!a||"string"!=typeof b)continue;let c=b.indexOf("/"),d=c<0?null:b.slice(0,c),e=H[d]||d,g=c<0?b:`${D.get(e)||(0,f.wG)(e)||e}/${b.slice(c+1)}`,h=E.get(g);h&&z.push({...h,id:a,owned_by:"alias"})}let G=[],I=new Set;for(let a of z)!a?.id||I.has(a.id)||(I.add(a.id),G.push(a));if(a.includes("llm")){let b=new Set;for(let a of h){let c=a.provider,e=d.Xg[c]||c,g=(a?.providerSpecificData?.prefix||(0,f.wG)(c)||e).trim();b.add(g),b.add(e),b.add(c)}for(let c of r){if(!c?.id)continue;let e=(0,d.CP)(c)||"llm",f="imageToText"===e;if(!a.includes(e)&&!f)continue;let g=c.providerAlias;if(!g||b.has(g))continue;let h=String(c.id).trim();if(!h||v(g,h))continue;let i=`${g}/${h}`;if(I.has(i))continue;I.add(i);let j={id:i,object:"model",owned_by:g},k=(0,u.getCapabilitiesForModel)(g,h);k&&(j.capabilities=k),Number.isFinite(k?.contextWindow)&&(j.context_length=k.contextWindow),Number.isFinite(k?.maxOutput)&&(j.max_completion_tokens=k.maxOutput),G.push(j)}if(!c&&h.some(a=>"opencode"===a.provider))for(let a of(await (0,i.Y)())){if(!a?.id)continue;let b=String(a.id).trim();if(!b||v("oc",b))continue;let c=`oc/${b}`;if(I.has(c))continue;I.add(c);let d={id:c,object:"model",owned_by:"oc"},e=(0,u.getCapabilitiesForModel)("oc",b);e&&(d.capabilities=e),Number.isFinite(e?.contextWindow)&&(d.context_length=e.contextWindow),Number.isFinite(e?.maxOutput)&&(d.max_completion_tokens=e.maxOutput),G.push(d)}}let K=b.apiKey,L=K?.allowedModels;return Array.isArray(L)&&0!==L.length?G.filter(a=>L.includes(a.id)):G}let W=new Map;async function X(a,b={}){var c,d;let e=(c=!0===b.skipDynamicFetch,d=b.apiKey?.id,`${c?"internal":"full"}::${d||"public"}::${a.join("|")}`),f=W.get(e);if(!0===b.forceFresh){let c=await V(a,b);return W.set(e,{data:c,builtAt:Date.now()}),c}if(f?.building)return f.data??f.building;if(f&&Date.now()-f.builtAt<3e4)return f.data;let g=V(a,b).then(a=>{let b=W.get(e),c=Array.isArray(b?.data)&&b.data.length>0;return 0===a.length&&c?b.data:(W.set(e,{data:a,builtAt:Date.now()}),a)}).catch(a=>{let b=W.get(e);throw b?.data?W.set(e,{data:b.data,builtAt:b.builtAt}):W.delete(e),a});return(W.set(e,f?{...f,building:g}:{data:null,builtAt:0,building:g}),f)?(g.catch(()=>{}),f.data):g}async function Y(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function Z(a){try{let b=a?.headers?.get(K)==="1",c=await _(a);if(c.error)return Response.json({error:{message:"Invalid API key",type:"authentication_error"}},{status:401,headers:{"Access-Control-Allow-Origin":"*"}});let d=await X(["llm"],{skipDynamicFetch:b,apiKey:c.key}),e=(0,h.Tr)(a),f=e?await (0,k.getApiKeyScopeByKey)(e):null,g=(0,l.C)(d,f),i=await (0,n.j)(await (0,n.TM)(a),g),j=[],m=new Set,o=(a,b)=>{if(!a||m.has(a))return;m.add(a);let c=b.context_length||b.capabilities?.contextWindow||272e3,d=Math.floor(.75*c);j.push({slug:a,id:a,display_name:a,description:b.description||"",context_window:c,max_context_window:c,auto_compact_token_limit:d,visibility:"list",supported_in_api:!0,priority:1,shell_type:"unified_exec",support_verbosity:!0,default_verbosity:"low",apply_patch_tool_type:"freeform",web_search_tool_type:"text_and_image",input_modalities:["text","image"],supports_image_detail_original:!0,truncation_policy:{mode:"tokens",limit:1e4},supports_parallel_tool_calls:!0,tool_mode:"code_mode_only",multi_agent_version:"v1",multi_agent_reasoning_effort:"xhigh",use_responses_lite:!0,supports_reasoning_effort_updates:!0,supports_reasoning_summary_parameter:!0,supports_reasoning_summaries:!0,supports_search_tool:!0,prefer_websockets:!1,default_reasoning_summary:"none",default_reasoning_level:"low",supported_reasoning_levels:[{effort:"low",description:"Fast responses with lighter reasoning"},{effort:"medium",description:"Balances speed and reasoning depth for everyday tasks"},{effort:"high",description:"Greater reasoning depth for complex problems"},{effort:"xhigh",description:"Extra high reasoning depth for complex problems"},{effort:"max",description:"Maximum reasoning depth for the hardest problems"}],experimental_supported_tools:["multi_agent_v1","send_user_message_async","clock"],base_instructions:"You are Codex, a coding agent.",model_messages:{instructions_template:"You are Codex, a coding agent."}})};for(let a of i)o(a.id,a),"string"==typeof a.id&&a.id.includes("/")&&o(a.id.slice(a.id.indexOf("/")+1),a);return Response.json({object:"list",data:i,models:j},{headers:{"Access-Control-Allow-Origin":"*"}})}catch(a){return console.log("Error fetching models:",a),Response.json({error:{message:a.message,type:"server_error"}},{status:500})}}async function $(a){let b=(0,h.Tr)(a);if(!b)return{present:!1,key:null};let c=await (0,g.y7)(b),d=c?.expiresAt&&new Date(c.expiresAt).getTime()<=Date.now();return{present:!0,key:c?.isActive&&!d?c:null}}async function _(a){let b=await (0,g.mt)(),c=await $(a);return b.requireApiKey&&!c.key||c.present&&!c.key?{error:!0}:{key:c.key}}},16655:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(11708)},50287:(a,b,c)=>{c.d(b,{C:()=>e});var d=c(29686);function e(a,b){return b&&Array.isArray(a)?a.filter(a=>(0,d.MH)(b,a?.id)):a}},54402:(a,b,c)=>{c.d(b,{F:()=>e,G:()=>f});var d=c(11708);function e(a,b,c){let d=a.find(a=>b.includes(a.providerAlias)&&a.id===c&&(!a.type||"llm"===a.type));return d?.caps&&"object"==typeof d.caps?d.caps:null}async function f(a,b){try{return e(await (0,d.uv)(),a,b)}catch{return null}}},63825:(a,b,c)=>{c.d(b,{X:()=>j});let d={ai:"AI",claude:"Claude",deepseek:"DeepSeek",gemma:"Gemma",gemini:"Gemini",glm:"GLM",gpt:"GPT",grok:"Grok",hf:"HF",kimi:"Kimi",llama:"Llama",mimo:"MiMo",mistral:"Mistral",mixtral:"Mixtral",moonshot:"Moonshot",nova:"Nova",oss:"OSS",phi:"Phi",qwen:"Qwen",stt:"STT",tts:"TTS",vl:"VL"},e=new Set(["gpt"]),f=/^(19|20)\d{6}$/,g=/^v\d+([.\d]*)$/i,h=/^([A-Za-z]+)(\d[.\d]*)$/,i=a=>a.charAt(0).toUpperCase()+a.slice(1);function j(a,b){let c="string"==typeof a?a.trim():"",j="string"==typeof b?b.trim():"";return c&&j&&j!==c?j:function(a){let b,c,j=-1===(c=(b="string"==typeof a?a.trim():"").lastIndexOf("/"))?b:b.slice(c+1);if(!j)return"";let k=j.split(/[-_\s]+/).filter(Boolean),l=[];for(let a=0;a<k.length;a+=1){let b=k[a];if(f.test(b))continue;let c=b;for(;/^\d+$/.test(c)&&/^\d+$/.test(k[a+1]||"")&&!f.test(k[a+1]);)a+=1,c=`${c}.${k[a]}`;l.push(c)}if(0===l.length)return j;let m="",n=!1;for(let a of l){let b,c=a.toLowerCase(),f=d[c];if(!f){let b=a.match(h),c=b?d[b[1].toLowerCase()]:null;if(c){m=(m?`${m} ${c}`:c)+(e.has(b[1].toLowerCase())?`-${b[2]}`:` ${b[2]}`),n=!1;continue}}b=f||(g.test(a)?i(a):/^\d/.test(a)?a.toUpperCase():i(a));let j=/^\d/.test(a)||g.test(a);m?m+=n&&j?`-${b}`:` ${b}`:m=b,n=!!f&&e.has(c)}return m||j}(c||j)}},72162:(a,b,c)=>{c.d(b,{Kz:()=>d.Kz,gy:()=>d.gy});var d=c(11708)},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))}};
@@ -1 +1 @@
1
- "use strict";exports.id=2414,exports.ids=[2414],exports.modules={2414:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}c.d(b,{exchangeTokens:()=>ah,fetchKiroProfileArn:()=>h}),c(82751),c(25467);var i=c(13073);let j={config:i.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},k={config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=function(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||g(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}};var l=c(55511),m=c.n(l),n=c(25482);let o=null;async function p(){if(o)return o;try{let a=await fetch(n.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return o={authorizeUrl:d(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:d(b.token_endpoint,"token_endpoint")}}}catch{}return o={authorizeUrl:n.oT.authorizeUrl,tokenUrl:n.oT.tokenUrl}}let q={config:n.oT,flowType:"authorization_code_pkce",fixedPort:n.oT.loopbackPort,callbackPath:n.oT.callbackPath,pkceVerifierBytes:n.Ue,prepareConfig:async a=>{let b=await p();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=m().randomBytes(16).toString("hex"),f=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:e,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=e(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}};var r=c(83382);let s={config:i.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":r.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":r.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=e(a.id_token)||g(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,h=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:h,scope:a.scope,email:c||void 0,displayName:f||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}},t="1.0.0",u={config:i.sA,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":t},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":t},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":t},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let e=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||e))throw Error(`Muse Code subscription required${e?`: ${e}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}},v={config:i.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},w={config:i.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c}),signal:AbortSignal.timeout(1e4)});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":i.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,i.cD)(),d={};try{let b=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",f="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){f=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:f,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:d,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},x={config:i.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${i.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})};function y(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),d=await new b(a).initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId,_qoderMachineToken:d.machineToken}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(5345).then(c.bind(c,37726)),h=new g(a),i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderMachineToken:e?._qoderMachineToken||e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",machineToken:a._qoderMachineToken||a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}let z=y(i.hF),A=y(i.t3),B={config:i.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},C={config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,i.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1";(0,i.S6)(f);let g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(a){e={error:"invalid_response",error_description:await h.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=g(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||i.Tx.startUrl}}}},D={config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},E={config:i.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=m().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let g=await f.json(),h=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:g.device_code,user_code:g.user_code,verification_uri:g.verification_uri||h,verification_uri_complete:g.verification_uri_complete||`${h}?user_code=${g.user_code}`,expires_in:g.expires_in,interval:g.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},F={config:i.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},G={config:i.lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},H={config:i.w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},I={config:i.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},J={config:i.Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},K={config:i.DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},L={config:i.Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}};function M(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}async function N(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of i.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),f=M(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(f)return f;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function O(){return[...i.SK.apiOrigins]}async function P(a,b){let c=JSON.stringify({ClientID:i.SK.clientId,RefreshToken:a,ClientSecret:i.SK.clientSecret,UserID:""}),d="no successful response";for(let e of O()){let f=`${e.replace(/\/$/,"")}${i.SK.exchangeTokenPath}`;try{let e,g={Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent};b&&(g["x-cloudide-token"]=b);let h=await fetch(f,{method:"POST",headers:g,body:c}),j=await h.text();if(!h.ok){d=`${f} HTTP ${h.status}`;continue}try{e=JSON.parse(j)}catch{d=`${f} invalid JSON`;continue}let k=M(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=M(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${f} ${a}`;continue}return{accessToken:k,refreshToken:M(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:M(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${f} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function Q(a){for(let b of O()){let c=`${b.replace(/\/$/,"")}${i.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:M(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:M(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:M(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:M(d,[["Result","Region"],["Result","region"],["region"]]),tenant:M(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:M(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let R={config:i.SK,flowType:"authorization_code",callbackPath:i.SK.callbackPath,prepareConfig:async a=>{let b=m().randomUUID(),c=await N(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,f,g={plugin_version:i.SK.defaultPluginVersion,machine_id:m().randomUUID(),device_id:i.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:i.SK.defaultAppVersion,x_app_type:i.SK.defaultAppType},h=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=i.SK.authorizationPath,(f=new URLSearchParams).set("login_version","1"),f.set("auth_from","trae"),f.set("login_channel","native_ide"),f.set("plugin_version",g.plugin_version),f.set("auth_type","local"),f.set("client_id",i.SK.clientId),f.set("redirect","0"),f.set("login_trace_id",h),f.set("auth_callback_url",b),f.set("machine_id",g.machine_id),f.set("device_id",g.device_id),f.set("x_device_id",g.device_id),f.set("x_machine_id",g.machine_id),f.set("x_device_brand",g.x_device_brand),f.set("x_device_type",g.x_device_type),f.set("x_os_version",g.x_os_version),f.set("x_env",g.x_env),f.set("x_app_version",g.x_app_version),f.set("x_app_type",g.x_app_type),e.search=f.toString(),e.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*i.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await P(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await Q(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*i.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},f=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:f,region:e.region||f,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(f||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:i.SK.defaultAppVersion,userRegion:"SG"===f?"SG":"US",userIdentity:"Free"}}}};async function S(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.eD.userAgent},body:JSON.stringify(c)}),f=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${f.slice(0,200)}`);try{return JSON.parse(f)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function T(a){let b=await S(i.eD.registerApiBaseUrl,i.eD.registerPath,{firebase_id_token:a}),c=M(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:M(b,[["apiServerUrl"],["api_server_url"]])||i.eD.defaultApiServerUrl,name:M(b,[["name"]])}}async function U(a,b){try{let c=await S(a,i.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=M(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await S(a,i.eD.currentUserPath,{authToken:d,includeSubscription:!0}),f=e.user||e;return{email:M(f,[["email"]]),name:M(f,[["name"]])}}catch{return{email:null,name:null}}}let V={config:i.eD,flowType:"authorization_code",callbackPath:i.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await T(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),h=await T(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await U(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})};var W=c(33373);let X={config:i.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||i.RY.defaultNativeAppPort,d=(0,W.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,e,f)=>{let{userId:g,encryptedAccessToken:h}=(0,W.Q_)(b);return{accessToken:(0,W.Wc)(h,d),userId:g,systemId:f?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,W.qJ)(b,{config:i.RY})}catch{}let d=(0,W.k9)(b,c);return{userInfo:c,organizationId:d,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})},Y={config:i._0,flowType:"device_code",requestDeviceCode:async a=>{let b=m().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`ZCode OAuth init failed: ${a}`)}let d=await c.json();if(!ab(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let e=d.data;if(!e.flow_id||!e.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:e.flow_id,verification_uri:e.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(e.expires_at)??300,interval:e.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing ZCode poll token — restart the login flow"}};let f=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!f.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${f.status})`}};let g=await f.json();if(!ab(g.code))return{ok:!0,data:{error:"access_denied",error_description:g.msg||"ZCode poll failed"}};let h=g.data||{};if("pending"===h.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===h.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==h.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${h.status}`}};let i=h[a.providerId]||h[h.providerId]||{},j=i.access_token||i.accessToken||h.accessToken||h.access_token;if(!j)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:k,businessToken:l}=await Z(a,j);return{ok:!0,data:{access_token:k,_zcodeJwtToken:h.token||"",_zaiBusinessToken:l,_zaiRefreshToken:i.refresh_token||i.refreshToken||h.refresh_token||h.refreshToken||"",_zcodeUser:h.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}};async function Z(a,b){let c=await $(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>aa(a.organizationName))||b[0],d=c.projects.find(a=>aa(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await _(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,g=await _(f,{headers:d},"api keys")||[],h=Array.isArray(g)?g.find(b=>b?.name===a.planApiKeyName):null;h||(h=await _(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let i=h?.apiKey?.trim();if(!i)throw Error("Z.ai api_keys response is missing apiKey");let j=await _(`${f}/copy/${encodeURIComponent(i)}`,{headers:d},"api key copy"),k=j?.secretKey?.trim();if(!k)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${i}.${k}`,businessToken:c}}async function $(a,b){let c=await _(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function _(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!ab(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function aa(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function ab(a){return null==a||0===a||200===a||"0"===a||"200"===a}let ac=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0,ad=(a,b)=>"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0;async function ae(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{}return c&&"object"==typeof c||(c={error:`invalid_json_response (HTTP ${d.status})`}),{status:d.status,body:c}}function af(a){return{config:{clientId:"mcode-public",scope:"agent.default",audience:"agent-backend",deviceUrl:`${a.account}/oauth2/device/code`,tokenUrl:`${a.account}/oauth2/token`},flowType:"device_code",async requestDeviceCode(a,b){let c,d,e;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:f,body:g}=await ae(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),{userCode:h,deviceCode:i,uri:j}={userCode:ac(g,"user_code"),deviceCode:ac(g,"device_code"),uri:ac(g,"verification_uri_complete")??ac(g,"verification_uri")??ac(g,"verification_url")};if(!h||!j)throw Error(`MiniMax device code response unusable (HTTP ${f})`);let k=!i;return{device_code:i??h,user_code:h,verification_uri:j,expires_in:(c=ad(g,"expires_in"),d=ad(g,"expired_in"),(c||(d?d<1e12?d:Math.max(1,Math.ceil((d-Date.now())/1e3)):void 0))??Math.floor(600)),interval:(e=ad(g,"interval"))?k&&e>=60?Math.round(e/1e3):e:5,_minimaxPollByUser:k}},async pollToken(a,b,c,d){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let e={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...d?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:f}=await ae(a.tokenUrl,e),g=ac(f,"status");return"pending"===g?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===g?{ok:!0,data:{error:"slow_down"}}:"denied"===g||"access_denied"===g?{ok:!0,data:{error:"access_denied"}}:"expired"===g||"expired_token"===g?{ok:!0,data:{error:"expired_token"}}:g?{ok:!0,data:{error:`unexpected_status:${g}`}}:ac(f,"error")?{ok:!0,data:{error:ac(f,"error"),error_description:ac(f,"error_description")}}:ac(f,"access_token")?{ok:!0,data:f}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=ad(a,"expires_in");return{accessToken:ac(a,"access_token"),refreshToken:ac(a,"refresh_token")??"",expiresIn:b??3600}}}}let ag={claude:j,codex:k,xai:q,"grok-cli":s,muse:u,"gemini-cli":v,antigravity:w,iflow:x,qoder:z,"qoder-cn":A,github:B,kiro:C,cursor:D,kimi:E,kilocode:F,cline:G,clinepass:H,gitlab:I,"codebuddy-cn":J,"codebuddy-intl":K,kimchi:L,trae:R,windsurf:V,zed:X,glm:Y,"minimax-code":af({account:"https://account.minimax.cn"}),"minimax-code-global":af({account:"https://account.minimax.io"}),nous:{config:i.Z2,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope})});if(!b.ok){let a=await b.text();throw Error(`Nous device code request failed: ${a}`)}let c=await b.json();return{device_code:c.device_code,user_code:c.user_code,verification_uri:c.verification_uri,verification_uri_complete:c.verification_uri_complete,expires_in:c.expires_in,interval:c.interval}},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text().catch(()=>"")}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch(i.Z2.agentKeyUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a.access_token}`},body:JSON.stringify({min_ttl_seconds:7200})});if(!b.ok){let a=await b.text().catch(()=>"");return console.warn(`[oauth] Nous agent key mint failed (${b.status}): ${a}`),{agentKey:null}}let c=await b.json();return{agentKey:c.api_key||null,agentKeyId:c.key_id||null,agentKeyExpiresAt:c.expires_at||null,agentKeyExpiresIn:c.expires_in||null}}catch(a){return console.warn(`[oauth] Nous agent key mint error: ${a?.message||a}`),{agentKey:null}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,apiKey:b?.agentKey||a.access_token,providerSpecificData:{inferenceBaseUrl:i.Z2.inferenceBaseUrl,...b?.agentKeyId?{agentKeyId:b.agentKeyId}:{},...b?.agentKeyExpiresAt?{agentKeyExpiresAt:b.agentKeyExpiresAt}:{}}})}};async function ah(a,b,c,d,e,f){let g=function(a){let b=ag["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}}};
1
+ "use strict";exports.id=2414,exports.ids=[2414],exports.modules={2414:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}c.d(b,{exchangeTokens:()=>ah,fetchKiroProfileArn:()=>h}),c(39900),c(25467);var i=c(13073);let j={config:i.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},k={config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=function(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||g(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}};var l=c(55511),m=c.n(l),n=c(25482);let o=null;async function p(){if(o)return o;try{let a=await fetch(n.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return o={authorizeUrl:d(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:d(b.token_endpoint,"token_endpoint")}}}catch{}return o={authorizeUrl:n.oT.authorizeUrl,tokenUrl:n.oT.tokenUrl}}let q={config:n.oT,flowType:"authorization_code_pkce",fixedPort:n.oT.loopbackPort,callbackPath:n.oT.callbackPath,pkceVerifierBytes:n.Ue,prepareConfig:async a=>{let b=await p();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=m().randomBytes(16).toString("hex"),f=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:e,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=e(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}};var r=c(83382);let s={config:i.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":r.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":r.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=e(a.id_token)||g(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,h=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:h,scope:a.scope,email:c||void 0,displayName:f||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}},t="1.0.0",u={config:i.sA,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":t},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":t},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":t},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let e=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||e))throw Error(`Muse Code subscription required${e?`: ${e}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}},v={config:i.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},w={config:i.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c}),signal:AbortSignal.timeout(1e4)});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":i.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,i.cD)(),d={};try{let b=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",f="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){f=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:f,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:d,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},x={config:i.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${i.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})};function y(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),d=await new b(a).initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId,_qoderMachineToken:d.machineToken}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(5345).then(c.bind(c,37726)),h=new g(a),i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderMachineToken:e?._qoderMachineToken||e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",machineToken:a._qoderMachineToken||a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}let z=y(i.hF),A=y(i.t3),B={config:i.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},C={config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,i.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1";(0,i.S6)(f);let g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(a){e={error:"invalid_response",error_description:await h.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=g(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||i.Tx.startUrl}}}},D={config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},E={config:i.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=m().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let g=await f.json(),h=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:g.device_code,user_code:g.user_code,verification_uri:g.verification_uri||h,verification_uri_complete:g.verification_uri_complete||`${h}?user_code=${g.user_code}`,expires_in:g.expires_in,interval:g.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},F={config:i.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},G={config:i.lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},H={config:i.w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},I={config:i.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},J={config:i.Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},K={config:i.DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},L={config:i.Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}};function M(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}async function N(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of i.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),f=M(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(f)return f;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function O(){return[...i.SK.apiOrigins]}async function P(a,b){let c=JSON.stringify({ClientID:i.SK.clientId,RefreshToken:a,ClientSecret:i.SK.clientSecret,UserID:""}),d="no successful response";for(let e of O()){let f=`${e.replace(/\/$/,"")}${i.SK.exchangeTokenPath}`;try{let e,g={Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent};b&&(g["x-cloudide-token"]=b);let h=await fetch(f,{method:"POST",headers:g,body:c}),j=await h.text();if(!h.ok){d=`${f} HTTP ${h.status}`;continue}try{e=JSON.parse(j)}catch{d=`${f} invalid JSON`;continue}let k=M(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=M(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${f} ${a}`;continue}return{accessToken:k,refreshToken:M(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:M(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${f} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function Q(a){for(let b of O()){let c=`${b.replace(/\/$/,"")}${i.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:M(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:M(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:M(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:M(d,[["Result","Region"],["Result","region"],["region"]]),tenant:M(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:M(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let R={config:i.SK,flowType:"authorization_code",callbackPath:i.SK.callbackPath,prepareConfig:async a=>{let b=m().randomUUID(),c=await N(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,f,g={plugin_version:i.SK.defaultPluginVersion,machine_id:m().randomUUID(),device_id:i.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:i.SK.defaultAppVersion,x_app_type:i.SK.defaultAppType},h=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=i.SK.authorizationPath,(f=new URLSearchParams).set("login_version","1"),f.set("auth_from","trae"),f.set("login_channel","native_ide"),f.set("plugin_version",g.plugin_version),f.set("auth_type","local"),f.set("client_id",i.SK.clientId),f.set("redirect","0"),f.set("login_trace_id",h),f.set("auth_callback_url",b),f.set("machine_id",g.machine_id),f.set("device_id",g.device_id),f.set("x_device_id",g.device_id),f.set("x_machine_id",g.machine_id),f.set("x_device_brand",g.x_device_brand),f.set("x_device_type",g.x_device_type),f.set("x_os_version",g.x_os_version),f.set("x_env",g.x_env),f.set("x_app_version",g.x_app_version),f.set("x_app_type",g.x_app_type),e.search=f.toString(),e.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*i.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await P(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await Q(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*i.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},f=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:f,region:e.region||f,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(f||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:i.SK.defaultAppVersion,userRegion:"SG"===f?"SG":"US",userIdentity:"Free"}}}};async function S(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.eD.userAgent},body:JSON.stringify(c)}),f=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${f.slice(0,200)}`);try{return JSON.parse(f)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function T(a){let b=await S(i.eD.registerApiBaseUrl,i.eD.registerPath,{firebase_id_token:a}),c=M(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:M(b,[["apiServerUrl"],["api_server_url"]])||i.eD.defaultApiServerUrl,name:M(b,[["name"]])}}async function U(a,b){try{let c=await S(a,i.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=M(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await S(a,i.eD.currentUserPath,{authToken:d,includeSubscription:!0}),f=e.user||e;return{email:M(f,[["email"]]),name:M(f,[["name"]])}}catch{return{email:null,name:null}}}let V={config:i.eD,flowType:"authorization_code",callbackPath:i.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await T(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),h=await T(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await U(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})};var W=c(33373);let X={config:i.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||i.RY.defaultNativeAppPort,d=(0,W.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,e,f)=>{let{userId:g,encryptedAccessToken:h}=(0,W.Q_)(b);return{accessToken:(0,W.Wc)(h,d),userId:g,systemId:f?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,W.qJ)(b,{config:i.RY})}catch{}let d=(0,W.k9)(b,c);return{userInfo:c,organizationId:d,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})},Y={config:i._0,flowType:"device_code",requestDeviceCode:async a=>{let b=m().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`ZCode OAuth init failed: ${a}`)}let d=await c.json();if(!ab(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let e=d.data;if(!e.flow_id||!e.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:e.flow_id,verification_uri:e.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(e.expires_at)??300,interval:e.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing ZCode poll token — restart the login flow"}};let f=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!f.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${f.status})`}};let g=await f.json();if(!ab(g.code))return{ok:!0,data:{error:"access_denied",error_description:g.msg||"ZCode poll failed"}};let h=g.data||{};if("pending"===h.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===h.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==h.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${h.status}`}};let i=h[a.providerId]||h[h.providerId]||{},j=i.access_token||i.accessToken||h.accessToken||h.access_token;if(!j)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:k,businessToken:l}=await Z(a,j);return{ok:!0,data:{access_token:k,_zcodeJwtToken:h.token||"",_zaiBusinessToken:l,_zaiRefreshToken:i.refresh_token||i.refreshToken||h.refresh_token||h.refreshToken||"",_zcodeUser:h.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}};async function Z(a,b){let c=await $(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>aa(a.organizationName))||b[0],d=c.projects.find(a=>aa(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await _(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,g=await _(f,{headers:d},"api keys")||[],h=Array.isArray(g)?g.find(b=>b?.name===a.planApiKeyName):null;h||(h=await _(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let i=h?.apiKey?.trim();if(!i)throw Error("Z.ai api_keys response is missing apiKey");let j=await _(`${f}/copy/${encodeURIComponent(i)}`,{headers:d},"api key copy"),k=j?.secretKey?.trim();if(!k)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${i}.${k}`,businessToken:c}}async function $(a,b){let c=await _(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function _(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!ab(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function aa(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function ab(a){return null==a||0===a||200===a||"0"===a||"200"===a}let ac=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0,ad=(a,b)=>"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0;async function ae(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{}return c&&"object"==typeof c||(c={error:`invalid_json_response (HTTP ${d.status})`}),{status:d.status,body:c}}function af(a){return{config:{clientId:"mcode-public",scope:"agent.default",audience:"agent-backend",deviceUrl:`${a.account}/oauth2/device/code`,tokenUrl:`${a.account}/oauth2/token`},flowType:"device_code",async requestDeviceCode(a,b){let c,d,e;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:f,body:g}=await ae(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),{userCode:h,deviceCode:i,uri:j}={userCode:ac(g,"user_code"),deviceCode:ac(g,"device_code"),uri:ac(g,"verification_uri_complete")??ac(g,"verification_uri")??ac(g,"verification_url")};if(!h||!j)throw Error(`MiniMax device code response unusable (HTTP ${f})`);let k=!i;return{device_code:i??h,user_code:h,verification_uri:j,expires_in:(c=ad(g,"expires_in"),d=ad(g,"expired_in"),(c||(d?d<1e12?d:Math.max(1,Math.ceil((d-Date.now())/1e3)):void 0))??Math.floor(600)),interval:(e=ad(g,"interval"))?k&&e>=60?Math.round(e/1e3):e:5,_minimaxPollByUser:k}},async pollToken(a,b,c,d){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let e={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...d?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:f}=await ae(a.tokenUrl,e),g=ac(f,"status");return"pending"===g?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===g?{ok:!0,data:{error:"slow_down"}}:"denied"===g||"access_denied"===g?{ok:!0,data:{error:"access_denied"}}:"expired"===g||"expired_token"===g?{ok:!0,data:{error:"expired_token"}}:g?{ok:!0,data:{error:`unexpected_status:${g}`}}:ac(f,"error")?{ok:!0,data:{error:ac(f,"error"),error_description:ac(f,"error_description")}}:ac(f,"access_token")?{ok:!0,data:f}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=ad(a,"expires_in");return{accessToken:ac(a,"access_token"),refreshToken:ac(a,"refresh_token")??"",expiresIn:b??3600}}}}let ag={claude:j,codex:k,xai:q,"grok-cli":s,muse:u,"gemini-cli":v,antigravity:w,iflow:x,qoder:z,"qoder-cn":A,github:B,kiro:C,cursor:D,kimi:E,kilocode:F,cline:G,clinepass:H,gitlab:I,"codebuddy-cn":J,"codebuddy-intl":K,kimchi:L,trae:R,windsurf:V,zed:X,glm:Y,"minimax-code":af({account:"https://account.minimax.cn"}),"minimax-code-global":af({account:"https://account.minimax.io"}),nous:{config:i.Z2,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope})});if(!b.ok){let a=await b.text();throw Error(`Nous device code request failed: ${a}`)}let c=await b.json();return{device_code:c.device_code,user_code:c.user_code,verification_uri:c.verification_uri,verification_uri_complete:c.verification_uri_complete,expires_in:c.expires_in,interval:c.interval}},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text().catch(()=>"")}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch(i.Z2.agentKeyUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a.access_token}`},body:JSON.stringify({min_ttl_seconds:7200})});if(!b.ok){let a=await b.text().catch(()=>"");return console.warn(`[oauth] Nous agent key mint failed (${b.status}): ${a}`),{agentKey:null}}let c=await b.json();return{agentKey:c.api_key||null,agentKeyId:c.key_id||null,agentKeyExpiresAt:c.expires_at||null,agentKeyExpiresIn:c.expires_in||null}}catch(a){return console.warn(`[oauth] Nous agent key mint error: ${a?.message||a}`),{agentKey:null}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,apiKey:b?.agentKey||a.access_token,providerSpecificData:{inferenceBaseUrl:i.Z2.inferenceBaseUrl,...b?.agentKeyId?{agentKeyId:b.agentKeyId}:{},...b?.agentKeyExpiresAt?{agentKeyExpiresAt:b.agentKeyExpiresAt}:{}}})}};async function ah(a,b,c,d,e,f){let g=function(a){let b=ag["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}}};