zevairouter 1.1.53 → 1.1.54

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 (640) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +12 -12
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/prerender-manifest.json +7 -7
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +1 -1
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  101. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  102. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +3 -3
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  339. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  353. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  424. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  425. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  426. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  427. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  428. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  429. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  430. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  431. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
  432. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +3 -3
  434. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +3 -3
  435. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +3 -3
  436. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  438. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
  439. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  440. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
  441. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +4 -4
  444. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
  445. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
  446. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  447. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  448. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
  449. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
  450. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
  451. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +3 -3
  454. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +3 -3
  455. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +3 -3
  456. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  458. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
  459. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  460. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
  461. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  462. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  463. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
  464. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
  465. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
  466. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  467. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  468. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  469. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
  470. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  471. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  472. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  473. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +3 -3
  474. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +3 -3
  475. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +3 -3
  476. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  478. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
  479. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
  480. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  481. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  482. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  483. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
  484. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
  485. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
  486. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  487. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
  489. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
  490. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
  491. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  492. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  493. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
  494. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
  495. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
  496. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  497. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
  499. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
  500. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
  501. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  503. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
  504. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  505. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
  506. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  507. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  508. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  509. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
  510. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  511. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  512. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  513. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
  514. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
  515. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
  516. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  517. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  518. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +4 -4
  519. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +4 -4
  520. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +4 -4
  521. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  523. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
  524. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
  525. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
  526. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  527. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  528. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +3 -3
  529. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
  530. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +3 -3
  531. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  533. package/cli/app/.next-cli-build/server/app/dashboard.rsc +3 -3
  534. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
  535. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
  536. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  537. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  538. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  539. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  540. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  541. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  542. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  543. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  544. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  545. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  546. package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
  547. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  548. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  549. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
  550. package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
  551. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  552. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  553. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  554. package/cli/app/.next-cli-build/server/app/login.rsc +3 -3
  555. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  556. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  557. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  558. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  559. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  560. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  561. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  562. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +1 -1
  563. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  564. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  565. package/cli/app/.next-cli-build/server/app-paths-manifest.json +12 -12
  566. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  567. package/cli/app/.next-cli-build/server/chunks/1133.js +1 -1
  568. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  569. package/cli/app/.next-cli-build/server/chunks/2299.js +1 -1
  570. package/cli/app/.next-cli-build/server/chunks/2301.js +1 -1
  571. package/cli/app/.next-cli-build/server/chunks/2409.js +1 -1
  572. package/cli/app/.next-cli-build/server/chunks/2557.js +1 -1
  573. package/cli/app/.next-cli-build/server/chunks/2897.js +1 -1
  574. package/cli/app/.next-cli-build/server/chunks/3263.js +1 -1
  575. package/cli/app/.next-cli-build/server/chunks/3792.js +1 -1
  576. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  577. package/cli/app/.next-cli-build/server/chunks/4315.js +1 -1
  578. package/cli/app/.next-cli-build/server/chunks/4404.js +1 -0
  579. package/cli/app/.next-cli-build/server/chunks/4621.js +5 -5
  580. package/cli/app/.next-cli-build/server/chunks/4632.js +1 -1
  581. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  582. package/cli/app/.next-cli-build/server/chunks/492.js +2 -2
  583. package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
  584. package/cli/app/.next-cli-build/server/chunks/5232.js +1 -0
  585. package/cli/app/.next-cli-build/server/chunks/5330.js +22 -90
  586. package/cli/app/.next-cli-build/server/chunks/5434.js +1 -1
  587. package/cli/app/.next-cli-build/server/chunks/5470.js +43 -0
  588. package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
  589. package/cli/app/.next-cli-build/server/chunks/6492.js +1 -1
  590. package/cli/app/.next-cli-build/server/chunks/6846.js +1 -1
  591. package/cli/app/.next-cli-build/server/chunks/6975.js +1 -1
  592. package/cli/app/.next-cli-build/server/chunks/7170.js +1 -1
  593. package/cli/app/.next-cli-build/server/chunks/7319.js +33 -101
  594. package/cli/app/.next-cli-build/server/chunks/7574.js +1 -1
  595. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  596. package/cli/app/.next-cli-build/server/chunks/8590.js +1 -1
  597. package/cli/app/.next-cli-build/server/chunks/8704.js +1 -1
  598. package/cli/app/.next-cli-build/server/chunks/8895.js +5 -5
  599. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  600. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  601. package/cli/app/.next-cli-build/server/chunks/9835.js +1 -1
  602. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  603. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  604. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  605. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  606. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  607. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  608. package/cli/app/.next-cli-build/static/chunks/{2428-ecbb80abca3fb652.js → 2428-f51bd60da0d68544.js} +9 -9
  609. package/cli/app/.next-cli-build/static/chunks/5497-d65896d0ab5bf79b.js +7 -0
  610. package/cli/app/.next-cli-build/static/chunks/620-5640f47d79090714.js +1 -0
  611. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-1dec996259aec597.js → page-e5ea9dcf77270c43.js} +10 -10
  612. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-15fcbe6c6cdbde8b.js +1 -0
  613. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-f185396ea907ce64.js +1 -0
  614. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-d274fc7161c16f8d.js → page-892a47c5b9e3faa4.js} +2 -2
  615. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-8acdeec3b3492d59.js +1 -0
  616. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d9d614a7882ac4e7.js +1 -0
  617. package/cli/app/CHANGELOG.md +13 -0
  618. package/cli/app/package.json +1 -1
  619. package/cli/app/src/mitm/server.js +36 -35
  620. package/cli/package.json +1 -1
  621. package/package.json +1 -1
  622. package/cli/app/.next-cli-build/server/chunks/1787.js +0 -1
  623. package/cli/app/.next-cli-build/server/chunks/3477.js +0 -1
  624. package/cli/app/.next-cli-build/server/chunks/4897.js +0 -43
  625. package/cli/app/.next-cli-build/static/chunks/5497-74f6311426810796.js +0 -7
  626. package/cli/app/.next-cli-build/static/chunks/620-d467d4dfeb3adbed.js +0 -1
  627. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a4b7b35c87bf288a.js +0 -1
  628. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-c1dd161a602793bf.js +0 -1
  629. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-638bb31d9879c8b8.js +0 -1
  630. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d46069e1e0f9459b.js +0 -1
  631. package/cli/app/public/providers/cartesia.png +0 -0
  632. package/cli/app/public/providers/coqui.png +0 -0
  633. package/cli/app/public/providers/devin-cli.png +0 -0
  634. package/cli/app/public/providers/playht.png +0 -0
  635. package/cli/app/public/providers/tortoise.png +0 -0
  636. package/cli/app/public/providers/trae.png +0 -0
  637. package/cli/app/public/providers/windsurf.png +0 -0
  638. package/cli/app/public/providers/zed.png +0 -0
  639. /package/cli/app/.next-cli-build/static/{pz6DBmmGl1PYVkmEGLEkt → K4Y6sYkr_FeZxe3WAVk77}/_buildManifest.js +0 -0
  640. /package/cli/app/.next-cli-build/static/{pz6DBmmGl1PYVkmEGLEkt → K4Y6sYkr_FeZxe3WAVk77}/_ssgManifest.js +0 -0
@@ -3,7 +3,7 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
3
3
  4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
4
4
  6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
5
5
  XcW+ML9FoCI6AOvOzwIDAQAB
6
- -----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.53","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.4.2","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},53225:(a,b,c)=>{c.d(b,{EV:()=>m,X5:()=>l});var d=c(55511),e=c(39609),f=c(78085),g=c(21031),h=c(30022);let i=new Map,j=new Map;async function k(a,b,c=null){let d,g,i={userId:(g=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:g.machineId||""};if(!i.userId||!i.authToken)return null;let j=String(i.authToken).startsWith("jt-")?`${h.j9}/algo/api/v2/model/list`:h.t6,l={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),j,i)},m=new AbortController,n=null,o=null;try{n=setTimeout(()=>m.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?m.abort(b.reason):(o=()=>m.abort(b.reason),b.addEventListener("abort",o))),d=await (0,e.proxyAwareFetch)(j,{method:"GET",headers:l,signal:m.signal},c)}finally{n&&clearTimeout(n),b&&o&&b.removeEventListener("abort",o)}if(!d.ok)return null;let p=await d.json().catch(()=>null);if(!p||!Array.isArray(p.chat))return null;let q=[],r=new Map;for(let a of p.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(r.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;q.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:q,rawConfigs:r}}async function l(a,b,c={}){let d=await m(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function m(a,b={}){var c;let e,f;try{e=await (0,g.iC)(a,b)}catch(a){return b.log?.warn?.("QODER","PAT exchange failed",{code:a?.code||null,status:a?.status||null}),null}if(!e?.accessToken||!(e.providerSpecificData||{}).userId)return null;let h=(c=e,f=(c?.providerSpecificData||{}).userId||c?.refreshToken||c?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${f}`).digest("hex")),l=Date.now();if(!b.forceRefresh){let a=i.get(h);if(a&&a.expiresAt>l)return a}let n=j.get(h);if(n&&!b.forceRefresh)return n;let o=(async()=>{let a=await k(e,b.signal,b.proxyOptions);if(!a)return null;let c={expiresAt:Date.now()+36e5,models:a.models,rawConfigs:a.rawConfigs,fetched:!0};return i.set(h,c),c})();j.set(h,o);try{return await o}finally{j.get(h)===o&&j.delete(h)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(47293),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
6
+ -----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.54","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.4.2","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},53225:(a,b,c)=>{c.d(b,{EV:()=>m,X5:()=>l});var d=c(55511),e=c(39609),f=c(78085),g=c(21031),h=c(30022);let i=new Map,j=new Map;async function k(a,b,c=null){let d,g,i={userId:(g=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:g.machineId||""};if(!i.userId||!i.authToken)return null;let j=String(i.authToken).startsWith("jt-")?`${h.j9}/algo/api/v2/model/list`:h.t6,l={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),j,i)},m=new AbortController,n=null,o=null;try{n=setTimeout(()=>m.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?m.abort(b.reason):(o=()=>m.abort(b.reason),b.addEventListener("abort",o))),d=await (0,e.proxyAwareFetch)(j,{method:"GET",headers:l,signal:m.signal},c)}finally{n&&clearTimeout(n),b&&o&&b.removeEventListener("abort",o)}if(!d.ok)return null;let p=await d.json().catch(()=>null);if(!p||!Array.isArray(p.chat))return null;let q=[],r=new Map;for(let a of p.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(r.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;q.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:q,rawConfigs:r}}async function l(a,b,c={}){let d=await m(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function m(a,b={}){var c;let e,f;try{e=await (0,g.iC)(a,b)}catch(a){return b.log?.warn?.("QODER","PAT exchange failed",{code:a?.code||null,status:a?.status||null}),null}if(!e?.accessToken||!(e.providerSpecificData||{}).userId)return null;let h=(c=e,f=(c?.providerSpecificData||{}).userId||c?.refreshToken||c?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${f}`).digest("hex")),l=Date.now();if(!b.forceRefresh){let a=i.get(h);if(a&&a.expiresAt>l)return a}let n=j.get(h);if(n&&!b.forceRefresh)return n;let o=(async()=>{let a=await k(e,b.signal,b.proxyOptions);if(!a)return null;let c={expiresAt:Date.now()+36e5,models:a.models,rawConfigs:a.rawConfigs,fetched:!0};return i.set(h,c),c})();j.set(h,o);try{return await o}finally{j.get(h)===o&&j.delete(h)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(47293),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
7
7
  ${l}
8
8
  ${n}
9
9
  ${k.toString("latin1")}
@@ -1 +1 @@
1
- exports.id=8306,exports.ids=[8306],exports.modules={30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,X3:()=>k,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j,vQ:()=>g});var d=c(39006),e=c(75681),f=c(81329);let g={name:"ZevaiRouter",description:"AI Infrastructure Management",version:d.version},h={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},i={maxLines:200,pollIntervalMs:1e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},k={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},38238:(a,b,c)=>{"use strict";c.d(b,{OU:()=>h,PL:()=>i,Yd:()=>g});var d=c(89718),e=c(30869),f=c(54603);function g(a,b){let c="string"==typeof b?b:b?JSON.stringify(b):"";for(let a=0;a<3;a++){let a=c.replace(/^\s*(?:HTTP\s+)?\[?\d{3}\]?\s*:\s*/i,""),b=a;try{let c=JSON.parse(a),d=c?.error?.message||c?.message||c?.error;"string"==typeof d&&d&&(b=d)}catch{}if(b===c)break;c=b}return c=c.trim(),`HTTP ${a}${c?`: ${c.slice(0,240)}`:""}`}async function h(a=null){let b=null;try{let a=await (0,d.PX)(!0);b=a.find(a=>!1!==a.isActive)?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-zevai-cli-token"]=await (0,f.Xj)("zevai-cli-auth"),a&&(c["x-zevai-connection-id"]=a),c}async function i(a,b,c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`,d={}){let f=await h(d.connectionId),j=Date.now();if("embedding"===b){let b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:f,body:JSON.stringify({model:a,input:"test"}),signal:AbortSignal.timeout(15e3)}),d=Date.now()-j,e=await b.text().catch(()=>""),h=null;try{h=e?JSON.parse(e):null}catch{}if(!b.ok){let a=h?.error?.message||h?.error||e;return{ok:!1,latencyMs:d,error:g(b.status,a),status:b.status}}return Array.isArray(h?.data)&&h.data.length>0&&Array.isArray(h.data[0]?.embedding)?{ok:!0,latencyMs:d,error:null,status:b.status}:{ok:!1,latencyMs:d,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:f,body:JSON.stringify({model:a,prompt:"test"}),signal:AbortSignal.timeout(15e3)}),d=Date.now()-j,e=await b.text().catch(()=>""),h=null;try{h=e?JSON.parse(e):null}catch{}if(!b.ok){let a=h?.error?.message||h?.msg||h?.message||h?.error||e;return{ok:!1,latencyMs:d,error:g(b.status,a),status:b.status}}return Array.isArray(h?.data)&&h.data.length>0?{ok:!0,latencyMs:d,error:null,status:b.status}:{ok:!1,latencyMs:d,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,h,i=new FormData,k=(e=new DataView(d=new ArrayBuffer(44+(b=8e3))),(h=(a,b)=>{for(let c=0;c<b.length;c+=1)e.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),e.setUint32(4,36+b,!0),h(8,"WAVE"),h(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,16e3,!0),e.setUint32(28,32e3,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),h(36,"data"),e.setUint32(40,b,!0),new Blob([d],{type:"audio/wav"}));i.append("file",k,"test.wav"),i.append("model",a);let l=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(f).filter(([a])=>"content-type"!==a.toLowerCase())),body:i,signal:AbortSignal.timeout(15e3)}),m=Date.now()-j,n=await l.text().catch(()=>""),o=null;try{o=n?JSON.parse(n):null}catch{}if(!l.ok){let a=o?.error?.message||o?.msg||o?.message||o?.error||n;return{ok:!1,latencyMs:m,error:g(l.status,a),status:l.status}}return("string"==typeof o?.text?o.text:"").trim()?{ok:!0,latencyMs:m,error:null,status:l.status}:{ok:!1,latencyMs:m,status:l.status,error:"Provider returned no transcription text for this model"}}let k=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:f,body:JSON.stringify({model:a,max_tokens:1,stream:!1,messages:[{role:"user",content:"hi"}]}),signal:AbortSignal.timeout(15e3)}),l=Date.now()-j,m=await k.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!k.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:g(k.status,a),status:k.status}}let o=n?.status,p=n?.msg||n?.message;if(null!=o&&"200"!==String(o)&&"0"!==String(o)&&p)return{ok:!1,latencyMs:l,status:k.status,error:`Provider status ${o}: ${String(p).slice(0,240)}`};if(n?.error){let a=n?.error?.message||n?.error||"Provider returned an error";return{ok:!1,latencyMs:l,status:k.status,error:String(a).slice(0,240)}}return Array.isArray(n?.choices)&&n.choices.length>0?{ok:!0,latencyMs:l,error:null,status:k.status}:{ok:!1,latencyMs:l,status:k.status,error:"Provider returned no completion choices for this model"}}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.53","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.4.2","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="zevai-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(83477);new Set(Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,Iu:()=>d.Iu,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,Kg:()=>d.Kg,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,ME:()=>d.ME,Mc:()=>d.Mc,NR:()=>d.NR,Op:()=>d.Op,PX:()=>d.PX,Pb:()=>d.Pb,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,dK:()=>d.dK,deleteModelAlias:()=>d.fv,ek:()=>d.ek,fK:()=>d.fK,getModelAliases:()=>d.OM,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,tV:()=>d.tV,uH:()=>d.uH,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},96487:()=>{}};
1
+ exports.id=8306,exports.ids=[8306],exports.modules={30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,X3:()=>k,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j,vQ:()=>g});var d=c(39006),e=c(75681),f=c(81329);let g={name:"ZevaiRouter",description:"AI Infrastructure Management",version:d.version},h={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},i={maxLines:200,pollIntervalMs:1e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},k={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},38238:(a,b,c)=>{"use strict";c.d(b,{OU:()=>h,PL:()=>i,Yd:()=>g});var d=c(89718),e=c(30869),f=c(54603);function g(a,b){let c="string"==typeof b?b:b?JSON.stringify(b):"";for(let a=0;a<3;a++){let a=c.replace(/^\s*(?:HTTP\s+)?\[?\d{3}\]?\s*:\s*/i,""),b=a;try{let c=JSON.parse(a),d=c?.error?.message||c?.message||c?.error;"string"==typeof d&&d&&(b=d)}catch{}if(b===c)break;c=b}return c=c.trim(),`HTTP ${a}${c?`: ${c.slice(0,240)}`:""}`}async function h(a=null){let b=null;try{let a=await (0,d.PX)(!0);b=a.find(a=>!1!==a.isActive)?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-zevai-cli-token"]=await (0,f.Xj)("zevai-cli-auth"),a&&(c["x-zevai-connection-id"]=a),c}async function i(a,b,c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`,d={}){let f=await h(d.connectionId),j=Date.now();if("embedding"===b){let b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:f,body:JSON.stringify({model:a,input:"test"}),signal:AbortSignal.timeout(15e3)}),d=Date.now()-j,e=await b.text().catch(()=>""),h=null;try{h=e?JSON.parse(e):null}catch{}if(!b.ok){let a=h?.error?.message||h?.error||e;return{ok:!1,latencyMs:d,error:g(b.status,a),status:b.status}}return Array.isArray(h?.data)&&h.data.length>0&&Array.isArray(h.data[0]?.embedding)?{ok:!0,latencyMs:d,error:null,status:b.status}:{ok:!1,latencyMs:d,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:f,body:JSON.stringify({model:a,prompt:"test"}),signal:AbortSignal.timeout(15e3)}),d=Date.now()-j,e=await b.text().catch(()=>""),h=null;try{h=e?JSON.parse(e):null}catch{}if(!b.ok){let a=h?.error?.message||h?.msg||h?.message||h?.error||e;return{ok:!1,latencyMs:d,error:g(b.status,a),status:b.status}}return Array.isArray(h?.data)&&h.data.length>0?{ok:!0,latencyMs:d,error:null,status:b.status}:{ok:!1,latencyMs:d,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,h,i=new FormData,k=(e=new DataView(d=new ArrayBuffer(44+(b=8e3))),(h=(a,b)=>{for(let c=0;c<b.length;c+=1)e.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),e.setUint32(4,36+b,!0),h(8,"WAVE"),h(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,16e3,!0),e.setUint32(28,32e3,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),h(36,"data"),e.setUint32(40,b,!0),new Blob([d],{type:"audio/wav"}));i.append("file",k,"test.wav"),i.append("model",a);let l=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(f).filter(([a])=>"content-type"!==a.toLowerCase())),body:i,signal:AbortSignal.timeout(15e3)}),m=Date.now()-j,n=await l.text().catch(()=>""),o=null;try{o=n?JSON.parse(n):null}catch{}if(!l.ok){let a=o?.error?.message||o?.msg||o?.message||o?.error||n;return{ok:!1,latencyMs:m,error:g(l.status,a),status:l.status}}return("string"==typeof o?.text?o.text:"").trim()?{ok:!0,latencyMs:m,error:null,status:l.status}:{ok:!1,latencyMs:m,status:l.status,error:"Provider returned no transcription text for this model"}}let k=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:f,body:JSON.stringify({model:a,max_tokens:1,stream:!1,messages:[{role:"user",content:"hi"}]}),signal:AbortSignal.timeout(15e3)}),l=Date.now()-j,m=await k.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!k.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:g(k.status,a),status:k.status}}let o=n?.status,p=n?.msg||n?.message;if(null!=o&&"200"!==String(o)&&"0"!==String(o)&&p)return{ok:!1,latencyMs:l,status:k.status,error:`Provider status ${o}: ${String(p).slice(0,240)}`};if(n?.error){let a=n?.error?.message||n?.error||"Provider returned an error";return{ok:!1,latencyMs:l,status:k.status,error:String(a).slice(0,240)}}return Array.isArray(n?.choices)&&n.choices.length>0?{ok:!0,latencyMs:l,error:null,status:k.status}:{ok:!1,latencyMs:l,status:k.status,error:"Provider returned no completion choices for this model"}}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.1.54","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","scripts/gflow-reply-capture.py","scripts/flow-vps-setup.sh","skills/","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","verify:mobile-scroll":"node cli/scripts/verify-dashboard-mobile-scroll.mjs","candidate:build":"node cli/scripts/local-candidate.mjs build","candidate:install":"node cli/scripts/local-candidate.mjs install","candidate:status":"node cli/scripts/local-candidate.mjs status","candidate:rollback":"node cli/scripts/local-candidate.mjs rollback","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"@node-saml/node-saml":"5.1.0","next":"16.4.2","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.12","dompurify":"^3.4.12","ip-address":"^10.4.0","js-yaml":"4.3.2","nanoid":"^3.3.18","postcss":"^8.5.10","sharp":"0.35.5"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch and nanoid use fixed floors directly. Monaco still pins an old DOMPurify; Express, Next, ESLint, and image processing dependencies may resolve vulnerable body-parser, js-yaml, or sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.4.2","express":"^5.2.1","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","minimatch":"file:vendor/minimatch3-secure","monaco-editor":"^0.55.1","node-forge":"^1.4.2","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","typescript":"6.0.3","undici":"^8.10.0","uuid":"^14.0.1","vitest":"4.1.12","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="zevai-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(44404);new Set(Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a));let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,Iu:()=>d.Iu,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,Kg:()=>d.Kg,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,ME:()=>d.ME,Mc:()=>d.Mc,NR:()=>d.NR,Op:()=>d.Op,PX:()=>d.PX,Pb:()=>d.Pb,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,dK:()=>d.dK,deleteModelAlias:()=>d.fv,ek:()=>d.ek,fK:()=>d.fK,getModelAliases:()=>d.OM,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,tV:()=>d.tV,uH:()=>d.uH,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},96487:()=>{}};
@@ -1 +1 @@
1
- "use strict";exports.id=8590,exports.ids=[8590],exports.modules={8590:(a,b,c)=>{c.d(b,{$B:()=>H,I9:()=>u,Og:()=>r,Ql:()=>D,R_:()=>q,Sc:()=>I,jR:()=>G,jT:()=>p,oD:()=>k,pb:()=>K,qZ:()=>L});var d=c(35024),e=c(75924),f=c(39609),g=c(18080),h=c(52060);let i=null;async function j(a,b){return a?o("xai",a,async()=>{try{i||(i=new(await Promise.all([c.e(4897),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await i.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH","xAI OAuth refresh failed",{status:c?.status||null,code:y(c?.code,c?.status),permanent:c?.permanent===!0});let a=String(c?.message||"");if(c?.permanent===!0||a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant",code:y(c?.code||"invalid_grant",c?.status)};return null}},b):null}let k=3e5,l=new Map;function m(){let a=Error("Request aborted");return a.name="AbortError",a}function n(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(m())),c(d))},g=()=>f(d,m());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function o(a,b,c,d,e=null){let f,g;if(e?.aborted)throw m();if(!b)return c();let h=`${a}:${b}`,i=l.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(m()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,m());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw m();if(i.controller.signal.aborted&&f?.name==="AbortError")return o(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),n(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;l.delete(h)}let j={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return l.set(h,j),(async()=>{try{let a=await c(j.controller.signal),b={result:a,expiresAt:Date.now()+1e4};l.set(h,b);let d=setTimeout(()=>{l.get(h)===b&&l.delete(h)},1e4);d.unref?.(),j.settled=!0,f(a)}catch(a){l.get(h)===j&&l.delete(h),j.settled=!0,g(a)}})(),n(j,e)}function p(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function q(a={}){let b=String(a.code||a.error||"refresh_token_rejected").slice(0,120),c=Error("Refresh credential rejected; re-authentication required.");return c.name="RefreshCredentialError",c.code=b,c.permanent=!0,c}function r(a){return e.Wu[a]||k}async function s(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?o(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return z(b,c.status,e,a)}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b){return a?o("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return z(a,c.status,b,"Claude")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function u(a,b,c,d){return a?o(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return z(a,f.status,d,"Google")}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function v(a,b){return a?o("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");return z(a,e.status,b,"Qwen")}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function w(a,b,c="codebuddy"){return a?o(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,i=e.domain||"www.codebuddy.ai",j=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":h.C,"X-Requested-With":"XMLHttpRequest","X-Domain":i,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!j.ok){let a=await j.text().catch(()=>"");return z(a,j.status,b,c)}let k=await j.json(),l=k?.data||k,m=l?.accessToken||l?.access_token;if(!m)return null;return{accessToken:m,refreshToken:l?.refreshToken||l?.refresh_token||a,expiresIn:l?.expiresIn||l?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:null,e=d?.code||d?.type||("string"==typeof c?.error?c.error:"")||c?.error_code||"",f=d?.message||d?.error_description||c?.error_description||c?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=400===b||401===b||["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_refresh_token","invalid_grant"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}function y(a,b){let c="string"==typeof a?a.trim():"";return/^[a-zA-Z0-9_.:-]{1,120}$/.test(c)?c:`HTTP_${Number(b)||0}`}function z(a,b,c,d){let e=x(a,b),f=y(e.code,b);return c?.error?.("TOKEN_REFRESH",`${d} OAuth refresh failed`,{status:b,code:f,permanent:e.permanent}),e.permanent?{error:"unrecoverable_refresh_error",code:f}:null}function A(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3),l=400===b||401===b||j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k);return{status:b,code:f,permanent:l}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function B(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function C(a,b){return a?o("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text();return x(a,c.status).permanent,z(a,c.status,b,"Codex")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function D(a,b,c,e=null,h=null){return a?o("kiro",a,async h=>{let i=b?.authMethod,j=b?.clientId,k=b?.clientSecret,l=b?.region;if("external_idp"===i){let d;try{d=(0,g.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Kiro external IdP refresh rejected: ${a.message}`),null}let i=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body,signal:h},{...e,singleTransportAttempt:!0});if(!i.ok){let a=await i.text();return A(i,a,c,"external IdP")}let j=await i.json();return j?.access_token?{accessToken:j.access_token,refreshToken:j.refresh_token||a,expiresIn:j.expires_in,providerSpecificData:d.providerSpecificData}:B(c,"external IdP")}if(j&&k){let b="idc"===i&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j,clientSecret:k,refreshToken:a,grantType:"refresh_token"}),signal:h},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return A(d,a,c,"AWS")}let g=await d.json();return g?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!g.accessToken,expiresIn:g.expiresIn}),{accessToken:g.accessToken,refreshToken:g.refreshToken||a,expiresIn:g.expiresIn}):B(c,"AWS")}let m=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:h},{...e,singleTransportAttempt:!0});if(!m.ok){let a=await m.text();return A(m,a,c,"social")}let n=await m.json();return n?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn}):B(c,"social")},c,h):null}async function E(a,b){return a?o("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok)return z(await f.text(),f.status,b,"iFlow");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function F(a,b){return a?o("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok)return z(await f.text(),f.status,b,"GitHub");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function G(a,b){return a?o("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok)return await c.body?.cancel?.().catch?.(()=>{}),b?.error?.("TOKEN_REFRESH","Copilot token refresh failed",{status:c.status}),null;let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function H(a,b,c){if(!b.refreshToken&&"vertex"!==a&&"vertex-partner"!==a)return null;switch(a){case"gemini-cli":case"antigravity":return u(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return t(b.refreshToken,c);case"codex":return C(b.refreshToken,c);case"qwen":return v(b.refreshToken,c);case"codebuddy":return w(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return w(b.refreshToken,c,"codebuddy-cn");case"iflow":return E(b.refreshToken,c);case"github":return F(b.refreshToken,c);case"kiro":return D(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return j(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=I(b.apiKey);if(!a)return null;return K(a,c)}default:return s(a,b.refreshToken,b,c)}}function I(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let J=new Map;async function K(a,b){let d=a.client_email,e=J.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return J.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function L(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(p(b))throw q(b);if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},18080:(a,b,c)=>{c.d(b,{Xj:()=>i,uo:()=>j});let d=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function e(a){return"string"==typeof a?a.trim():""}function f(a){let b,c=e(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");if(!d.has(b.hostname.toLowerCase()))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function g(a){return Array.isArray(a)?a.map(e).filter(Boolean).join(" "):e(a)}function h(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;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function i(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=e(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let d=e(b.access_token||b.accessToken),i=e(b.refresh_token||b.refreshToken),j=e(b.client_id||b.clientId),k=f(b.token_endpoint||b.tokenEndpoint),l=e(b.profile_arn||b.profileArn),m=e(b.region)||"us-east-1",n=g(b.scopes||b.scope);if(!d)throw Error("access_token is required");if(!i)throw Error("refresh_token is required");if(!j)throw Error("client_id is required");if(!n)throw Error("scopes is required");if(!l)throw Error("profile_arn is required");let o=h(d),p=b.email||o?.email||o?.preferred_username||o?.upn||o?.sub||null;return{accessToken:d,refreshToken:i,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=h(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:p,providerSpecificData:{profileArn:l,region:m,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:j,tokenEndpoint:k,scope:n}}}function j(a,b={}){let c=e(b.clientId||b.client_id),d=f(b.tokenEndpoint||b.token_endpoint),h=g(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!h)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:h}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:h}}}}};
1
+ "use strict";exports.id=8590,exports.ids=[8590],exports.modules={8590:(a,b,c)=>{c.d(b,{$B:()=>H,I9:()=>u,Og:()=>r,Ql:()=>D,R_:()=>q,Sc:()=>I,jR:()=>G,jT:()=>p,oD:()=>k,pb:()=>K,qZ:()=>L});var d=c(35024),e=c(75924),f=c(39609),g=c(18080),h=c(52060);let i=null;async function j(a,b){return a?o("xai",a,async()=>{try{i||(i=new(await Promise.all([c.e(5470),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await i.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH","xAI OAuth refresh failed",{status:c?.status||null,code:y(c?.code,c?.status),permanent:c?.permanent===!0});let a=String(c?.message||"");if(c?.permanent===!0||a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant",code:y(c?.code||"invalid_grant",c?.status)};return null}},b):null}let k=3e5,l=new Map;function m(){let a=Error("Request aborted");return a.name="AbortError",a}function n(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(m())),c(d))},g=()=>f(d,m());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function o(a,b,c,d,e=null){let f,g;if(e?.aborted)throw m();if(!b)return c();let h=`${a}:${b}`,i=l.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(m()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,m());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw m();if(i.controller.signal.aborted&&f?.name==="AbortError")return o(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),n(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;l.delete(h)}let j={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return l.set(h,j),(async()=>{try{let a=await c(j.controller.signal),b={result:a,expiresAt:Date.now()+1e4};l.set(h,b);let d=setTimeout(()=>{l.get(h)===b&&l.delete(h)},1e4);d.unref?.(),j.settled=!0,f(a)}catch(a){l.get(h)===j&&l.delete(h),j.settled=!0,g(a)}})(),n(j,e)}function p(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function q(a={}){let b=String(a.code||a.error||"refresh_token_rejected").slice(0,120),c=Error("Refresh credential rejected; re-authentication required.");return c.name="RefreshCredentialError",c.code=b,c.permanent=!0,c}function r(a){return e.Wu[a]||k}async function s(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?o(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return z(b,c.status,e,a)}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b){return a?o("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return z(a,c.status,b,"Claude")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function u(a,b,c,d){return a?o(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return z(a,f.status,d,"Google")}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function v(a,b){return a?o("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");return z(a,e.status,b,"Qwen")}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function w(a,b,c="codebuddy"){return a?o(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,i=e.domain||"www.codebuddy.ai",j=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":h.C,"X-Requested-With":"XMLHttpRequest","X-Domain":i,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!j.ok){let a=await j.text().catch(()=>"");return z(a,j.status,b,c)}let k=await j.json(),l=k?.data||k,m=l?.accessToken||l?.access_token;if(!m)return null;return{accessToken:m,refreshToken:l?.refreshToken||l?.refresh_token||a,expiresIn:l?.expiresIn||l?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:null,e=d?.code||d?.type||("string"==typeof c?.error?c.error:"")||c?.error_code||"",f=d?.message||d?.error_description||c?.error_description||c?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=400===b||401===b||["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_refresh_token","invalid_grant"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}function y(a,b){let c="string"==typeof a?a.trim():"";return/^[a-zA-Z0-9_.:-]{1,120}$/.test(c)?c:`HTTP_${Number(b)||0}`}function z(a,b,c,d){let e=x(a,b),f=y(e.code,b);return c?.error?.("TOKEN_REFRESH",`${d} OAuth refresh failed`,{status:b,code:f,permanent:e.permanent}),e.permanent?{error:"unrecoverable_refresh_error",code:f}:null}function A(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3),l=400===b||401===b||j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k);return{status:b,code:f,permanent:l}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function B(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function C(a,b){return a?o("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text();return x(a,c.status).permanent,z(a,c.status,b,"Codex")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function D(a,b,c,e=null,h=null){return a?o("kiro",a,async h=>{let i=b?.authMethod,j=b?.clientId,k=b?.clientSecret,l=b?.region;if("external_idp"===i){let d;try{d=(0,g.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Kiro external IdP refresh rejected: ${a.message}`),null}let i=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body,signal:h},{...e,singleTransportAttempt:!0});if(!i.ok){let a=await i.text();return A(i,a,c,"external IdP")}let j=await i.json();return j?.access_token?{accessToken:j.access_token,refreshToken:j.refresh_token||a,expiresIn:j.expires_in,providerSpecificData:d.providerSpecificData}:B(c,"external IdP")}if(j&&k){let b="idc"===i&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j,clientSecret:k,refreshToken:a,grantType:"refresh_token"}),signal:h},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return A(d,a,c,"AWS")}let g=await d.json();return g?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!g.accessToken,expiresIn:g.expiresIn}),{accessToken:g.accessToken,refreshToken:g.refreshToken||a,expiresIn:g.expiresIn}):B(c,"AWS")}let m=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:h},{...e,singleTransportAttempt:!0});if(!m.ok){let a=await m.text();return A(m,a,c,"social")}let n=await m.json();return n?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn}):B(c,"social")},c,h):null}async function E(a,b){return a?o("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok)return z(await f.text(),f.status,b,"iFlow");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function F(a,b){return a?o("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok)return z(await f.text(),f.status,b,"GitHub");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function G(a,b){return a?o("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok)return await c.body?.cancel?.().catch?.(()=>{}),b?.error?.("TOKEN_REFRESH","Copilot token refresh failed",{status:c.status}),null;let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function H(a,b,c){if(!b.refreshToken&&"vertex"!==a&&"vertex-partner"!==a)return null;switch(a){case"gemini-cli":case"antigravity":return u(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return t(b.refreshToken,c);case"codex":return C(b.refreshToken,c);case"qwen":return v(b.refreshToken,c);case"codebuddy":return w(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return w(b.refreshToken,c,"codebuddy-cn");case"iflow":return E(b.refreshToken,c);case"github":return F(b.refreshToken,c);case"kiro":return D(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return j(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=I(b.apiKey);if(!a)return null;return K(a,c)}default:return s(a,b.refreshToken,b,c)}}function I(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let J=new Map;async function K(a,b){let d=a.client_email,e=J.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return J.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function L(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(p(b))throw q(b);if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},18080:(a,b,c)=>{c.d(b,{Xj:()=>i,uo:()=>j});let d=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function e(a){return"string"==typeof a?a.trim():""}function f(a){let b,c=e(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");if(!d.has(b.hostname.toLowerCase()))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function g(a){return Array.isArray(a)?a.map(e).filter(Boolean).join(" "):e(a)}function h(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;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function i(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=e(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let d=e(b.access_token||b.accessToken),i=e(b.refresh_token||b.refreshToken),j=e(b.client_id||b.clientId),k=f(b.token_endpoint||b.tokenEndpoint),l=e(b.profile_arn||b.profileArn),m=e(b.region)||"us-east-1",n=g(b.scopes||b.scope);if(!d)throw Error("access_token is required");if(!i)throw Error("refresh_token is required");if(!j)throw Error("client_id is required");if(!n)throw Error("scopes is required");if(!l)throw Error("profile_arn is required");let o=h(d),p=b.email||o?.email||o?.preferred_username||o?.upn||o?.sub||null;return{accessToken:d,refreshToken:i,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=h(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:p,providerSpecificData:{profileArn:l,region:m,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:j,tokenEndpoint:k,scope:n}}}function j(a,b={}){let c=e(b.clientId||b.client_id),d=f(b.tokenEndpoint||b.token_endpoint),h=g(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!h)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:h}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:h}}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8704,exports.ids=[1998,8704],exports.modules={3359:(a,b,c)=>{c.d(b,{K0:()=>j,Oh:()=>n,c9:()=>q,lL:()=>r,s9:()=>i});var d=c(89718),e=c(83477);let f="gpt-5.6";function g(a){return String(a||"").trim().replace(/^\/+|\/+$/g,"")}function h(a){let b;return`cx/${(b=g(a)).startsWith("cx/")?b.slice(3):b.startsWith("codex/")?b.slice(6):b||f}`}function i(a){let b=g(a);if(!b)return null;if("auto-codex"===b)return{mode:"router",modelString:`cx/${f}`,strictAccount:!1,label:"Auto Codex"};if(b.startsWith("router/")){let a;return{mode:"router",modelString:(a=g(b.slice(7))||f).includes("/")?a:`cx/${a}`,strictAccount:!1,label:"Router Pool"}}if(b.startsWith("original/"))return{mode:"original",modelString:h(b.slice(9)),strictAccount:!0,label:"Original Codex"};if("original"===b)return{mode:"original",modelString:`cx/${f}`,strictAccount:!0,label:"Original Codex"};let c=b.startsWith("account/")?"account/":b.startsWith("codex-account/")?"codex-account/":null;if(c){let a=b.slice(c.length),d=a.indexOf("/"),e=-1===d?a:a.slice(0,d),g=-1===d?f:a.slice(d+1);return e?{mode:"account",accountRef:e,modelString:h(g),strictAccount:!0,label:"Pinned Codex Account"}:null}return null}function j(a){return a?.displayName||a?.name||a?.email||a?.id||"Codex account"}function k(a){let b=String(j(a)).toLowerCase().replace(/@/g,"-").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"account";return`${b}-${String(a?.id||"").slice(0,8)}`}function l(a){return String(a||"").trim().toLowerCase()}function m(a){let b=a?.providerSpecificData||{};return"GPTJson"===b.importedFrom||String(b.tokenSource||"").startsWith("ChatGPT_team")}async function n(a=5e3){let b=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),c=b.slice(0,a).map(a=>({id:a.id,slug:k(a),label:j(a),email:a.email||null,imported:m(a),priority:a.priority||null})),e=o(b);return{accounts:c,original:e?{id:e.id,slug:k(e),label:j(e),email:e.email||null,imported:m(e),priority:e.priority||null}:null}}function o(a){return Array.isArray(a)&&0!==a.length?a.find(a=>!m(a))||a[0]:null}async function p(a){let b=l(a);if(!b)return null;let c=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),e=c.find(a=>l(a.id)===b||k(a)===b||l(a.email)===b||l(a.name)===b||l(a.displayName)===b);if(e)return e;let f=c.filter(a=>l(a.id).startsWith(b)||k(a).startsWith(b));return 1===f.length?f[0]:null}async function q(a){if(!a||"original"!==a.mode&&"account"!==a.mode)return null;if("account"===a.mode)return p(a.accountRef);let b=await (0,d.mt)(),c=b.codexGatewayOriginalConnectionId||b.codexOriginalConnectionId||"";if(c){let a=await p(c);if(a)return a}return o(await (0,d.getProviderConnections)({provider:"codex",isActive:!0}))}function r(a=[]){if(!a.some(a=>"codex"===a.provider&&!1!==a.isActive))return[];let b=[{id:"auto-codex",object:"model",owned_by:"zevai-codex-gateway"},...(e.vq.cx||[]).filter(a=>!a.type||"llm"===a.type).map(a=>a.id).flatMap(a=>[{id:`router/${a}`,object:"model",owned_by:"zevai-codex-gateway"},{id:`original/${a}`,object:"model",owned_by:"zevai-codex-gateway"}])];for(let c of a.filter(a=>"codex"===a.provider&&!1!==a.isActive))b.push({id:`account/${k(c)}`,object:"model",owned_by:"zevai-codex-account"});return b}},15626:(a,b,c)=>{c.d(b,{buildClineHeaders:()=>f,resolveClineCredential:()=>e});let d=c(39006).version||"0.0.0";function e(a){let b="string"==typeof a?.apiKey?a.apiKey.trim():"";return b?{token:b,isApiKey:!0}:{token:a?.accessToken,isApiKey:!1}}function f(a,b={},c={}){let e=function(a,b={}){let c=function(a,{isApiKey:b=!1}={}){if("string"!=typeof a)return"";let c=a.trim();return c?b||c.startsWith("workos:")?c:`workos:${c}`:""}(a,b);return c?`Bearer ${c}`:""}(a,c),g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`ZevaiRouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"zevairouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return e&&(g.Authorization=e),g}},16655:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(93999)},29240:(a,b,c)=>{function d(a){let b="string"==typeof a?a.trim():"";return b.startsWith("models/")?b.slice(7):b}function e(a){let b=a?.headers?.get?.("Authorization");return b?.startsWith("Bearer ")?b.slice(7):a?.headers?.get?.("x-api-key")||null}function f(a,b){if(!b)return!0;if(!0!==b.active)return!1;let c=Array.isArray(b.allowedModels)?b.allowedModels:[];if(0===c.length)return!0;let e=d(a);return c.some(a=>d(a)===e)}function g(a,b,c=new Map){if(!b)return[...a];let e=new Set(Array.isArray(b.allowedConnectionIds)?b.allowedConnectionIds:[]);return a.filter(a=>!!f(a?.id,b)&&(0===e.size||(c.get(d(a?.id))||c.get(a?.id)||[]).some(a=>e.has(a))))}c.d(b,{Dw:()=>g,GJ:()=>f,MZ:()=>e})},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);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}},52060:(a,b,c)=>{c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},84780:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>J,OPTIONS:()=>I,buildModelsList:()=>H});var d=c(81329),e=c(75681),f=c(89718),g=c(16655);let h=new Set(["gemini-3-flash"]);var i=c(15929),j=c(29679),k=c(53225),l=c(52007),m=c(28948),n=c(84534),o=c(9760),p=c(3359),q=c(39326),r=c(66306),s=c(29240),t=c(12557),u=c(15626);let v={kiro:async(a,b={})=>{let c=await (0,j.cW)({connectionId:a.id,accessToken:a.accessToken,refreshToken:a.refreshToken,isActive:a.isActive,quarantinedAt:a.quarantinedAt,providerSpecificData:a.providerSpecificData||{}},{log:console,signal:b.signal,onCredentialsRefreshed:async b=>{if(!b?.accessToken)return;let c={accessToken:b.accessToken,lastRefreshAt:new Date().toISOString()};b.refreshToken&&(c.refreshToken=b.refreshToken);let d=Number(b.expiresIn);if(Number.isFinite(d)&&d>0&&(c.expiresIn=d,c.expiresAt=new Date(Date.now()+1e3*d).toISOString()),!await (0,f.updateProviderConnection)(a.id,c))throw Error("Kiro connection disappeared during token refresh");Object.assign(a,c)}});return c?{models:Array.isArray(c.models)?c.models:[]}:null},qoder:async a=>{let b=await (0,q.B)(a.providerSpecificData),c=await (0,k.EV)({apiKey:a.apiKey,accessToken:a.accessToken,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}},{proxyOptions:b});return c?.models?.length?{models:c.models.map(a=>({id:a.id,name:a.name}))}:null},kimchi:async a=>{let b=await (0,l.av)({accessToken:a.accessToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},clinepass:async a=>{let b=await (0,m.P)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},cline:async a=>{let{token:b,isApiKey:d}=(0,u.resolveClineCredential)(a);if(!b)return null;try{let{buildClineHeaders:a}=await Promise.resolve().then(c.bind(c,15626)),e=await fetch("https://api.cline.bot/api/v1/models",{headers:a(b,{Accept:"application/json"},{isApiKey:d})});if(!e.ok)return null;let f=await e.json(),g=Array.isArray(f)?f:f?.data;if(!Array.isArray(g)||0===g.length)return null;let h=g.filter(a=>"string"==typeof a?.id).map(a=>({id:a.id,name:a.name||a.id}));return h.length?{models:h}:null}catch{return null}},github:async a=>{let b=await (0,n.v)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},blackbox:async a=>(0,o.x0)({apiKey:a.apiKey,accessToken:a.accessToken}),codebuddy:async()=>(0,i.A3)("codebuddy",{log:console}),"codebuddy-cn":async()=>(0,i.A3)("codebuddy-cn",{log:console})},w=/[-_][0-9a-f]{8,}$/i,x=0,y={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText",video:"video",music:"music"};function z(a){return a?.type&&y[a.type]||"llm"}function A(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/video|sora|veo|kling/.test(b)?"video":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}async function B(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,e.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,e.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 f;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),e=await fetch(c,{method:"GET",headers:d,cache:"no-store",signal:a.signal});if(clearTimeout(b),!e.ok)return[];let g=(f=await e.json(),Array.isArray(f)?f:f?.data||f?.models||f?.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 C(a,b){let c=e.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}function D(a){let b=e.AI_PROVIDERS[a];return b?.noAuth===!0&&b?.hidden===!0}function E(a,b,c,d,e){if("string"!=typeof a)return"";let f=a.trim();for(let a of new Set([b?.providerSpecificData?.prefix,c,d,e].filter(a=>"string"==typeof a&&""!==a.trim()))){let b=`${a.trim()}/`;if(f.startsWith(b))return f.slice(b.length)}return f}function F(a,b,c,d){if("string"!=typeof a)return"";let e=a.trim();for(let a of new Set([b?.providerSpecificData?.prefix,c,d,"kiro"].filter(a=>"string"==typeof a&&""!==a.trim()))){let b=`${a.trim()}/`;if(e.startsWith(b))return e.slice(b.length)}return e}async function G(a,b,c){let d=new Set,e=new Map,f=[];for(let e of a){let a=function(a){let b=a?.providerSpecificData?.enabledModels;return Array.isArray(b)?b.filter(a=>"string"==typeof a&&""!==a.trim()):[]}(e);if(a.length>0)for(let f of a){let a=F(f,e,b,c);a&&d.add(a)}else f.push(e)}let g=new Map([...f.filter(a=>(0,j.G9)(a.id)),...function(a){if(0===a.length)return[];let b=[],c=0,d=x%a.length;for(;c<a.length&&b.length<4;){let e=a[d];(0,j.G9)(e.id)||b.push(e),d=(d+1)%a.length,c+=1}return x=d,b}(f)].map(a=>[a.id,a]));if(0===g.size)return{modelIds:[...d],metadataById:e};let h=new AbortController,i=setTimeout(()=>h.abort("Kiro catalog discovery timed out"),5e3);i.unref?.();try{for(let a of(await Promise.all([...g.values()].map(async a=>{try{return await v.kiro(a,{signal:h.signal})}catch(a){return console.log(`Live model fetch failed for kiro: ${a?.message||a}`),null}}))))for(let f of Array.isArray(a?.models)?a.models:[]){let a=F(f?.id,null,b,c);a&&(d.add(a),e.has(a)||e.set(a,{contextLength:f.contextLength,maxOutputTokens:f.maxOutputTokens,...Array.isArray(f.inputTypes)?{modalities:{input:f.inputTypes}}:{}}))}}finally{clearTimeout(i)}return{modelIds:[...d],metadataById:e}}async function H(a,{apiKey:b=null,policy:c}={}){let k=void 0===c&&b?await (0,f.uH)(b):c||null;if(k&&!0!==k.active)return[];let l=[],m=!1;try{if(l=await (0,f.getProviderConnections)(),m=!0,l=l.filter(a=>!1!==a.isActive&&!a.quarantinedAt),k?.allowedConnectionIds?.length){let a=new Set(k.allowedConnectionIds);l=l.filter(b=>a.has(b.id))}}catch(a){console.log("Could not fetch providers, returning all models")}let n=[];try{n=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let o=[];try{o=await (0,f.uv)()}catch(a){console.log("Could not fetch custom models")}let q={};try{q=await (0,f.getModelAliases)()}catch(a){console.log("Could not fetch model aliases")}let u={};try{u=await (0,g.vF)()}catch(a){console.log("Could not fetch disabled models")}let x=(a,b)=>Array.isArray(u[a])&&u[a].includes(b),y=new Map;for(let a of l){let b=y.get(a.provider)||[];b.push(a),y.set(a.provider,b)}let F=[];for(let b of n){if(!function(a,b){let c=a?.kind||"llm";return b.includes(c)}(b,a))continue;let c={id:b.name,object:"model",owned_by:"combo"};("webSearch"===b.kind||"webFetch"===b.kind)&&(c.kind=b.kind),F.push(c)}if(0===l.length){let b=Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a]));for(let[c,f]of Object.entries(d.vq)){let d=b[c]||c;if(!("kiro"===d||m&&e.AI_PROVIDERS[d]?.noAuth!==!0||D(d))&&C(d,a))for(let b of f)a.includes(z(b))&&(x(c,b.id)||F.push({id:`${c}/${b.id}`,object:"model",owned_by:c}))}for(let b of m?[]:o){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&&F.push({id:`${c}/${d}`,object:"model",owned_by:c})}}else for(let[b,c]of y.entries()){let f;if(!C(b,a))continue;let g=c[0],k=d.Xg[b]||b,l=(g?.providerSpecificData?.prefix||(0,e.wG)(b)||k).trim(),m=d.vq[k]||[],n=g?.providerSpecificData?.enabledModels,p=Array.isArray(n)&&n.length>0,s=(0,e.mq)(b)||(0,e.gb)(b),u=new Map(m.map(a=>[a.id,z(a)])),y=new Map(m.map(a=>[a.id,a])),D=null;if("kiro"===b){let a=await G(c,l,k);f=(0,j.nf)(a.modelIds),D=a.metadataById}else f=p?Array.from(new Set(n.filter(a=>"string"==typeof a&&""!==a.trim()))):m.map(a=>a.id);s&&0===f.length&&!w.test(b)&&(f=await B(g));let H=v[b];if(H&&"kiro"!==b&&!p)try{let a=await H(g);a?.models?.length&&(f=a.models.map(a=>a.id))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}for(let d of Array.from(new Set([...f.map(a=>E(a,g,l,k,b)).filter(a=>"string"==typeof a&&""!==a.trim()),..."kiro"===b?[]:c.map(a=>E(a.defaultModel,a,l,k,b)).filter(a=>""!==a),..."kiro"===b?[]:o.filter(a=>{if(!a?.id||a.type&&"llm"!==a.type)return!1;let c=a.providerAlias;return c===k||c===l||c===b}).map(a=>String(a.id).trim()).filter(a=>""!==a),..."kiro"===b?[]:Object.values(q||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${l}/`)||a.startsWith(`${k}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${l}/`)?a.slice(l.length+1):a.startsWith(`${k}/`)?a.slice(k.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let e=u.get(d)||A(d);if(!a.includes(e)||x(l,d)||x(k,d)||c.every(a=>(0,t.FK)(a,d,b)))continue;let f={id:`${l}/${d}`,object:"model",owned_by:l},g=D?.get(d)||null,m=(0,r.a0)(e)||("llm"===e?(0,r.nl)(b,d,g):null);if(m&&(f.capabilities=m),"llm"===e){let a=m?.contextWindow,c=m?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(c)){let e=(0,r.nl)(b,d,g);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(c)||(c=e.maxOutput)}Number.isFinite(a)&&(f.context_length=a),Number.isFinite(c)&&(f.max_completion_tokens=c)}if("kiro"===b){let a=(0,j.AX)(d);a&&Object.assign(f,a)}if(("codebuddy"===b||"codebuddy-cn"===b)&&"llm"===e&&Object.assign(f,(0,i.wu)()),"antigravity"===b&&"llm"===e&&y.get(d)?.thinking!==!1){let a=function(a){if("string"!=typeof a||!a.trim())return null;let b=a.trim();return h.has(b)||/image/i.test(b)?null:{supported_reasoning_levels:["none","low","medium","high","xhigh","max"],default_reasoning_level:"high"}}(d);a&&Object.assign(f,a)}F.push(f)}let I=e.AI_PROVIDERS[b],J=[];if(a.includes("tts")&&Array.isArray(I?.ttsConfig?.models))for(let a of I.ttsConfig.models)a?.id&&J.push(a.id);if(a.includes("embedding")&&Array.isArray(I?.embeddingConfig?.models))for(let a of I.embeddingConfig.models)a?.id&&J.push(a.id);for(let a of J)x(l,a)||x(k,a)||F.push({id:`${l}/${a}`,object:"model",owned_by:l});a.includes("webSearch")&&I?.searchConfig&&F.push({id:`${l}/search`,object:"model",kind:"webSearch",owned_by:l}),a.includes("webFetch")&&I?.fetchConfig&&F.push({id:`${l}/fetch`,object:"model",kind:"webFetch",owned_by:l})}for(let[b,c]of Object.entries(e.AI_PROVIDERS)){if(c?.noAuth!==!0||D(b)||!C(b,a))continue;let f=d.Xg[b]||b,g=((0,e.wG)(b)||f).trim(),h=d.vq[f]||[],i=new Map(h.map(a=>[a.id,z(a)]));for(let c of h){let d=c.id,e=i.get(d)||A(d);if(!a.includes(e)||x(g,d)||x(f,d))continue;let h={id:`${g}/${d}`,object:"model",owned_by:g},j=(0,r.a0)(e)||("llm"===e?(0,r.nl)(b,d):null);if(j&&(h.capabilities=j),"llm"===e){let a=j?.contextWindow,c=j?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(c)){let e=(0,r.nl)(b,d);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(c)||(c=e.maxOutput)}Number.isFinite(a)&&(h.context_length=a),Number.isFinite(c)&&(h.max_completion_tokens=c)}F.push(h)}}a.includes("llm")&&F.push(...(0,p.lL)(l));let I=[],J=new Set;for(let a of F)!a?.id||J.has(a.id)||(J.add(a.id),I.push(a));return(0,s.Dw)(I,k?{...k,allowedConnectionIds:[]}:null)}async function I(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function J(a){try{let b=await H(["llm"],{apiKey:(0,s.MZ)(a)});return Response.json({object:"list",data:b},{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})}}}};
1
+ "use strict";exports.id=8704,exports.ids=[1998,8704],exports.modules={3359:(a,b,c)=>{c.d(b,{K0:()=>j,Oh:()=>n,c9:()=>q,lL:()=>r,s9:()=>i});var d=c(89718),e=c(44404);let f="gpt-5.6";function g(a){return String(a||"").trim().replace(/^\/+|\/+$/g,"")}function h(a){let b;return`cx/${(b=g(a)).startsWith("cx/")?b.slice(3):b.startsWith("codex/")?b.slice(6):b||f}`}function i(a){let b=g(a);if(!b)return null;if("auto-codex"===b)return{mode:"router",modelString:`cx/${f}`,strictAccount:!1,label:"Auto Codex"};if(b.startsWith("router/")){let a;return{mode:"router",modelString:(a=g(b.slice(7))||f).includes("/")?a:`cx/${a}`,strictAccount:!1,label:"Router Pool"}}if(b.startsWith("original/"))return{mode:"original",modelString:h(b.slice(9)),strictAccount:!0,label:"Original Codex"};if("original"===b)return{mode:"original",modelString:`cx/${f}`,strictAccount:!0,label:"Original Codex"};let c=b.startsWith("account/")?"account/":b.startsWith("codex-account/")?"codex-account/":null;if(c){let a=b.slice(c.length),d=a.indexOf("/"),e=-1===d?a:a.slice(0,d),g=-1===d?f:a.slice(d+1);return e?{mode:"account",accountRef:e,modelString:h(g),strictAccount:!0,label:"Pinned Codex Account"}:null}return null}function j(a){return a?.displayName||a?.name||a?.email||a?.id||"Codex account"}function k(a){let b=String(j(a)).toLowerCase().replace(/@/g,"-").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"account";return`${b}-${String(a?.id||"").slice(0,8)}`}function l(a){return String(a||"").trim().toLowerCase()}function m(a){let b=a?.providerSpecificData||{};return"GPTJson"===b.importedFrom||String(b.tokenSource||"").startsWith("ChatGPT_team")}async function n(a=5e3){let b=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),c=b.slice(0,a).map(a=>({id:a.id,slug:k(a),label:j(a),email:a.email||null,imported:m(a),priority:a.priority||null})),e=o(b);return{accounts:c,original:e?{id:e.id,slug:k(e),label:j(e),email:e.email||null,imported:m(e),priority:e.priority||null}:null}}function o(a){return Array.isArray(a)&&0!==a.length?a.find(a=>!m(a))||a[0]:null}async function p(a){let b=l(a);if(!b)return null;let c=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),e=c.find(a=>l(a.id)===b||k(a)===b||l(a.email)===b||l(a.name)===b||l(a.displayName)===b);if(e)return e;let f=c.filter(a=>l(a.id).startsWith(b)||k(a).startsWith(b));return 1===f.length?f[0]:null}async function q(a){if(!a||"original"!==a.mode&&"account"!==a.mode)return null;if("account"===a.mode)return p(a.accountRef);let b=await (0,d.mt)(),c=b.codexGatewayOriginalConnectionId||b.codexOriginalConnectionId||"";if(c){let a=await p(c);if(a)return a}return o(await (0,d.getProviderConnections)({provider:"codex",isActive:!0}))}function r(a=[]){if(!a.some(a=>"codex"===a.provider&&!1!==a.isActive))return[];let b=[{id:"auto-codex",object:"model",owned_by:"zevai-codex-gateway"},...(e.vq.cx||[]).filter(a=>!a.type||"llm"===a.type).map(a=>a.id).flatMap(a=>[{id:`router/${a}`,object:"model",owned_by:"zevai-codex-gateway"},{id:`original/${a}`,object:"model",owned_by:"zevai-codex-gateway"}])];for(let c of a.filter(a=>"codex"===a.provider&&!1!==a.isActive))b.push({id:`account/${k(c)}`,object:"model",owned_by:"zevai-codex-account"});return b}},15626:(a,b,c)=>{c.d(b,{buildClineHeaders:()=>f,resolveClineCredential:()=>e});let d=c(39006).version||"0.0.0";function e(a){let b="string"==typeof a?.apiKey?a.apiKey.trim():"";return b?{token:b,isApiKey:!0}:{token:a?.accessToken,isApiKey:!1}}function f(a,b={},c={}){let e=function(a,b={}){let c=function(a,{isApiKey:b=!1}={}){if("string"!=typeof a)return"";let c=a.trim();return c?b||c.startsWith("workos:")?c:`workos:${c}`:""}(a,b);return c?`Bearer ${c}`:""}(a,c),g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`ZevaiRouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"zevairouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return e&&(g.Authorization=e),g}},16655:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(93999)},29240:(a,b,c)=>{function d(a){let b="string"==typeof a?a.trim():"";return b.startsWith("models/")?b.slice(7):b}function e(a){let b=a?.headers?.get?.("Authorization");return b?.startsWith("Bearer ")?b.slice(7):a?.headers?.get?.("x-api-key")||null}function f(a,b){if(!b)return!0;if(!0!==b.active)return!1;let c=Array.isArray(b.allowedModels)?b.allowedModels:[];if(0===c.length)return!0;let e=d(a);return c.some(a=>d(a)===e)}function g(a,b,c=new Map){if(!b)return[...a];let e=new Set(Array.isArray(b.allowedConnectionIds)?b.allowedConnectionIds:[]);return a.filter(a=>!!f(a?.id,b)&&(0===e.size||(c.get(d(a?.id))||c.get(a?.id)||[]).some(a=>e.has(a))))}c.d(b,{Dw:()=>g,GJ:()=>f,MZ:()=>e})},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);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}},52060:(a,b,c)=>{c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},84780:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>J,OPTIONS:()=>I,buildModelsList:()=>H});var d=c(81329),e=c(75681),f=c(89718),g=c(16655);let h=new Set(["gemini-3-flash"]);var i=c(15929),j=c(29679),k=c(53225),l=c(52007),m=c(28948),n=c(84534),o=c(9760),p=c(3359),q=c(39326),r=c(66306),s=c(29240),t=c(12557),u=c(15626);let v={kiro:async(a,b={})=>{let c=await (0,j.cW)({connectionId:a.id,accessToken:a.accessToken,refreshToken:a.refreshToken,isActive:a.isActive,quarantinedAt:a.quarantinedAt,providerSpecificData:a.providerSpecificData||{}},{log:console,signal:b.signal,onCredentialsRefreshed:async b=>{if(!b?.accessToken)return;let c={accessToken:b.accessToken,lastRefreshAt:new Date().toISOString()};b.refreshToken&&(c.refreshToken=b.refreshToken);let d=Number(b.expiresIn);if(Number.isFinite(d)&&d>0&&(c.expiresIn=d,c.expiresAt=new Date(Date.now()+1e3*d).toISOString()),!await (0,f.updateProviderConnection)(a.id,c))throw Error("Kiro connection disappeared during token refresh");Object.assign(a,c)}});return c?{models:Array.isArray(c.models)?c.models:[]}:null},qoder:async a=>{let b=await (0,q.B)(a.providerSpecificData),c=await (0,k.EV)({apiKey:a.apiKey,accessToken:a.accessToken,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}},{proxyOptions:b});return c?.models?.length?{models:c.models.map(a=>({id:a.id,name:a.name}))}:null},kimchi:async a=>{let b=await (0,l.av)({accessToken:a.accessToken,apiKey:a.apiKey,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},clinepass:async a=>{let b=await (0,m.P)({accessToken:a.accessToken,apiKey:a.apiKey});return b?.models?.length?{models:b.models}:null},cline:async a=>{let{token:b,isApiKey:d}=(0,u.resolveClineCredential)(a);if(!b)return null;try{let{buildClineHeaders:a}=await Promise.resolve().then(c.bind(c,15626)),e=await fetch("https://api.cline.bot/api/v1/models",{headers:a(b,{Accept:"application/json"},{isApiKey:d})});if(!e.ok)return null;let f=await e.json(),g=Array.isArray(f)?f:f?.data;if(!Array.isArray(g)||0===g.length)return null;let h=g.filter(a=>"string"==typeof a?.id).map(a=>({id:a.id,name:a.name||a.id}));return h.length?{models:h}:null}catch{return null}},github:async a=>{let b=await (0,n.v)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},blackbox:async a=>(0,o.x0)({apiKey:a.apiKey,accessToken:a.accessToken}),codebuddy:async()=>(0,i.A3)("codebuddy",{log:console}),"codebuddy-cn":async()=>(0,i.A3)("codebuddy-cn",{log:console})},w=/[-_][0-9a-f]{8,}$/i,x=0,y={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText",video:"video",music:"music"};function z(a){return a?.type&&y[a.type]||"llm"}function A(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/video|sora|veo|kling/.test(b)?"video":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}async function B(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,e.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,e.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 f;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),e=await fetch(c,{method:"GET",headers:d,cache:"no-store",signal:a.signal});if(clearTimeout(b),!e.ok)return[];let g=(f=await e.json(),Array.isArray(f)?f:f?.data||f?.models||f?.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 C(a,b){let c=e.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}function D(a){let b=e.AI_PROVIDERS[a];return b?.noAuth===!0&&b?.hidden===!0}function E(a,b,c,d,e){if("string"!=typeof a)return"";let f=a.trim();for(let a of new Set([b?.providerSpecificData?.prefix,c,d,e].filter(a=>"string"==typeof a&&""!==a.trim()))){let b=`${a.trim()}/`;if(f.startsWith(b))return f.slice(b.length)}return f}function F(a,b,c,d){if("string"!=typeof a)return"";let e=a.trim();for(let a of new Set([b?.providerSpecificData?.prefix,c,d,"kiro"].filter(a=>"string"==typeof a&&""!==a.trim()))){let b=`${a.trim()}/`;if(e.startsWith(b))return e.slice(b.length)}return e}async function G(a,b,c){let d=new Set,e=new Map,f=[];for(let e of a){let a=function(a){let b=a?.providerSpecificData?.enabledModels;return Array.isArray(b)?b.filter(a=>"string"==typeof a&&""!==a.trim()):[]}(e);if(a.length>0)for(let f of a){let a=F(f,e,b,c);a&&d.add(a)}else f.push(e)}let g=new Map([...f.filter(a=>(0,j.G9)(a.id)),...function(a){if(0===a.length)return[];let b=[],c=0,d=x%a.length;for(;c<a.length&&b.length<4;){let e=a[d];(0,j.G9)(e.id)||b.push(e),d=(d+1)%a.length,c+=1}return x=d,b}(f)].map(a=>[a.id,a]));if(0===g.size)return{modelIds:[...d],metadataById:e};let h=new AbortController,i=setTimeout(()=>h.abort("Kiro catalog discovery timed out"),5e3);i.unref?.();try{for(let a of(await Promise.all([...g.values()].map(async a=>{try{return await v.kiro(a,{signal:h.signal})}catch(a){return console.log(`Live model fetch failed for kiro: ${a?.message||a}`),null}}))))for(let f of Array.isArray(a?.models)?a.models:[]){let a=F(f?.id,null,b,c);a&&(d.add(a),e.has(a)||e.set(a,{contextLength:f.contextLength,maxOutputTokens:f.maxOutputTokens,...Array.isArray(f.inputTypes)?{modalities:{input:f.inputTypes}}:{}}))}}finally{clearTimeout(i)}return{modelIds:[...d],metadataById:e}}async function H(a,{apiKey:b=null,policy:c}={}){let k=void 0===c&&b?await (0,f.uH)(b):c||null;if(k&&!0!==k.active)return[];let l=[],m=!1;try{if(l=await (0,f.getProviderConnections)(),m=!0,l=l.filter(a=>!1!==a.isActive&&!a.quarantinedAt),k?.allowedConnectionIds?.length){let a=new Set(k.allowedConnectionIds);l=l.filter(b=>a.has(b.id))}}catch(a){console.log("Could not fetch providers, returning all models")}let n=[];try{n=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let o=[];try{o=await (0,f.uv)()}catch(a){console.log("Could not fetch custom models")}let q={};try{q=await (0,f.getModelAliases)()}catch(a){console.log("Could not fetch model aliases")}let u={};try{u=await (0,g.vF)()}catch(a){console.log("Could not fetch disabled models")}let x=(a,b)=>Array.isArray(u[a])&&u[a].includes(b),y=new Map;for(let a of l){let b=y.get(a.provider)||[];b.push(a),y.set(a.provider,b)}let F=[];for(let b of n){if(!function(a,b){let c=a?.kind||"llm";return b.includes(c)}(b,a))continue;let c={id:b.name,object:"model",owned_by:"combo"};("webSearch"===b.kind||"webFetch"===b.kind)&&(c.kind=b.kind),F.push(c)}if(0===l.length){let b=Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a]));for(let[c,f]of Object.entries(d.vq)){let d=b[c]||c;if(!("kiro"===d||m&&e.AI_PROVIDERS[d]?.noAuth!==!0||D(d))&&C(d,a))for(let b of f)a.includes(z(b))&&(x(c,b.id)||F.push({id:`${c}/${b.id}`,object:"model",owned_by:c}))}for(let b of m?[]:o){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&&F.push({id:`${c}/${d}`,object:"model",owned_by:c})}}else for(let[b,c]of y.entries()){let f;if(!C(b,a))continue;let g=c[0],k=d.Xg[b]||b,l=(g?.providerSpecificData?.prefix||(0,e.wG)(b)||k).trim(),m=d.vq[k]||[],n=g?.providerSpecificData?.enabledModels,p=Array.isArray(n)&&n.length>0,s=(0,e.mq)(b)||(0,e.gb)(b),u=new Map(m.map(a=>[a.id,z(a)])),y=new Map(m.map(a=>[a.id,a])),D=null;if("kiro"===b){let a=await G(c,l,k);f=(0,j.nf)(a.modelIds),D=a.metadataById}else f=p?Array.from(new Set(n.filter(a=>"string"==typeof a&&""!==a.trim()))):m.map(a=>a.id);s&&0===f.length&&!w.test(b)&&(f=await B(g));let H=v[b];if(H&&"kiro"!==b&&!p)try{let a=await H(g);a?.models?.length&&(f=a.models.map(a=>a.id))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}for(let d of Array.from(new Set([...f.map(a=>E(a,g,l,k,b)).filter(a=>"string"==typeof a&&""!==a.trim()),..."kiro"===b?[]:c.map(a=>E(a.defaultModel,a,l,k,b)).filter(a=>""!==a),..."kiro"===b?[]:o.filter(a=>{if(!a?.id||a.type&&"llm"!==a.type)return!1;let c=a.providerAlias;return c===k||c===l||c===b}).map(a=>String(a.id).trim()).filter(a=>""!==a),..."kiro"===b?[]:Object.values(q||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${l}/`)||a.startsWith(`${k}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${l}/`)?a.slice(l.length+1):a.startsWith(`${k}/`)?a.slice(k.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let e=u.get(d)||A(d);if(!a.includes(e)||x(l,d)||x(k,d)||c.every(a=>(0,t.FK)(a,d,b)))continue;let f={id:`${l}/${d}`,object:"model",owned_by:l},g=D?.get(d)||null,m=(0,r.a0)(e)||("llm"===e?(0,r.nl)(b,d,g):null);if(m&&(f.capabilities=m),"llm"===e){let a=m?.contextWindow,c=m?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(c)){let e=(0,r.nl)(b,d,g);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(c)||(c=e.maxOutput)}Number.isFinite(a)&&(f.context_length=a),Number.isFinite(c)&&(f.max_completion_tokens=c)}if("kiro"===b){let a=(0,j.AX)(d);a&&Object.assign(f,a)}if(("codebuddy"===b||"codebuddy-cn"===b)&&"llm"===e&&Object.assign(f,(0,i.wu)()),"antigravity"===b&&"llm"===e&&y.get(d)?.thinking!==!1){let a=function(a){if("string"!=typeof a||!a.trim())return null;let b=a.trim();return h.has(b)||/image/i.test(b)?null:{supported_reasoning_levels:["none","low","medium","high","xhigh","max"],default_reasoning_level:"high"}}(d);a&&Object.assign(f,a)}F.push(f)}let I=e.AI_PROVIDERS[b],J=[];if(a.includes("tts")&&Array.isArray(I?.ttsConfig?.models))for(let a of I.ttsConfig.models)a?.id&&J.push(a.id);if(a.includes("embedding")&&Array.isArray(I?.embeddingConfig?.models))for(let a of I.embeddingConfig.models)a?.id&&J.push(a.id);for(let a of J)x(l,a)||x(k,a)||F.push({id:`${l}/${a}`,object:"model",owned_by:l});a.includes("webSearch")&&I?.searchConfig&&F.push({id:`${l}/search`,object:"model",kind:"webSearch",owned_by:l}),a.includes("webFetch")&&I?.fetchConfig&&F.push({id:`${l}/fetch`,object:"model",kind:"webFetch",owned_by:l})}for(let[b,c]of Object.entries(e.AI_PROVIDERS)){if(c?.noAuth!==!0||D(b)||!C(b,a))continue;let f=d.Xg[b]||b,g=((0,e.wG)(b)||f).trim(),h=d.vq[f]||[],i=new Map(h.map(a=>[a.id,z(a)]));for(let c of h){let d=c.id,e=i.get(d)||A(d);if(!a.includes(e)||x(g,d)||x(f,d))continue;let h={id:`${g}/${d}`,object:"model",owned_by:g},j=(0,r.a0)(e)||("llm"===e?(0,r.nl)(b,d):null);if(j&&(h.capabilities=j),"llm"===e){let a=j?.contextWindow,c=j?.maxOutput;if(!Number.isFinite(a)||!Number.isFinite(c)){let e=(0,r.nl)(b,d);Number.isFinite(a)||(a=e.contextWindow),Number.isFinite(c)||(c=e.maxOutput)}Number.isFinite(a)&&(h.context_length=a),Number.isFinite(c)&&(h.max_completion_tokens=c)}F.push(h)}}a.includes("llm")&&F.push(...(0,p.lL)(l));let I=[],J=new Set;for(let a of F)!a?.id||J.has(a.id)||(J.add(a.id),I.push(a));return(0,s.Dw)(I,k?{...k,allowedConnectionIds:[]}:null)}async function I(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function J(a){try{let b=await H(["llm"],{apiKey:(0,s.MZ)(a)});return Response.json({object:"list",data:b},{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})}}}};