@m1nh/9router 0.5.86 → 0.5.87

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 (965) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +17 -16
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/routes-manifest.json +8 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +2 -2
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +6 -6
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  192. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  248. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  286. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  288. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  292. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  294. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  296. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  298. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  302. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  306. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  308. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  346. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -0
  348. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -0
  349. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route_client-reference-manifest.js +1 -0
  350. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  425. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/callback.html +1 -1
  428. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  429. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  430. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  432. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  435. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  436. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  440. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  441. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  445. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  446. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  455. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  456. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  459. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  460. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  461. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  465. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  466. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  470. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  471. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  474. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  476. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  484. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  503. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  504. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  513. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  514. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  519. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  524. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  526. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/index.html +1 -1
  528. package/app/.next-cli-build/server/app/index.rsc +5 -5
  529. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  530. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  531. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  533. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  535. package/app/.next-cli-build/server/app/landing.html +1 -1
  536. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  537. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  538. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  540. package/app/.next-cli-build/server/app/login/page.js +1 -1
  541. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  543. package/app/.next-cli-build/server/app/login.html +1 -1
  544. package/app/.next-cli-build/server/app/login.rsc +6 -6
  545. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  546. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  549. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  550. package/app/.next-cli-build/server/app/page.js +1 -1
  551. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app-paths-manifest.json +17 -16
  554. package/app/.next-cli-build/server/chunks/1679.js +1 -1
  555. package/app/.next-cli-build/server/chunks/24.js +1 -1
  556. package/app/.next-cli-build/server/chunks/2778.js +1 -1
  557. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  558. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  559. package/app/.next-cli-build/server/chunks/4049.js +1 -1
  560. package/app/.next-cli-build/server/chunks/412.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  562. package/app/.next-cli-build/server/chunks/4572.js +1 -1
  563. package/app/.next-cli-build/server/chunks/4961.js +1 -1
  564. package/app/.next-cli-build/server/chunks/5237.js +1 -1
  565. package/app/.next-cli-build/server/chunks/5330.js +5 -5
  566. package/app/.next-cli-build/server/chunks/5524.js +1 -1
  567. package/app/.next-cli-build/server/chunks/5615.js +2 -2
  568. package/app/.next-cli-build/server/chunks/5670.js +1 -1
  569. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  570. package/app/.next-cli-build/server/chunks/6249.js +2 -2
  571. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  572. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  573. package/app/.next-cli-build/server/chunks/6877.js +1 -1
  574. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  575. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  576. package/app/.next-cli-build/server/chunks/7220.js +1 -1
  577. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  578. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  579. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  580. package/app/.next-cli-build/server/chunks/827.js +1 -1
  581. package/app/.next-cli-build/server/chunks/8363.js +1 -1
  582. package/app/.next-cli-build/server/chunks/8402.js +1 -1
  583. package/app/.next-cli-build/server/chunks/8499.js +11 -11
  584. package/app/.next-cli-build/server/chunks/8587.js +1 -0
  585. package/app/.next-cli-build/server/chunks/8635.js +1 -1
  586. package/app/.next-cli-build/server/chunks/8895.js +10 -10
  587. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  588. package/app/.next-cli-build/server/chunks/9076.js +1 -1
  589. package/app/.next-cli-build/server/chunks/9128.js +1 -1
  590. package/app/.next-cli-build/server/chunks/9181.js +1 -1
  591. package/app/.next-cli-build/server/chunks/9765.js +1 -0
  592. package/app/.next-cli-build/server/instrumentation.js +1 -1
  593. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  595. package/app/.next-cli-build/server/middleware.js +3 -3
  596. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/pages/404.html +1 -1
  598. package/app/.next-cli-build/server/pages/500.html +1 -1
  599. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  600. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  601. package/app/.next-cli-build/static/chunks/1321-ba798be7ef223475.js +1 -0
  602. package/app/.next-cli-build/static/chunks/{5497-0a176f0c561c3ed0.js → 5497-7130e302b038bd53.js} +2 -2
  603. package/app/.next-cli-build/static/chunks/{6447-7dc1a52c10964d06.js → 6447-8c30ca0cd19a2827.js} +1 -1
  604. package/app/.next-cli-build/static/chunks/705-295d5a491126ba0f.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e5b2b18f79f00d51.js +27 -0
  606. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-4f578f99d7b58b82.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/_global-error/page-1b9308dbbaa9a160.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-1b9308dbbaa9a160.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-1b9308dbbaa9a160.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-1b9308dbbaa9a160.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1b9308dbbaa9a160.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1b9308dbbaa9a160.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-1b9308dbbaa9a160.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-1b9308dbbaa9a160.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-1b9308dbbaa9a160.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-1b9308dbbaa9a160.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-1b9308dbbaa9a160.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1b9308dbbaa9a160.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1b9308dbbaa9a160.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1b9308dbbaa9a160.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1b9308dbbaa9a160.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1b9308dbbaa9a160.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1b9308dbbaa9a160.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-1b9308dbbaa9a160.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1b9308dbbaa9a160.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1b9308dbbaa9a160.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1b9308dbbaa9a160.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1b9308dbbaa9a160.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1b9308dbbaa9a160.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-1b9308dbbaa9a160.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1b9308dbbaa9a160.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1b9308dbbaa9a160.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-1b9308dbbaa9a160.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-1b9308dbbaa9a160.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1b9308dbbaa9a160.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1b9308dbbaa9a160.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1b9308dbbaa9a160.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-1b9308dbbaa9a160.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1b9308dbbaa9a160.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1b9308dbbaa9a160.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-1b9308dbbaa9a160.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-1b9308dbbaa9a160.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1b9308dbbaa9a160.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-1b9308dbbaa9a160.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/combos/route-1b9308dbbaa9a160.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-1b9308dbbaa9a160.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1b9308dbbaa9a160.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-1b9308dbbaa9a160.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1b9308dbbaa9a160.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1b9308dbbaa9a160.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1b9308dbbaa9a160.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/health/route-1b9308dbbaa9a160.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/init/route-1b9308dbbaa9a160.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1b9308dbbaa9a160.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/keys/route-1b9308dbbaa9a160.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/locale/route-1b9308dbbaa9a160.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1b9308dbbaa9a160.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1b9308dbbaa9a160.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1b9308dbbaa9a160.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1b9308dbbaa9a160.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1b9308dbbaa9a160.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1b9308dbbaa9a160.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1b9308dbbaa9a160.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1b9308dbbaa9a160.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1b9308dbbaa9a160.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-1b9308dbbaa9a160.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1b9308dbbaa9a160.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1b9308dbbaa9a160.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/models/route-1b9308dbbaa9a160.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1b9308dbbaa9a160.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1b9308dbbaa9a160.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1b9308dbbaa9a160.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1b9308dbbaa9a160.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1b9308dbbaa9a160.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1b9308dbbaa9a160.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1b9308dbbaa9a160.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-1b9308dbbaa9a160.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1b9308dbbaa9a160.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1b9308dbbaa9a160.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1b9308dbbaa9a160.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1b9308dbbaa9a160.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1b9308dbbaa9a160.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1b9308dbbaa9a160.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1b9308dbbaa9a160.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-1b9308dbbaa9a160.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-1b9308dbbaa9a160.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-1b9308dbbaa9a160.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-1b9308dbbaa9a160.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1b9308dbbaa9a160.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1b9308dbbaa9a160.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1b9308dbbaa9a160.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1b9308dbbaa9a160.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1b9308dbbaa9a160.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1b9308dbbaa9a160.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1b9308dbbaa9a160.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1b9308dbbaa9a160.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1b9308dbbaa9a160.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1b9308dbbaa9a160.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/providers/route-1b9308dbbaa9a160.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1b9308dbbaa9a160.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1b9308dbbaa9a160.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1b9308dbbaa9a160.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1b9308dbbaa9a160.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1b9308dbbaa9a160.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1b9308dbbaa9a160.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1b9308dbbaa9a160.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1b9308dbbaa9a160.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1b9308dbbaa9a160.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-1b9308dbbaa9a160.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-1b9308dbbaa9a160.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-1b9308dbbaa9a160.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-1b9308dbbaa9a160.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-1b9308dbbaa9a160.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-1b9308dbbaa9a160.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-1b9308dbbaa9a160.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-1b9308dbbaa9a160.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1b9308dbbaa9a160.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1b9308dbbaa9a160.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1b9308dbbaa9a160.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/settings/route-1b9308dbbaa9a160.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1b9308dbbaa9a160.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/tags/route-1b9308dbbaa9a160.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1b9308dbbaa9a160.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1b9308dbbaa9a160.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1b9308dbbaa9a160.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1b9308dbbaa9a160.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1b9308dbbaa9a160.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1b9308dbbaa9a160.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1b9308dbbaa9a160.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1b9308dbbaa9a160.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1b9308dbbaa9a160.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1b9308dbbaa9a160.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1b9308dbbaa9a160.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1b9308dbbaa9a160.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1b9308dbbaa9a160.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-1b9308dbbaa9a160.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1b9308dbbaa9a160.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1b9308dbbaa9a160.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1b9308dbbaa9a160.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1b9308dbbaa9a160.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1b9308dbbaa9a160.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1b9308dbbaa9a160.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1b9308dbbaa9a160.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1b9308dbbaa9a160.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1b9308dbbaa9a160.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1b9308dbbaa9a160.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1b9308dbbaa9a160.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1b9308dbbaa9a160.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1b9308dbbaa9a160.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1b9308dbbaa9a160.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1b9308dbbaa9a160.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1b9308dbbaa9a160.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1b9308dbbaa9a160.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1b9308dbbaa9a160.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1b9308dbbaa9a160.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-1b9308dbbaa9a160.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1b9308dbbaa9a160.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1b9308dbbaa9a160.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1b9308dbbaa9a160.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1b9308dbbaa9a160.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/v1/route-1b9308dbbaa9a160.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1b9308dbbaa9a160.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-1b9308dbbaa9a160.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-1b9308dbbaa9a160.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-1b9308dbbaa9a160.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-1b9308dbbaa9a160.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-1b9308dbbaa9a160.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1b9308dbbaa9a160.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1b9308dbbaa9a160.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1b9308dbbaa9a160.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/version/route-1b9308dbbaa9a160.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1b9308dbbaa9a160.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1b9308dbbaa9a160.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1b9308dbbaa9a160.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/page-1b9308dbbaa9a160.js +1 -0
  776. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1b9308dbbaa9a160.js +1 -0
  777. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1b9308dbbaa9a160.js +1 -0
  778. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1b9308dbbaa9a160.js +1 -0
  779. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1b9308dbbaa9a160.js +1 -0
  780. package/app/.next-cli-build/static/css/83c41073a41a81a0.css +1 -0
  781. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  782. package/app/cli/package.json +1 -1
  783. package/app/package.json +1 -1
  784. package/package.json +1 -1
  785. package/app/.next-cli-build/server/chunks/5827.js +0 -1
  786. package/app/.next-cli-build/server/chunks/8526.js +0 -1
  787. package/app/.next-cli-build/static/chunks/1321-9f55771ea8555497.js +0 -1
  788. package/app/.next-cli-build/static/chunks/705-f07c546a169bc3d2.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f51632c292437ed4.js +0 -27
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f69d369b55f53879.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/_global-error/page-88e4f99cb546d1f2.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-88e4f99cb546d1f2.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-88e4f99cb546d1f2.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-88e4f99cb546d1f2.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-88e4f99cb546d1f2.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-88e4f99cb546d1f2.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-88e4f99cb546d1f2.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-88e4f99cb546d1f2.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-88e4f99cb546d1f2.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-88e4f99cb546d1f2.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-88e4f99cb546d1f2.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-88e4f99cb546d1f2.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-88e4f99cb546d1f2.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-88e4f99cb546d1f2.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-88e4f99cb546d1f2.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-88e4f99cb546d1f2.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-88e4f99cb546d1f2.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-88e4f99cb546d1f2.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-88e4f99cb546d1f2.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-88e4f99cb546d1f2.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-88e4f99cb546d1f2.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-88e4f99cb546d1f2.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-88e4f99cb546d1f2.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-88e4f99cb546d1f2.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-88e4f99cb546d1f2.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-88e4f99cb546d1f2.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-88e4f99cb546d1f2.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-88e4f99cb546d1f2.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-88e4f99cb546d1f2.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-88e4f99cb546d1f2.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-88e4f99cb546d1f2.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-88e4f99cb546d1f2.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-88e4f99cb546d1f2.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-88e4f99cb546d1f2.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-88e4f99cb546d1f2.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-88e4f99cb546d1f2.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-88e4f99cb546d1f2.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-88e4f99cb546d1f2.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/combos/route-88e4f99cb546d1f2.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-88e4f99cb546d1f2.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-88e4f99cb546d1f2.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-88e4f99cb546d1f2.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-88e4f99cb546d1f2.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-88e4f99cb546d1f2.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-88e4f99cb546d1f2.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/health/route-88e4f99cb546d1f2.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/init/route-88e4f99cb546d1f2.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-88e4f99cb546d1f2.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/keys/route-88e4f99cb546d1f2.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/locale/route-88e4f99cb546d1f2.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-88e4f99cb546d1f2.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-88e4f99cb546d1f2.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-88e4f99cb546d1f2.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-88e4f99cb546d1f2.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-88e4f99cb546d1f2.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-88e4f99cb546d1f2.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-88e4f99cb546d1f2.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-88e4f99cb546d1f2.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-88e4f99cb546d1f2.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-88e4f99cb546d1f2.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-88e4f99cb546d1f2.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-88e4f99cb546d1f2.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/models/route-88e4f99cb546d1f2.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/models/test/route-88e4f99cb546d1f2.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-88e4f99cb546d1f2.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-88e4f99cb546d1f2.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-88e4f99cb546d1f2.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-88e4f99cb546d1f2.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-88e4f99cb546d1f2.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-88e4f99cb546d1f2.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-88e4f99cb546d1f2.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-88e4f99cb546d1f2.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-88e4f99cb546d1f2.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-88e4f99cb546d1f2.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-88e4f99cb546d1f2.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-88e4f99cb546d1f2.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-88e4f99cb546d1f2.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-88e4f99cb546d1f2.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-88e4f99cb546d1f2.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-88e4f99cb546d1f2.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-88e4f99cb546d1f2.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-88e4f99cb546d1f2.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/pricing/route-88e4f99cb546d1f2.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-88e4f99cb546d1f2.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-88e4f99cb546d1f2.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-88e4f99cb546d1f2.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-88e4f99cb546d1f2.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-88e4f99cb546d1f2.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-88e4f99cb546d1f2.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-88e4f99cb546d1f2.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-88e4f99cb546d1f2.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-88e4f99cb546d1f2.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/providers/route-88e4f99cb546d1f2.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-88e4f99cb546d1f2.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-88e4f99cb546d1f2.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-88e4f99cb546d1f2.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-88e4f99cb546d1f2.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-88e4f99cb546d1f2.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-88e4f99cb546d1f2.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-88e4f99cb546d1f2.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-88e4f99cb546d1f2.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-88e4f99cb546d1f2.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-88e4f99cb546d1f2.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-88e4f99cb546d1f2.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-88e4f99cb546d1f2.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-88e4f99cb546d1f2.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-88e4f99cb546d1f2.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-88e4f99cb546d1f2.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-88e4f99cb546d1f2.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-88e4f99cb546d1f2.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-88e4f99cb546d1f2.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-88e4f99cb546d1f2.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-88e4f99cb546d1f2.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/settings/route-88e4f99cb546d1f2.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-88e4f99cb546d1f2.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/tags/route-88e4f99cb546d1f2.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-88e4f99cb546d1f2.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-88e4f99cb546d1f2.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-88e4f99cb546d1f2.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-88e4f99cb546d1f2.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-88e4f99cb546d1f2.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-88e4f99cb546d1f2.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-88e4f99cb546d1f2.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-88e4f99cb546d1f2.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-88e4f99cb546d1f2.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-88e4f99cb546d1f2.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-88e4f99cb546d1f2.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-88e4f99cb546d1f2.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-88e4f99cb546d1f2.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-88e4f99cb546d1f2.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-88e4f99cb546d1f2.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-88e4f99cb546d1f2.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-88e4f99cb546d1f2.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-88e4f99cb546d1f2.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-88e4f99cb546d1f2.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-88e4f99cb546d1f2.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-88e4f99cb546d1f2.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-88e4f99cb546d1f2.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-88e4f99cb546d1f2.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-88e4f99cb546d1f2.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-88e4f99cb546d1f2.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-88e4f99cb546d1f2.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-88e4f99cb546d1f2.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-88e4f99cb546d1f2.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-88e4f99cb546d1f2.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-88e4f99cb546d1f2.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-88e4f99cb546d1f2.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-88e4f99cb546d1f2.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-88e4f99cb546d1f2.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-88e4f99cb546d1f2.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-88e4f99cb546d1f2.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-88e4f99cb546d1f2.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-88e4f99cb546d1f2.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1/route-88e4f99cb546d1f2.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-88e4f99cb546d1f2.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-88e4f99cb546d1f2.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-88e4f99cb546d1f2.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-88e4f99cb546d1f2.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-88e4f99cb546d1f2.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-88e4f99cb546d1f2.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-88e4f99cb546d1f2.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-88e4f99cb546d1f2.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-88e4f99cb546d1f2.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/version/route-88e4f99cb546d1f2.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-88e4f99cb546d1f2.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/version/update/route-88e4f99cb546d1f2.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-88e4f99cb546d1f2.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/page-88e4f99cb546d1f2.js +0 -1
  959. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-88e4f99cb546d1f2.js +0 -1
  960. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-88e4f99cb546d1f2.js +0 -1
  961. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-88e4f99cb546d1f2.js +0 -1
  962. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-88e4f99cb546d1f2.js +0 -1
  963. package/app/.next-cli-build/static/css/8cc306fc3760c2a2.css +0 -1
  964. /package/app/.next-cli-build/static/{OYb5Yq4NL-wta-dTiS5U2 → PZvA43-na7jomNlixbKIv}/_buildManifest.js +0 -0
  965. /package/app/.next-cli-build/static/{OYb5Yq4NL-wta-dTiS5U2 → PZvA43-na7jomNlixbKIv}/_ssgManifest.js +0 -0
@@ -37,7 +37,7 @@ amp --model "{{model}}"
37
37
  gemini extensions install https://github.com/manalkaff/opendesign
38
38
 
39
39
  # OpenCode
40
- # Fetch and follow .opencode/INSTALL.md from the repo`}},pi:{id:"pi",name:"Pi (pi-coding-agent)",image:"/providers/pi.svg",color:"#6366F1",description:"Pi coding agent — minimal, extensible agent harness (pi.dev)",configType:"custom",docsUrl:"https://pi.dev",notes:[{type:"info",text:"Pi uses ~/.pi/agent/models.json. 9Router is configured under providers.9router as an OpenAI-compatible endpoint."}]},omp:{id:"omp",name:"Oh My Pi",image:"/providers/omp.png",color:"#EC4899",description:"Oh My Pi terminal AI agent with auto-discovery support",configType:"custom",docsUrl:"https://github.com/can1357/oh-my-pi",notes:[{type:"info",text:"Oh My Pi uses ~/.omp/agent/models.yml and agent.db. 9Router is configured with proxy discovery so all models appear automatically under /model."}]},crush:{id:"crush",name:"Crush",image:"/providers/crush.png",color:"#FB923C",description:"Charm Crush terminal AI coding agent",configType:"custom",docsUrl:"https://github.com/charmbracelet/crush",notes:[{type:"info",text:"Crush uses ~/.config/crush/crush.json. 9Router registers as an openai-compat provider."}]},forge:{id:"forge",name:"ForgeCode",image:"/providers/forge.png",color:"#EAB308",description:"Antinomy HQ ForgeCode agent harness",configType:"custom",docsUrl:"https://github.com/antinomyhq/forge",notes:[{type:"info",text:"ForgeCode uses ~/.forge/config.toml. 9Router updates the [openai] section with your baseUrl, apiKey, and model."}]},smelt:{id:"smelt",name:"Smelt",image:"/providers/smelt.svg",color:"#EF4444",description:"Smelt terminal AI coding assistant",configType:"custom",docsUrl:"https://github.com/leonardcser/smelt",notes:[{type:"info",text:"Smelt uses ~/.smelt/config.json for OpenAI-compatible endpoint configuration."}]},codewhale:{id:"codewhale",name:"CodeWhale",image:"/providers/codewhale.svg",color:"#4F46E5",description:"CodeWhale terminal coding agent (successor to DeepSeek TUI)",configType:"custom",docsUrl:"https://github.com/Hmbown/CodeWhale",notes:[{type:"info",text:"CodeWhale uses ~/.codewhale/config.toml. 9Router configures the [openai] provider with your base_url, api_key, and model."}]}}},40295:e=>{e.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},93052:(e,t,s)=>{s.d(t,{Tk:()=>U,aG:()=>G,Ah:()=>P,Q6:()=>W,lF:()=>Y,a7:()=>F,ZM:()=>R,WE:()=>er,E_:()=>el,RF:()=>z,mW:()=>Z,c9:()=>J,gY:()=>ex,tA:()=>en,kn:()=>ed,yZ:()=>T,qO:()=>q});var l=s(95155),a=s(12115),r=s(35497),i=s(5772),n=s(50871);function o({storageKey:e,changeEvent:t,itemField:s,normalize:l=e=>e,defaultName:a=e=>e}){let r=()=>{try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");if(!Array.isArray(t))return[];return t.filter(e=>e?.name&&e?.[s])}catch{return[]}},i=s=>{window.localStorage.setItem(e,JSON.stringify(s)),window.dispatchEvent(new CustomEvent(t))};return{read:r,subscribe:e=>(window.addEventListener(t,e),()=>window.removeEventListener(t,e)),upsert:(e,t)=>{let n=l(e);if(!n)return null;let o=r(),d=o.find(e=>l(e[s])===n);if(d&&!t)return d.name;let c=(t||a(n)).trim();return c?(i([...o.filter(e=>e.name!==c&&l(e[s])!==n),{name:c,[s]:n}].sort((e,t)=>e.name.localeCompare(t.name))),c):null},remove:e=>i(r().filter(t=>t.name!==e))}}let d=e=>(e||"").replace(/\/+$/,""),c=o({storageKey:"9router.cliToolEndpointPresets",changeEvent:"9router:endpoint-presets-changed",itemField:"baseUrl",normalize:d,defaultName:e=>{try{return new URL(e).host}catch{return e}}}),m=o({storageKey:"9router.cliToolApiKeyPresets",changeEvent:"9router:api-key-presets-changed",itemField:"key"}),x=c.read,u=c.subscribe,p=c.upsert,h=c.remove,g=m.read,f=m.subscribe,y=m.upsert,b=m.remove;function j(e,{tunnelPublicUrl:t,tailscaleUrl:s,cloudUrl:l}={}){let a=d(e);return!a||[`http://127.0.0.1:${n.h0.appPort}`,t,s,l].filter(Boolean).flatMap(e=>[d(e),`${d(e)}/v1`]).includes(a)?null:p(a)}let v="__custom__",N="__save__",w=e=>{let t=(e||"").replace(/\/+$/,"");return t?/\/v1$/.test(t)?t:`${t}/v1`:""};function k({value:e,onChange:t,requiresExternalUrl:s=!1,tunnelEnabled:r=!1,tunnelPublicUrl:i="",tailscaleEnabled:o=!1,tailscaleUrl:c="",cloudEnabled:m=!1,cloudUrl:g="",withV1:f=!0,currentUrl:y=""}){let[b,j]=(0,a.useState)([]),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(""),[A,O]=(0,a.useState)(""),M=(0,a.useRef)(!1),$=(0,a.useRef)("");(0,a.useEffect)(()=>{let e=()=>{let e=x();j(e),E(t=>{if(t!==v)return t;let s=d($.current);if(!s)return t;let l=e.find(e=>{let t=d(e.baseUrl);return t===s||t===w(s)});return l?`saved:${l.name}`:t})};return e(),_(!0),u(e)},[]);let U=(0,a.useMemo)(()=>(({requiresExternalUrl:e,tunnelEnabled:t,tunnelPublicUrl:s,tailscaleEnabled:l,tailscaleUrl:a,cloudEnabled:r,cloudUrl:i,savedPresets:o,withV1:d})=>{let c=[],m=e=>d?w(e):(e||"").replace(/\/+$/,"");if(!e){let e=m(`http://127.0.0.1:${n.h0.appPort}`);c.push({value:"local",label:e,url:e})}if(t&&s){let e=m(s);c.push({value:"tunnel",label:e,url:e})}if(l&&a){let e=m(a);c.push({value:"tailscale",label:e,url:e})}if(r&&i){let e=m(i);c.push({value:"cloud",label:e,url:e})}return o.forEach(e=>{c.push({value:`saved:${e.name}`,label:e.baseUrl,url:e.baseUrl,saved:!0})}),c.push({value:v,label:"Custom URL...",url:""}),c})({requiresExternalUrl:s,tunnelEnabled:r,tunnelPublicUrl:i,tailscaleEnabled:o,tailscaleUrl:c,cloudEnabled:m,cloudUrl:g,savedPresets:b,withV1:f}),[s,r,i,o,c,m,g,b,f]);(0,a.useEffect)(()=>{if(M.current||!C||0===U.length)return;M.current=!0;let e=d(y),s=(e?U.find(t=>t.saved&&d(t.url)===e):null)||U.find(e=>e.value!==v);s?(E(s.value),t(s.url)):E(v)},[C,U,t,y]);let P=S.startsWith("saved:"),I=S===v,R=I&&(A||"").trim().length>0;return(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("select",{value:S,onChange:s=>{let l=s.target.value;if(l===N){let t=(e||"").trim();if(!t)return;let s=t;try{s=new URL(t).host}catch{}let l=window.prompt("Save endpoint as:",s),a=l?.trim()?p(t,l.trim()):null;a&&E(`saved:${a}`);return}if(E(l),l===v){O(""),t("");return}let a=U.find(e=>e.value===l);a&&t(a.url)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[U.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value)),R&&(0,l.jsx)("option",{value:N,children:"+ Save current as..."})]}),P&&(0,l.jsx)("button",{type:"button",onClick:()=>{if(!S.startsWith("saved:"))return;h(S.slice(6)),O("");let e=U.find(e=>e.value!==v&&e.value!==S);e?(E(e.value),t(e.url)):(E(v),t(""))},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved endpoint",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),I&&(0,l.jsx)("input",{type:"text",value:A,onChange:e=>{let s=e.target.value;$.current=s,O(s),t(s)},placeholder:f?"https://example.com/v1":"https://example.com",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let C="__custom__",_="__save_key__";function S({value:e,onChange:t,apiKeys:s=[],cloudEnabled:r=!1,className:i=""}){let[n,o]=(0,a.useState)([]),[d,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=()=>o(g());return e(),f(e)},[]);let u=(0,a.useMemo)(()=>[...s.map(e=>({value:e.key,label:e.key})),...n.map(e=>({value:`saved:${e.name}`,label:e.key,url:e.key,saved:!0})),{value:C,label:"Custom...",url:""}],[s,n]),p=e?u.find(t=>t.value===e||t.url===e):null,h=p?p.value:d||e?C:u[0]?.value??C,j=d?m:e||"",v="string"==typeof h&&h.startsWith("saved:"),N=h===C,w=N&&(e||"").trim().length>0&&!s.some(t=>t.key===e);return 0!==s.length||0!==n.length||d||e?(0,l.jsxs)("div",{className:`flex flex-col gap-1.5 ${i}`,children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("select",{value:h,onChange:s=>{let l=s.target.value;if(l===_)return void y((e||"").trim());if(l===C){c(!0),x(""),t("");return}c(!1),x("");let a=u.find(e=>e.value===l);a&&t(a.url??a.value)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[u.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value)),w&&(0,l.jsx)("option",{value:_,children:"+ Save current as..."})]}),v&&(0,l.jsx)("button",{type:"button",onClick:()=>{if(!v)return;b(h.slice(6)),c(!1),x("");let e=u.find(e=>e.value!==C&&e.value!==h);t(e?e.url??e.value:"")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),N&&(0,l.jsx)("input",{type:"text",value:j,onChange:e=>{let s=e.target.value;c(!0),x(s),t(s)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]}):(0,l.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${i}`,children:r?"No API keys - Create one in Keys page":"sk_9router (default)"})}let E=e=>(e||"").replace(/\/+$/,"");function A(e,t={}){if(!e)return!1;let s=E(e),{tunnelPublicUrl:l,tailscaleUrl:a,cloudUrl:r}=t;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(s)||l&&s.startsWith(E(l))||a&&s.startsWith(E(a))||r&&s.startsWith(E(r)))}let O=/\[1m\]$/i,M=s(41463).env.NEXT_PUBLIC_CLOUD_URL,$=[{label:"Default",value:""},{label:"200K",value:"198000"},{label:"300K",value:"298000"},{label:"500K",value:"498000"},{label:"700K",value:"698000"}];function U({tool:e,isExpanded:t,onToggle:s,activeProviders:n,modelMappings:o,onModelMappingChange:d,baseUrl:c,hasActiveProviders:m,apiKeys:x,cloudEnabled:u,initialStatus:p,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y}){let b,v,N,[w,C]=(0,a.useState)(p||null),[_,E]=(0,a.useState)(!1),[P,I]=(0,a.useState)(!1),[R,T]=(0,a.useState)(!1),[D,z]=(0,a.useState)(null),[L,K]=(0,a.useState)(!1),[F,q]=(0,a.useState)(!1),[B,H]=(0,a.useState)(null),[W,G]=(0,a.useState)(""),[J,V]=(0,a.useState)({}),[Y,Z]=(0,a.useState)(!1),[Q,X]=(0,a.useState)(""),[ee,et]=(0,a.useState)(!1),[es,el]=(0,a.useState)(!1),[ea,er]=(0,a.useState)(""),[ei,en]=(0,a.useState)(!1),eo=(0,a.useRef)(!1),ed=w?.settings?.env?.ANTHROPIC_BASE_URL||"",ec=(()=>{if(!w?.installed)return null;let e=w.settings?.env?.ANTHROPIC_BASE_URL;return e?A(e,{tunnelPublicUrl:g,tailscaleUrl:y,cloudUrl:u?M:null})?"configured":"other":"not_configured"})();(0,a.useEffect)(()=>{x?.length>0&&!W&&G(x[0].key)},[x,W]),(0,a.useEffect)(()=>{p&&(C(p),el(!!p.exaMcpEnabled))},[p]),(0,a.useEffect)(()=>{er(w?.settings?.env?.CLAUDE_CODE_AUTO_COMPACT_WINDOW||"")},[w?.settings?.env?.CLAUDE_CODE_AUTO_COMPACT_WINDOW]),(0,a.useEffect)(()=>{let t=w?.settings?.env;t&&en(e.defaultModels.some(e=>t[e.envKey]?.endsWith("[1m]")))},[w?.settings?.env,e.defaultModels]),(0,a.useEffect)(()=>{t&&(w||eu(),ex())},[t]),(0,a.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{et(!!e.ccFilterNaming)}).catch(()=>{})},[]);let em=async e=>{let t=e.target.checked;et(t),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:t})}).catch(()=>{})},ex=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&V(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(w?.installed&&!eo.current){eo.current=!0;let t=w.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&d(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&G(s)}},[w,x,e.defaultModels,d]);let eu=async()=>{E(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();C(t),el(!!t.exaMcpEnabled)}catch(e){C({installed:!1,error:e.message})}finally{E(!1)}},ep=()=>{let e=Q||c;return e.endsWith("/v1")?e:`${e}/v1`},eh=async()=>{I(!0),z(null);try{let t={ANTHROPIC_BASE_URL:ep()},s=W?.trim()||(x?.length>0?x[0].key:null)||(u?null:"sk_9router");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=o[e.alias];s&&e.envKey&&(t[e.envKey]=s)}),ea&&(t.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ea);let l=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t,exaMcpEnabled:es,autoCompactWindow:ea})}),a=await l.json();l.ok?(j(ep(),{tunnelPublicUrl:g,tailscaleUrl:y}),z({type:"success",text:"Settings applied successfully!"}),C(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t},exaMcpEnabled:es}))):z({type:"error",text:a.error||"Failed to apply settings"})}catch(e){z({type:"error",text:e.message})}finally{I(!1)}},eg=async()=>{T(!0),z(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(z({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>d(e.alias,e.defaultValue||"")),G(""),el(!1),er(""),en(!1)):z({type:"error",text:s.error||"Failed to reset settings"})}catch(e){z({type:"error",text:e.message})}finally{T(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/claude.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[_&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude CLI..."})]}),!_&&w&&!w.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>Z(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>K(!L),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!_&&w?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(k,{value:Q||((b=Q||c).endsWith("/v1")?b:`${b}/v1`),onChange:X,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,currentUrl:ed})]}),w?.settings?.env?.ANTHROPIC_BASE_URL&&(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:w.settings.env.ANTHROPIC_BASE_URL})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(S,{value:W,onChange:G,apiKeys:x,cloudEnabled:u})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:o[e.alias]||"",onChange:t=>d(e.alias,t.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),o[e.alias]&&(0,l.jsx)("button",{onClick:()=>d(e.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>{H(e.alias),q(!0)},disabled:!m,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},e.alias)),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Auto-compact"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("select",{value:ea,onChange:e=>er(e.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:$.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.label))})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"1M context"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:t=>{var s;en(s=t.target.checked),e.defaultModels.forEach(e=>{let t=o[e.alias];t&&d(e.alias,((e,t)=>{let{model:s}=function(e){if("string"!=typeof e)return{model:e,contextMarker:null};let t=e.trim(),s=t.match(O);return s?{model:t.slice(0,-s[0].length),contextMarker:s[0].slice(1,-1).toLowerCase()}:{model:e,contextMarker:null}}(e);return t?`${s}[1m]`:s})(t,s))})},className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Append [1m] to the model name"}),(0,l.jsx)(r.m_,{text:"Claude Code otherwise assumes a 200K window, which clamps the auto-compact window above. Applied to every mapped model — only enable it for models that really accept 1M.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:ee,onChange:em,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,l.jsx)(r.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Web Search"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:es,onChange:e=>el(e.target.checked),className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Exa MCP"}),(0,l.jsx)(r.m_,{text:"Injects Exa MCP into ~/.claude.json so non-Claude models gain web search. Restart Claude Code after Apply.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),D&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===D.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===D.type?"check_circle":"error"}),(0,l.jsx)("span",{children:D.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:eh,disabled:!m,loading:P,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:eg,disabled:!w?.has9Router,loading:R,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>Z(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),F&&(0,l.jsx)(r.rq,{isOpen:F,onClose:()=>q(!1),onSelect:e=>{B&&d(B,e.value)},selectedModel:B?o[B]:null,activeProviders:n,modelAliases:J,title:`Select model for ${B}`}),(0,l.jsx)(r.uR,{isOpen:Y,onClose:()=>Z(!1),title:"Claude CLI - Manual Configuration",configs:(v=W&&W.trim()?W:u?"<API_KEY_FROM_DASHBOARD>":"sk_9router",N={ANTHROPIC_BASE_URL:ep(),ANTHROPIC_AUTH_TOKEN:v},e.defaultModels.forEach(e=>{let t=o[e.alias];t&&e.envKey&&(N[e.envKey]=t)}),ea&&(N.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ea),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:N},null,2)}])})]})}function P({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:x,tunnelPublicUrl:u,tailscaleEnabled:p,tailscaleUrl:h}){let g,f,y,[b,v]=(0,a.useState)(m||null),[N,w]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[E,O]=(0,a.useState)(!1),[M,$]=(0,a.useState)(null),[U,I]=(0,a.useState)(!1),[R,T]=(0,a.useState)(""),[D,z]=(0,a.useState)(""),[L,K]=(0,a.useState)(""),[F,q]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),[W,G]=(0,a.useState)({}),[J,V]=(0,a.useState)(!1),[Y,Z]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!R&&T(o[0].key)},[o,R]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&(b||es(),Q())},[t]);let Q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&G(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(b?.config){let e=b.config.match(/^model\s*=\s*"([^"]+)"/m);e&&z(e[1]);let t=b.config.match(/^default_subagent_model\s*=\s*"([^"]+)"/m);t&&K(t[1])}},[b]);let X=(g=b?.config?.match(/base_url\s*=\s*"([^"]+)"/))?g[1]:"",ee=b?.installed?b.config?A(X,{tunnelPublicUrl:u,tailscaleUrl:h})?"configured":"other":"not_configured":null,et=()=>{let e=Y||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},es=async()=>{w(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{w(!1)}},el=async()=>{_(!0),$(null);try{let e=R&&R.trim()||c?R:"sk_9router",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:et(),apiKey:e,model:D,subagentModel:L||D})}),s=await t.json();t.ok?(j(et(),{tunnelPublicUrl:u,tailscaleUrl:h}),$({type:"success",text:"Settings applied successfully!"}),es()):$({type:"error",text:s.error||"Failed to apply settings"})}catch(e){$({type:"error",text:e.message})}finally{_(!1)}},ea=async()=>{O(!0),$(null);try{let e=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),t=await e.json();e.ok?($({type:"success",text:"Settings reset successfully!"}),z(""),K(""),es()):$({type:"error",text:t.error||"Failed to reset settings"})}catch(e){$({type:"error",text:e.message})}finally{O(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/codex.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[N&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Codex CLI..."})]}),!N&&b&&!b.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>I(!U),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:U?"expand_less":"help"}),U?"Hide":"How to Install"]})]})]}),U&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,l.jsx)("div",{className:"pt-2 border-t border-border",children:(0,l.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex reads custom providers from ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/config.toml"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!N&&b?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(k,{value:Y||Y||`${n}/v1`,onChange:Z,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:x,tunnelPublicUrl:u,tailscaleEnabled:p,tailscaleUrl:h,currentUrl:X})]}),b?.config&&(X?(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:X})]}):null),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(S,{value:R,onChange:T,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:D,onChange:e=>z(e.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),D&&(0,l.jsx)("button",{onClick:()=>z(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>q(!0),disabled:!d?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:L,onChange:e=>K(e.target.value),placeholder:D||"provider/model-id (defaults to main model)",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),L&&(0,l.jsx)("button",{onClick:()=>K(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>H(!0),disabled:!d?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),M&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===M.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===M.type?"check_circle":"error"}),(0,l.jsx)("span",{children:M.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:el,disabled:!R&&c&&o.length>0||!D,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:ea,disabled:E,loading:E,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),F&&(0,l.jsx)(r.rq,{isOpen:F,onClose:()=>q(!1),onSelect:e=>{z(e.value),L||K(e.value),q(!1)},selectedModel:D,activeProviders:d,modelAliases:W,title:"Select Model for Codex"}),B&&(0,l.jsx)(r.rq,{isOpen:B,onClose:()=>H(!1),onSelect:e=>{K(e.value),H(!1)},selectedModel:L,activeProviders:d,modelAliases:W,title:"Select Subagent Model for Codex"}),(0,l.jsx)(r.uR,{isOpen:J,onClose:()=>V(!1),title:"Codex CLI - Manual Configuration",configs:(f=R&&R.trim()?R:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",y=L||D,[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
40
+ # Fetch and follow .opencode/INSTALL.md from the repo`}},pi:{id:"pi",name:"Pi (pi-coding-agent)",image:"/providers/pi.svg",color:"#6366F1",description:"Pi coding agent — minimal, extensible agent harness (pi.dev)",configType:"custom",docsUrl:"https://pi.dev",notes:[{type:"info",text:"Pi uses ~/.pi/agent/models.json. 9Router is configured under providers.9router as an OpenAI-compatible endpoint."}]},omp:{id:"omp",name:"Oh My Pi",image:"/providers/omp.png",color:"#EC4899",description:"Oh My Pi terminal AI agent with auto-discovery support",configType:"custom",docsUrl:"https://github.com/can1357/oh-my-pi",notes:[{type:"info",text:"Oh My Pi uses ~/.omp/agent/models.yml and agent.db. 9Router is configured with proxy discovery so all models appear automatically under /model."}]},crush:{id:"crush",name:"Crush",image:"/providers/crush.png",color:"#FB923C",description:"Charm Crush terminal AI coding agent",configType:"custom",docsUrl:"https://github.com/charmbracelet/crush",notes:[{type:"info",text:"Crush uses ~/.config/crush/crush.json. 9Router registers as an openai-compat provider."}]},forge:{id:"forge",name:"ForgeCode",image:"/providers/forge.png",color:"#EAB308",description:"Antinomy HQ ForgeCode agent harness",configType:"custom",docsUrl:"https://github.com/antinomyhq/forge",notes:[{type:"info",text:"ForgeCode uses ~/.forge/config.toml. 9Router updates the [openai] section with your baseUrl, apiKey, and model."}]},smelt:{id:"smelt",name:"Smelt",image:"/providers/smelt.svg",color:"#EF4444",description:"Smelt terminal AI coding assistant",configType:"custom",docsUrl:"https://github.com/leonardcser/smelt",notes:[{type:"info",text:"Smelt uses ~/.smelt/config.json for OpenAI-compatible endpoint configuration."}]},codewhale:{id:"codewhale",name:"CodeWhale",image:"/providers/codewhale.svg",color:"#4F46E5",description:"CodeWhale terminal coding agent (successor to DeepSeek TUI)",configType:"custom",docsUrl:"https://github.com/Hmbown/CodeWhale",notes:[{type:"info",text:"CodeWhale uses ~/.codewhale/config.toml. 9Router configures the [openai] provider with your base_url, api_key, and model."}]}}},40295:e=>{e.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},93052:(e,t,s)=>{s.d(t,{Tk:()=>U,aG:()=>G,Ah:()=>P,Q6:()=>W,lF:()=>Y,a7:()=>F,ZM:()=>R,WE:()=>er,E_:()=>el,RF:()=>z,mW:()=>Z,c9:()=>J,gY:()=>ex,tA:()=>en,kn:()=>ed,yZ:()=>T,qO:()=>q});var l=s(95155),a=s(12115),r=s(35497),i=s(5772),n=s(50871);function o({storageKey:e,changeEvent:t,itemField:s,normalize:l=e=>e,defaultName:a=e=>e}){let r=()=>{try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");if(!Array.isArray(t))return[];return t.filter(e=>e?.name&&e?.[s])}catch{return[]}},i=s=>{window.localStorage.setItem(e,JSON.stringify(s)),window.dispatchEvent(new CustomEvent(t))};return{read:r,subscribe:e=>(window.addEventListener(t,e),()=>window.removeEventListener(t,e)),upsert:(e,t)=>{let n=l(e);if(!n)return null;let o=r(),d=o.find(e=>l(e[s])===n);if(d&&!t)return d.name;let c=(t||a(n)).trim();return c?(i([...o.filter(e=>e.name!==c&&l(e[s])!==n),{name:c,[s]:n}].sort((e,t)=>e.name.localeCompare(t.name))),c):null},remove:e=>i(r().filter(t=>t.name!==e))}}let d=e=>(e||"").replace(/\/+$/,""),c=o({storageKey:"9router.cliToolEndpointPresets",changeEvent:"9router:endpoint-presets-changed",itemField:"baseUrl",normalize:d,defaultName:e=>{try{return new URL(e).host}catch{return e}}}),m=o({storageKey:"9router.cliToolApiKeyPresets",changeEvent:"9router:api-key-presets-changed",itemField:"key"}),x=c.read,u=c.subscribe,p=c.upsert,h=c.remove,g=m.read,f=m.subscribe,y=m.upsert,b=m.remove;function j(e,{tunnelPublicUrl:t,tailscaleUrl:s,cloudUrl:l}={}){let a=d(e);return!a||[`http://127.0.0.1:${n.h0.appPort}`,t,s,l].filter(Boolean).flatMap(e=>[d(e),`${d(e)}/v1`]).includes(a)?null:p(a)}let v="__custom__",N="__save__",w=e=>{let t=(e||"").replace(/\/+$/,"");return t?/\/v1$/.test(t)?t:`${t}/v1`:""};function k({value:e,onChange:t,requiresExternalUrl:s=!1,tunnelEnabled:r=!1,tunnelPublicUrl:i="",tailscaleEnabled:o=!1,tailscaleUrl:c="",cloudEnabled:m=!1,cloudUrl:g="",withV1:f=!0,currentUrl:y=""}){let[b,j]=(0,a.useState)([]),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(""),[A,O]=(0,a.useState)(""),M=(0,a.useRef)(!1),$=(0,a.useRef)("");(0,a.useEffect)(()=>{let e=()=>{let e=x();j(e),E(t=>{if(t!==v)return t;let s=d($.current);if(!s)return t;let l=e.find(e=>{let t=d(e.baseUrl);return t===s||t===w(s)});return l?`saved:${l.name}`:t})};return e(),_(!0),u(e)},[]);let U=(0,a.useMemo)(()=>(({requiresExternalUrl:e,tunnelEnabled:t,tunnelPublicUrl:s,tailscaleEnabled:l,tailscaleUrl:a,cloudEnabled:r,cloudUrl:i,savedPresets:o,withV1:d})=>{let c=[],m=e=>d?w(e):(e||"").replace(/\/+$/,"");if(!e){let e=m(`http://127.0.0.1:${n.h0.appPort}`);c.push({value:"local",label:e,url:e})}if(t&&s){let e=m(s);c.push({value:"tunnel",label:e,url:e})}if(l&&a){let e=m(a);c.push({value:"tailscale",label:e,url:e})}if(r&&i){let e=m(i);c.push({value:"cloud",label:e,url:e})}return o.forEach(e=>{c.push({value:`saved:${e.name}`,label:e.baseUrl,url:e.baseUrl,saved:!0})}),c.push({value:v,label:"Custom URL...",url:""}),c})({requiresExternalUrl:s,tunnelEnabled:r,tunnelPublicUrl:i,tailscaleEnabled:o,tailscaleUrl:c,cloudEnabled:m,cloudUrl:g,savedPresets:b,withV1:f}),[s,r,i,o,c,m,g,b,f]);(0,a.useEffect)(()=>{if(M.current||!C||0===U.length)return;M.current=!0;let e=d(y),s=(e?U.find(t=>t.saved&&d(t.url)===e):null)||U.find(e=>e.value!==v);s?(E(s.value),t(s.url)):E(v)},[C,U,t,y]);let P=S.startsWith("saved:"),I=S===v,R=I&&(A||"").trim().length>0;return(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("select",{value:S,onChange:s=>{let l=s.target.value;if(l===N){let t=(e||"").trim();if(!t)return;let s=t;try{s=new URL(t).host}catch{}let l=window.prompt("Save endpoint as:",s),a=l?.trim()?p(t,l.trim()):null;a&&E(`saved:${a}`);return}if(E(l),l===v){O(""),t("");return}let a=U.find(e=>e.value===l);a&&t(a.url)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[U.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value)),R&&(0,l.jsx)("option",{value:N,children:"+ Save current as..."})]}),P&&(0,l.jsx)("button",{type:"button",onClick:()=>{if(!S.startsWith("saved:"))return;h(S.slice(6)),O("");let e=U.find(e=>e.value!==v&&e.value!==S);e?(E(e.value),t(e.url)):(E(v),t(""))},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved endpoint",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),I&&(0,l.jsx)("input",{type:"text",value:A,onChange:e=>{let s=e.target.value;$.current=s,O(s),t(s)},placeholder:f?"https://example.com/v1":"https://example.com",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let C="__custom__",_="__save_key__";function S({value:e,onChange:t,apiKeys:s=[],cloudEnabled:r=!1,className:i=""}){let[n,o]=(0,a.useState)([]),[d,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=()=>o(g());return e(),f(e)},[]);let u=(0,a.useMemo)(()=>[...s.map(e=>({value:e.key,label:e.key})),...n.map(e=>({value:`saved:${e.name}`,label:e.key,url:e.key,saved:!0})),{value:C,label:"Custom...",url:""}],[s,n]),p=e?u.find(t=>t.value===e||t.url===e):null,h=p?p.value:d||e?C:u[0]?.value??C,j=d?m:e||"",v="string"==typeof h&&h.startsWith("saved:"),N=h===C,w=N&&(e||"").trim().length>0&&!s.some(t=>t.key===e);return 0!==s.length||0!==n.length||d||e?(0,l.jsxs)("div",{className:`flex flex-col gap-1.5 ${i}`,children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("select",{value:h,onChange:s=>{let l=s.target.value;if(l===_)return void y((e||"").trim());if(l===C){c(!0),x(""),t("");return}c(!1),x("");let a=u.find(e=>e.value===l);a&&t(a.url??a.value)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[u.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value)),w&&(0,l.jsx)("option",{value:_,children:"+ Save current as..."})]}),v&&(0,l.jsx)("button",{type:"button",onClick:()=>{if(!v)return;b(h.slice(6)),c(!1),x("");let e=u.find(e=>e.value!==C&&e.value!==h);t(e?e.url??e.value:"")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),N&&(0,l.jsx)("input",{type:"text",value:j,onChange:e=>{let s=e.target.value;c(!0),x(s),t(s)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]}):(0,l.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${i}`,children:r?"No API keys - Create one in Keys page":"sk_9router (default)"})}let E=e=>(e||"").replace(/\/+$/,"");function A(e,t={}){if(!e)return!1;let s=E(e),{tunnelPublicUrl:l,tailscaleUrl:a,cloudUrl:r}=t;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(s)||l&&s.startsWith(E(l))||a&&s.startsWith(E(a))||r&&s.startsWith(E(r)))}let O=/\[1m\](?=-review$|$)/i,M=s(41463).env.NEXT_PUBLIC_CLOUD_URL,$=[{label:"Default",value:""},{label:"200K",value:"198000"},{label:"300K",value:"298000"},{label:"500K",value:"498000"},{label:"700K",value:"698000"}];function U({tool:e,isExpanded:t,onToggle:s,activeProviders:n,modelMappings:o,onModelMappingChange:d,baseUrl:c,hasActiveProviders:m,apiKeys:x,cloudEnabled:u,initialStatus:p,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y}){let b,v,N,[w,C]=(0,a.useState)(p||null),[_,E]=(0,a.useState)(!1),[P,I]=(0,a.useState)(!1),[R,T]=(0,a.useState)(!1),[D,z]=(0,a.useState)(null),[L,K]=(0,a.useState)(!1),[F,q]=(0,a.useState)(!1),[B,H]=(0,a.useState)(null),[W,G]=(0,a.useState)(""),[J,V]=(0,a.useState)({}),[Y,Z]=(0,a.useState)(!1),[Q,X]=(0,a.useState)(""),[ee,et]=(0,a.useState)(!1),[es,el]=(0,a.useState)(!1),[ea,er]=(0,a.useState)(""),[ei,en]=(0,a.useState)(!1),eo=(0,a.useRef)(!1),ed=w?.settings?.env?.ANTHROPIC_BASE_URL||"",ec=(()=>{if(!w?.installed)return null;let e=w.settings?.env?.ANTHROPIC_BASE_URL;return e?A(e,{tunnelPublicUrl:g,tailscaleUrl:y,cloudUrl:u?M:null})?"configured":"other":"not_configured"})();(0,a.useEffect)(()=>{x?.length>0&&!W&&G(x[0].key)},[x,W]),(0,a.useEffect)(()=>{p&&(C(p),el(!!p.exaMcpEnabled))},[p]),(0,a.useEffect)(()=>{er(w?.settings?.env?.CLAUDE_CODE_AUTO_COMPACT_WINDOW||"")},[w?.settings?.env?.CLAUDE_CODE_AUTO_COMPACT_WINDOW]),(0,a.useEffect)(()=>{let t=w?.settings?.env;t&&en(e.defaultModels.some(e=>t[e.envKey]?.endsWith("[1m]")))},[w?.settings?.env,e.defaultModels]),(0,a.useEffect)(()=>{t&&(w||eu(),ex())},[t]),(0,a.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{et(!!e.ccFilterNaming)}).catch(()=>{})},[]);let em=async e=>{let t=e.target.checked;et(t),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:t})}).catch(()=>{})},ex=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&V(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(w?.installed&&!eo.current){eo.current=!0;let t=w.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&d(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&G(s)}},[w,x,e.defaultModels,d]);let eu=async()=>{E(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();C(t),el(!!t.exaMcpEnabled)}catch(e){C({installed:!1,error:e.message})}finally{E(!1)}},ep=()=>{let e=Q||c;return e.endsWith("/v1")?e:`${e}/v1`},eh=async()=>{I(!0),z(null);try{let t={ANTHROPIC_BASE_URL:ep()},s=W?.trim()||(x?.length>0?x[0].key:null)||(u?null:"sk_9router");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=o[e.alias];s&&e.envKey&&(t[e.envKey]=s)}),ea&&(t.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ea);let l=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t,exaMcpEnabled:es,autoCompactWindow:ea})}),a=await l.json();l.ok?(j(ep(),{tunnelPublicUrl:g,tailscaleUrl:y}),z({type:"success",text:"Settings applied successfully!"}),C(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t},exaMcpEnabled:es}))):z({type:"error",text:a.error||"Failed to apply settings"})}catch(e){z({type:"error",text:e.message})}finally{I(!1)}},eg=async()=>{T(!0),z(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(z({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>d(e.alias,e.defaultValue||"")),G(""),el(!1),er(""),en(!1)):z({type:"error",text:s.error||"Failed to reset settings"})}catch(e){z({type:"error",text:e.message})}finally{T(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/claude.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ec&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[_&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude CLI..."})]}),!_&&w&&!w.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>Z(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>K(!L),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!_&&w?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(k,{value:Q||((b=Q||c).endsWith("/v1")?b:`${b}/v1`),onChange:X,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,currentUrl:ed})]}),w?.settings?.env?.ANTHROPIC_BASE_URL&&(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:w.settings.env.ANTHROPIC_BASE_URL})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(S,{value:W,onChange:G,apiKeys:x,cloudEnabled:u})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:o[e.alias]||"",onChange:t=>d(e.alias,t.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),o[e.alias]&&(0,l.jsx)("button",{onClick:()=>d(e.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>{H(e.alias),q(!0)},disabled:!m,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},e.alias)),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Auto-compact"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("select",{value:ea,onChange:e=>er(e.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:$.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.label))})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"1M context"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:t=>{var s;en(s=t.target.checked),e.defaultModels.forEach(e=>{let t=o[e.alias];t&&d(e.alias,((e,t)=>{let{model:s}=function(e){if("string"!=typeof e)return{model:e,contextMarker:null};let t=e.trim(),s=t.match(O);return s?{model:t.replace(O,"").trim(),contextMarker:s[0].slice(1,-1).toLowerCase()}:{model:e,contextMarker:null}}(e);return t?`${s}[1m]`:s})(t,s))})},className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Append [1m] to the model name"}),(0,l.jsx)(r.m_,{text:"Claude Code otherwise assumes a 200K window, which clamps the auto-compact window above. Applied to every mapped model — only enable it for models that really accept 1M.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:ee,onChange:em,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,l.jsx)(r.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Web Search"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:es,onChange:e=>el(e.target.checked),className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"Exa MCP"}),(0,l.jsx)(r.m_,{text:"Injects Exa MCP into ~/.claude.json so non-Claude models gain web search. Restart Claude Code after Apply.",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),D&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===D.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===D.type?"check_circle":"error"}),(0,l.jsx)("span",{children:D.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:eh,disabled:!m,loading:P,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:eg,disabled:!w?.has9Router,loading:R,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>Z(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),F&&(0,l.jsx)(r.rq,{isOpen:F,onClose:()=>q(!1),onSelect:e=>{B&&d(B,e.value)},selectedModel:B?o[B]:null,activeProviders:n,modelAliases:J,title:`Select model for ${B}`}),(0,l.jsx)(r.uR,{isOpen:Y,onClose:()=>Z(!1),title:"Claude CLI - Manual Configuration",configs:(v=W&&W.trim()?W:u?"<API_KEY_FROM_DASHBOARD>":"sk_9router",N={ANTHROPIC_BASE_URL:ep(),ANTHROPIC_AUTH_TOKEN:v},e.defaultModels.forEach(e=>{let t=o[e.alias];t&&e.envKey&&(N[e.envKey]=t)}),ea&&(N.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ea),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:N},null,2)}])})]})}function P({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:x,tunnelPublicUrl:u,tailscaleEnabled:p,tailscaleUrl:h}){let g,f,y,[b,v]=(0,a.useState)(m||null),[N,w]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[E,O]=(0,a.useState)(!1),[M,$]=(0,a.useState)(null),[U,I]=(0,a.useState)(!1),[R,T]=(0,a.useState)(""),[D,z]=(0,a.useState)(""),[L,K]=(0,a.useState)(""),[F,q]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),[W,G]=(0,a.useState)({}),[J,V]=(0,a.useState)(!1),[Y,Z]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!R&&T(o[0].key)},[o,R]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&(b||es(),Q())},[t]);let Q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&G(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(b?.config){let e=b.config.match(/^model\s*=\s*"([^"]+)"/m);e&&z(e[1]);let t=b.config.match(/^default_subagent_model\s*=\s*"([^"]+)"/m);t&&K(t[1])}},[b]);let X=(g=b?.config?.match(/base_url\s*=\s*"([^"]+)"/))?g[1]:"",ee=b?.installed?b.config?A(X,{tunnelPublicUrl:u,tailscaleUrl:h})?"configured":"other":"not_configured":null,et=()=>{let e=Y||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},es=async()=>{w(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{w(!1)}},el=async()=>{_(!0),$(null);try{let e=R&&R.trim()||c?R:"sk_9router",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:et(),apiKey:e,model:D,subagentModel:L||D})}),s=await t.json();t.ok?(j(et(),{tunnelPublicUrl:u,tailscaleUrl:h}),$({type:"success",text:"Settings applied successfully!"}),es()):$({type:"error",text:s.error||"Failed to apply settings"})}catch(e){$({type:"error",text:e.message})}finally{_(!1)}},ea=async()=>{O(!0),$(null);try{let e=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),t=await e.json();e.ok?($({type:"success",text:"Settings reset successfully!"}),z(""),K(""),es()):$({type:"error",text:t.error||"Failed to reset settings"})}catch(e){$({type:"error",text:e.message})}finally{O(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/codex.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ee&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[N&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Codex CLI..."})]}),!N&&b&&!b.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>I(!U),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:U?"expand_less":"help"}),U?"Hide":"How to Install"]})]})]}),U&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,l.jsx)("div",{className:"pt-2 border-t border-border",children:(0,l.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex reads custom providers from ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/config.toml"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!N&&b?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(k,{value:Y||Y||`${n}/v1`,onChange:Z,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:x,tunnelPublicUrl:u,tailscaleEnabled:p,tailscaleUrl:h,currentUrl:X})]}),b?.config&&(X?(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:X})]}):null),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(S,{value:R,onChange:T,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:D,onChange:e=>z(e.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),D&&(0,l.jsx)("button",{onClick:()=>z(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>q(!0),disabled:!d?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:L,onChange:e=>K(e.target.value),placeholder:D||"provider/model-id (defaults to main model)",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),L&&(0,l.jsx)("button",{onClick:()=>K(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>H(!0),disabled:!d?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),M&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===M.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===M.type?"check_circle":"error"}),(0,l.jsx)("span",{children:M.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:el,disabled:!R&&c&&o.length>0||!D,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:ea,disabled:E,loading:E,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),F&&(0,l.jsx)(r.rq,{isOpen:F,onClose:()=>q(!1),onSelect:e=>{z(e.value),L||K(e.value),q(!1)},selectedModel:D,activeProviders:d,modelAliases:W,title:"Select Model for Codex"}),B&&(0,l.jsx)(r.rq,{isOpen:B,onClose:()=>H(!1),onSelect:e=>{K(e.value),H(!1)},selectedModel:L,activeProviders:d,modelAliases:W,title:"Select Subagent Model for Codex"}),(0,l.jsx)(r.uR,{isOpen:J,onClose:()=>V(!1),title:"Codex CLI - Manual Configuration",configs:(f=R&&R.trim()?R:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",y=L||D,[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
41
41
  model = "${D}"
42
42
  model_provider = "9router"
43
43
 
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[705],{31474:(t,e,n)=>{n.d(e,{cn:()=>i});function i(...t){return t.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},62630:(t,e,n)=>{n.d(e,{ad:()=>a,gH:()=>u});let i={codex:{"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5}},devin:{"claude-opus-5":{input:0,output:0,cached:0},"claude-opus-5-fast":{input:0,output:0,cached:0},"claude-fable-5":{input:0,output:0,cached:0},"claude-sonnet-5":{input:0,output:0,cached:0},"claude-opus-4-7":{input:0,output:0,cached:0},"claude-opus-4-7-fast":{input:0,output:0,cached:0},"claude-opus-4-8":{input:0,output:0,cached:0},"claude-opus-4-8-fast":{input:0,output:0,cached:0},"claude-haiku-4-5":{input:0,output:0,cached:0},"gpt-5-2":{input:0,output:0,cached:0},"gpt-5-3-codex":{input:0,output:0,cached:0},"gpt-5-3-codex-fast":{input:0,output:0,cached:0},"gpt-5-4":{input:0,output:0,cached:0},"gpt-5-4-fast":{input:0,output:0,cached:0},"gpt-5-4-mini":{input:0,output:0,cached:0},"gpt-5-5":{input:0,output:0,cached:0},"gpt-5-5-fast":{input:0,output:0,cached:0},"gpt-5-6-luna":{input:0,output:0,cached:0},"gpt-5-6-luna-fast":{input:0,output:0,cached:0},"gpt-5-6-sol":{input:0,output:0,cached:0},"gpt-5-6-sol-fast":{input:0,output:0,cached:0},"gpt-5-6-terra":{input:0,output:0,cached:0},"gpt-5-6-terra-fast":{input:0,output:0,cached:0},"kimi-k3":{input:0,output:0,cached:0},"grok-4-5":{input:0,output:0,cached:0},"grok-4-6":{input:0,output:0,cached:0},inkling:{input:0,output:0,cached:0},"gemini-3-1-pro":{input:0,output:0,cached:0},"gemini-3-5-flash":{input:0,output:0,cached:0},"gemini-3-6-flash":{input:0,output:0,cached:0},"gemini-3-flash":{input:0,output:0,cached:0},"gemini-3-7-flash":{input:0,output:0,cached:0},"glm-5-2-1m":{input:0,output:0,cached:0},"deepseek-v4-flash":{input:0,output:0,cached:0},"deepseek-v4-pro":{input:0,output:0,cached:0},"nemotron-3-ultra":{input:0,output:0,cached:0}},gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}};function u(t,e){return RegExp("^"+t.split("*").map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(e)}function a(){return i}},84588:(t,e,n)=>{n.d(e,{default:()=>a});var i=n(95155),u=n(31474);function a({children:t,title:e,subtitle:n,icon:o,action:p,padding:c="md",hover:r=!1,elev:s=!1,className:d,...g}){return(0,i.jsxs)("div",{className:(0,u.cn)("bg-surface border border-border-subtle",s?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",r&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[c],d),...g,children:[(e||p)&&(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,i.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:o})}),(0,i.jsxs)("div",{children:[e&&(0,i.jsx)("h3",{className:"text-text-main font-semibold",children:e}),n&&(0,i.jsx)("p",{className:"text-sm text-text-muted",children:n})]})]}),p]}),t]})}a.Section=function({children:t,className:e,...n}){return(0,i.jsx)("div",{className:(0,u.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",e),...n,children:t})},a.Row=function({children:t,className:e,...n}){return(0,i.jsx)("div",{className:(0,u.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",e),...n,children:t})},a.ListItem=function({children:t,actions:e,className:n,...a}){return(0,i.jsxs)("div",{className:(0,u.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",n),...a,children:[(0,i.jsx)("div",{className:"flex-1 min-w-0",children:t}),e&&(0,i.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:e})]})}}}]);
@@ -0,0 +1,27 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{67094:(e,t,i)=>{Promise.resolve().then(i.bind(i,80873))},70217:(e,t,i)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}i.d(t,{g:()=>s})},80873:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>G});var s=i(95155),a=i(12115),l=i(73321),r=i(98500),n=i.n(r),o=i(5772),d=i(8247),c=i(35497),m=i(88105),p=i(28777),u=i(2378),x=i(67899),h=i(62630);i(67468);let f=["none","low","medium","high"],g=["none","thinking"],y=["none","low","medium","high","max"],v={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":y,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:y,deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:g,hunyuan:f,step:f},b=["none","minimal","low","medium","high","xhigh","max"],j=[{pattern:"*claude-sonnet-5-5*",levels:["none","low","medium","high","xhigh","max"]},{pattern:"*claude-sonnet-5*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codex",pattern:"*gpt-6*",levels:b},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:b},{provider:"devin",pattern:"swe-2*",levels:["medium","high","max"]},{provider:"devin",pattern:"swe-1-7*",levels:["medium","max"]},{provider:"devin",pattern:"claude-opus-5*",levels:["low","medium","high","xhigh","max"]},{provider:"devin",pattern:"claude-fable-5*",levels:["low","medium","high","xhigh","max"]},{provider:"devin",pattern:"claude-sonnet-5*",levels:["low","medium","high","xhigh","max"]},{provider:"devin",pattern:"claude-opus-4-7*",levels:["low","medium","high","xhigh","max"]},{provider:"devin",pattern:"claude-opus-4-8*",levels:["low","medium","high","xhigh","max"]},{provider:"devin",pattern:"gpt-5-2*",levels:["none","low","medium","high","xhigh"]},{provider:"devin",pattern:"gpt-5-3-codex*",levels:["low","medium","high","xhigh"]},{provider:"devin",pattern:"gpt-5-4-mini*",levels:["low","medium","high","xhigh"]},{provider:"devin",pattern:"gpt-5-4*",levels:["none","low","medium","high","xhigh"]},{provider:"devin",pattern:"gpt-5-5*",levels:["none","low","medium","high","xhigh"]},{provider:"devin",pattern:"gpt-5-6-luna*",levels:["none","low","medium","high","xhigh","max"]},{provider:"devin",pattern:"gpt-5-6-sol*",levels:["none","low","medium","high","xhigh","max"]},{provider:"devin",pattern:"gpt-5-6-terra*",levels:["none","low","medium","high","xhigh","max"]},{provider:"devin",pattern:"kimi-k3*",levels:["low","high","max"]},{provider:"devin",pattern:"glm-5-2-1m*",levels:["none","high","xhigh"]},{provider:"devin",pattern:"glm-5-2*",levels:["high","xhigh"]},{provider:"devin",pattern:"grok-4-5*",levels:["low","medium","high"]},{provider:"devin",pattern:"grok-4-6*",levels:["low","medium","high","xhigh"]},{provider:"devin",pattern:"inkling*",levels:["none","low","medium","high","xhigh","max"]},{provider:"devin",pattern:"gemini-3-1-pro*",levels:["low","high"]},{provider:"devin",pattern:"gemini-3-5-flash*",levels:["minimal","low","medium","high"]},{provider:"devin",pattern:"gemini-3-6-flash*",levels:["minimal","low","medium","high"]},{provider:"devin",pattern:"gemini-3-7-flash*",levels:["minimal","low","medium","high"]},{provider:"devin",pattern:"gemini-3-flash*",levels:["minimal","low","medium","high"]},{provider:"devin",pattern:"deepseek-v4-*",levels:["low","high","max"]},{provider:"devin",pattern:"nemotron-3-ultra*",levels:["none","medium","high"]},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function w(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let i=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!i)return null;let[,s,a]=i,l=Number(s),r=void 0===a?null:Number(a);return l<4||4===l&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let i="codex"===e||"cx"===e,s=i?"codex":e,a=(0,x.nl)(s,t);if(!a.reasoning)return null;let l=i?String(t||"").replace(/\[1m\]/ig,"").replace(/\([^()]+\)/g,"").replace(/-review$/i,"").trim():String(t||"").replace(/\([^()]+\)\s*$/,""),r=i?(0,u.SM)("cx").find(e=>e.id===l):null,n=j.find(e=>(!e.provider||e.provider===s)&&(0,h.gH)(e.pattern,t)),o=r?.thinkingLevels||n?.levels||v[a.thinkingFormat]||f;return!1===a.thinkingCanDisable&&(o=o.filter(e=>"none"!==e)),o}var k=i(11059),N=i(929),C=i(73006);let S=new Map;async function A(e){if(!e?.url||!e?.type)return[];let t=S.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),i=await fetch(`/api/providers/suggested-models?${t}`);if(!i.ok)return[];let s=(await i.json()).data??[];return S.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function T({customModels:e=[],modelAliases:t={},providerAlias:i,builtInModels:s=[],type:a="llm",includeLegacyAliases:l=!0}){let r=new Set(s.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==i)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||r.has(t.id))continue;let s=`${i}/${t.id}`;n.has(s)||(n.add(s),o.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e}))}if(!l)return o;let d=`${i}/`;for(let[e,i]of Object.entries(t||{})){if("string"!=typeof i||!i.startsWith(d))continue;let t=i.slice(d.length);!t||r.has(t)||n.has(i)||(n.add(i),o.push({id:t,alias:e,fullModel:i,source:"legacyAlias",type:a||"llm"}))}return o}var $=i(14051),O=i.n($);function P({model:e,fullModel:t,alias:i,copied:a,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:f}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,s.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,s.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function E({modelId:e,fullModel:t,copied:i,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function I({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u}){let[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),[b,j]=(0,a.useState)(null),[w,k]=(0,a.useState)({}),N=async t=>{if(!b){j(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();k(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=T({customModels:l,modelAliases:i,providerAlias:e,type:"llm"}),S=async()=>{if(!x.trim()||f)return;let e=x.trim();if(C.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await d(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},A=async()=>{if(y)return;let e=p.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||"Failed to import models");let s=i.models||[];if(0===s.length)return void alert("No models returned from /models.");let a=0;for(let e of s){let t=e.id||e.name||e.model;t&&(C.some(e=>e.id===t)||(await d(t),a+=1))}0===a&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},$=p.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:x,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:u?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:S,disabled:!x.trim()||f,children:f?"Adding...":"Add"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||y,children:y?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:i,alias:a,source:l})=>(0,s.jsx)(E,{modelId:i,fullModel:`${t}/${i}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(i):o(a),onTest:p.length>0?()=>N(i):void 0,testStatus:w[i],isTesting:b===i},`${l}-${e}/${i}`))})]})}P.propTypes={model:O().shape({id:O().string.isRequired}).isRequired,fullModel:O().string.isRequired,alias:O().string,copied:O().string,onCopy:O().func.isRequired,testStatus:O().oneOf(["ok","error"]),isCustom:O().bool,isFree:O().bool,onDeleteAlias:O().func,onTest:O().func,isTesting:O().bool,onDisable:O().func,caps:O().object,thinkingSuffix:O().string},O().string.isRequired,O().string.isRequired,O().string,O().func.isRequired,O().func.isRequired,O().func,O().oneOf(["ok","error"]),O().bool,O().string.isRequired,O().object.isRequired,O().arrayOf(O().object),O().string,O().func.isRequired,O().func.isRequired,O().func.isRequired,O().func.isRequired,I.propTypes={providerStorageAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,modelAliases:O().object.isRequired,customModels:O().arrayOf(O().object),copied:O().string,onCopy:O().func.isRequired,onDeleteAlias:O().func.isRequired,onAddCustomModel:O().func.isRequired,onDeleteCustomModel:O().func.isRequired,connections:O().arrayOf(O().shape({id:O().string,isActive:O().bool})).isRequired,isAnthropic:O().bool};var D=i(70217);function R({until:e}){let[t,i]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let s=Math.floor(t/1e3);if(s<60)i(`${s}s`);else if(s<3600)i(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);i(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function _({connection:e,proxyPools:t,isOAuth:i,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:d,onUpdateProxy:m,onEdit:p,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),b=(0,a.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?j.get(w):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!w||N,S=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",T="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);T=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{T=t}}let $=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O="default";k?.isActive===!0?O="success":(w||N)&&(O="error"),(0,a.useEffect)(()=>{if(!f)return;let e=e=>{b.current&&!b.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let P=async e=>{v(!0);try{await m("__none__"===e?null:e)}finally{v(!1),g(!1)}},E=e.authType||(i?"oauth":"apikey"),I="oauth"===E,q="cookie"===E,z=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(I?"OAuth Account":q?"Cookie Account":"API Key"),U=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[K,J]=(0,a.useState)(!1),M=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{J(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let i=M?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[M]);let F="unavailable"!==e.testStatus||K?e.testStatus:"active",L=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:q?"cookie":I?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:z}),U&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:U}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(c.Ex,{variant:(0,D.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,s.jsx)(c.Ex,{variant:"default",size:"sm",children:I?"OAuth":q?"Cookie":"API Key"}),C&&(0,s.jsx)(c.Ex,{variant:O,size:"sm",children:"Proxy"}),K&&!1!==e.isActive&&(0,s.jsx)(R,{until:M}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),L()&&(0,s.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:L()})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),T&&(0,s.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:T}),$&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:$,children:["no_proxy: ",$]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:b,children:[(0,s.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,s.jsx)(c.m_,{text:A,children:(0,s.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}R.propTypes={until:O().string.isRequired},_.propTypes={connection:O().shape({id:O().string,name:O().string,email:O().string,displayName:O().string,modelLockUntil:O().string,testStatus:O().string,isActive:O().bool,lastError:O().string,priority:O().number,globalPriority:O().number}).isRequired,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string,proxyUrl:O().string,noProxy:O().string,isActive:O().bool})),isOAuth:O().bool.isRequired,isFirst:O().bool.isRequired,isLast:O().bool.isRequired,onMoveUp:O().func.isRequired,onMoveDown:O().func.isRequired,onToggleActive:O().func.isRequired,onUpdateProxy:O().func,onEdit:O().func.isRequired,onDelete:O().func.isRequired,oneByOneStatus:O().shape({state:O().string,error:O().string}),autoPing:O().shape({on:O().bool,onToggle:O().func,provider:O().string})};let q=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function z({isOpen:e,provider:t,providerName:i,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:d,proxyPools:p,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",v="ollama-local"===t,b="cookie"===n,j="xai"===t&&!b,w=b?"Cookie Value":"qoder"===t||"qoder-cn"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=m.Q2?.[t]?.regions||null,S=m.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[A,T]=(0,a.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[$,O]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,E]=(0,a.useState)({accountId:""}),[I,D]=(0,a.useState)(S),[R,_]=(0,a.useState)(!1),[U,K]=(0,a.useState)(null),[J,M]=(0,a.useState)(!1),F=N?`name1|sk-key1|acc123456
4
+ name2|sk-key2|def789012
5
+ sk-key-only-auto-named`:"qoder"===t||"qoder-cn"===t?`name1|pt-xxxxx
6
+ name2|pt-yyyyy
7
+ pt-only-auto-named`:q,[L,W]=(0,a.useState)("single"),[B,H]=(0,a.useState)(""),[G,Q]=(0,a.useState)(null),V=()=>v&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:k?{azureEndpoint:$.azureEndpoint,apiVersion:$.apiVersion,deployment:$.deployment,organization:$.organization}:N?{accountId:P.accountId}:C&&I?{region:I}:void 0,Z=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})}),i=await e.json();K(i.valid?"success":"failed")}catch{K("failed")}finally{_(!1)}},X=async()=>{if(t&&(v||A.apiKey)&&(v||A.name)&&(!l||A.defaultModel.trim())){M(!0);try{let e=!1;try{_(!0),K(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})});e=!!(await i.json()).valid,K(e?"success":"failed")}catch{K("failed")}finally{_(!1)}await h({name:A.name||(v?"Ollama Local":""),apiKey:A.apiKey,defaultModel:l?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===y?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{M(!1)}}},Y=async()=>{let e=B.split("\n");if(!e.length)return;let i=function(e,t,i={}){let{isCloudflareAi:s=!1}=i,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,i="string"==typeof t?t.trim():"";if(!i)continue;let r=function(e,t={}){let{isCloudflareAi:i=!1}=t,s=e.split("|");if(i&&s.length>=3){let e=s[0].trim();return{baseName:e||"Key",apiKey:s.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:s[s.length-1].trim()}}}return s.length>=2?{baseName:s[0].trim()||"Key",apiKey:s.slice(1).join("|").trim()}:{baseName:"Key",apiKey:s[0].trim()}}(i,{isCloudflareAi:s});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,a.has(e.toLowerCase());)o+=1;a.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!i.length)return;M(!0),Q(null);let s=0,a=0;for(let e of i)try{let i=!1;try{let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});i=!!(await s.json().catch(()=>({}))).valid}catch{i=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:i?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?s++:a++}catch{a++}M(!1),Q({success:s,failed:a}),s>0&&f&&f()};return t?(0,s.jsx)(c.aF,{isOpen:e,title:`Add ${i||t} ${w}`,onClose:g,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{W("single"),Q(null)},children:"Single"}),(0,s.jsx)(c.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{W("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t||"qoder-cn"===t?(0,s.jsxs)(s.Fragment,{children:["One PAT per line. Format: ",(0,s.jsx)("code",{children:"name|pt-..."})," or just ",(0,s.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:F,value:B,onChange:e=>H(e.target.value)}),G&&(0,s.jsxs)("div",{className:`text-sm font-medium ${G.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",G.success," added",G.failed>0?`, ✗ ${G.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:Y,fullWidth:!0,disabled:J||!B.trim(),children:J?"Adding...":"Add All Keys"}),(0,s.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.pd,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:v?"Ollama Local":"Production Key"}),v&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(c.$n,{onClick:Z,disabled:R||J,variant:"secondary",children:R?"Checking...":"Check"})})]}),!v&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.pd,{label:w,type:b?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t||"qoder-cn"===t?"pt-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(c.$n,{onClick:Z,disabled:!A.apiKey||R||J,variant:"secondary",children:R?"Checking...":"Check"})})]}),j&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,s.jsx)(c.l6,{label:"Region",value:I,onChange:e=>D(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,s.jsx)(c.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>T({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),v&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,s.jsx)(c.Ex,{variant:"success"===U?"success":"error",children:"success"===U?"Valid":"Invalid"}),u&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(c.pd,{label:"Account ID",value:P.accountId,onChange:e=>E({...P,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(c.pd,{label:"Azure Endpoint",value:$.azureEndpoint,onChange:e=>O({...$,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(c.pd,{label:"Deployment Name",value:$.deployment,onChange:e=>O({...$,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(c.pd,{label:"API Version",value:$.apiVersion,onChange:e=>O({...$,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(c.pd,{label:"Organization",value:$.organization,onChange:e=>O({...$,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(c.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(c.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:X,fullWidth:!0,disabled:J||!v&&(!A.name||!A.apiKey)||l&&!A.defaultModel.trim()||k&&(!$.azureEndpoint||!$.deployment||!$.organization)||N&&!P.accountId,children:J?"Saving...":"Save"}),(0,s.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function U({isOpen:e,node:t,onSave:i,onClose:l,isAnthropic:r}){let[n,o]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let b=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await i(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{g(!1)}};return t?(0,s.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,s.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,s.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:b,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,s.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}z.propTypes={isOpen:O().bool.isRequired,provider:O().string,providerName:O().string,isCompatible:O().bool,isAnthropic:O().bool,authType:O().string,authHint:O().string,website:O().string,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string})),error:O().string,existingNames:O().arrayOf(O().string),onSave:O().func.isRequired,onBulkDone:O().func,onClose:O().func.isRequired},U.propTypes={isOpen:O().bool.isRequired,node:O().shape({id:O().string,name:O().string,prefix:O().string,apiType:O().string,baseUrl:O().string}),onSave:O().func.isRequired,onClose:O().func.isRequired,isAnthropic:O().bool};let K=()=>Object.fromEntries(Object.keys(p.bs).map(e=>[e,!1]));function J({isOpen:e,providerAlias:t,providerDisplayAlias:i,onSave:l,onClose:r}){let[n,o]=(0,a.useState)(""),[d,m]=(0,a.useState)(K),[u,x]=(0,a.useState)(null),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(o(""),m(K()),x(null),f(""))},[e]);let v=e=>{let i=`${t}/`;return e.startsWith(i)?e.slice(i.length):e},b=async()=>{let e=v(n.trim());if(e){x("testing"),f("");try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await i.json();x(s.ok?"ok":"error"),f(s.error||"")}catch(e){x("error"),f(e.message)}}},j=async()=>{let e=v(n.trim());if(e&&!g){y(!0);try{await l(e,d)}finally{y(!1)}}};return(0,s.jsx)(c.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),x(null),f("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===u,onClick:b,disabled:!n.trim()||"testing"===u,children:"testing"===u?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:v(n.trim())||"model-id"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(p.bs).map(([e,t])=>(0,s.jsx)(c.lM,{checked:!!d[e],onChange:t=>m(i=>({...i,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),"ok"===u&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===u&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:h||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(c.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(c.$n,{onClick:j,fullWidth:!0,size:"sm",disabled:!n.trim()||g,children:g?"Adding...":"Add Model"})]})]})})}J.propTypes={isOpen:O().bool.isRequired,providerAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,onSave:O().func.isRequired,onClose:O().func.isRequired};let M=`[
8
+ {
9
+ "accessToken": "eyJhbGc...",
10
+ "refreshToken": "rt_...",
11
+ "idToken": "eyJhbGc...",
12
+ "email": "user@example.com"
13
+ }
14
+ ]`;function F({isOpen:e,onClose:t,onSuccess:i}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(null),x=()=>{n||(r(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let s=l.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){m(`${(0,C.Tl)("Invalid JSON")}: ${e.message}`);return}let a=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!a||0===a.length)return void m((0,C.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof i&&i()}catch(e){m(e.message||(0,C.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(c.aF,{isOpen:e,title:(0,C.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,C.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:M,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,C.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,C.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,C.Tl)("Importing..."):(0,C.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,C.Tl)("Close")})]})]})})}F.propTypes={isOpen:O().bool.isRequired,onClose:O().func.isRequired,onSuccess:O().func};let L=`[
15
+ {
16
+ "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
17
+ "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
18
+ "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
19
+ "email": "account1@example.com"
20
+ },
21
+ {
22
+ "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
23
+ "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
24
+ "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
25
+ "email": "account2@example.com"
26
+ }
27
+ ]`;function W(e){let t,i=e.trim();if(!i)return[];try{t=JSON.parse(i)}catch(e){try{let e=i;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function B({isOpen:e,onClose:t,onSuccess:i}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),y=(0,a.useRef)(null),v=()=>{n||(r(""),m(""),u(null),g(null),h(!1),t())},b=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,C.Tl)("Please select valid .json files"));try{let e=[];for(let i of t){let t=await i.text(),s=W(t);Array.isArray(s)?e.push(...s):s&&e.push(s)}if(0===e.length)return void m((0,C.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,C.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),u(null);try{e=W(l)}catch(e){m(`${(0,C.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,C.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),s=await t.json();if(!t.ok)return void m(s?.error||`Request failed: ${t.status}`);u(s),s.success>0&&"function"==typeof i&&i()}catch(e){m(e.message||(0,C.Tl)("Request failed"))}finally{o(!1)}},w=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(c.aF,{isOpen:e,title:(0,C.Tl)("Bulk Add Grok CLI Accounts"),onClose:v,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,C.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,s.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{b(e.target.files),e.target&&(e.target.value="")}}),(0,s.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,C.Tl)("Upload JSON Files")})]}),(0,s.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&b(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,s.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:L,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,s.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,C.Tl)("Drop .json files here")})]})]}),f&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,s.jsxs)("span",{children:[(0,C.Tl)("Loaded")," ",f.accountsCount," ",(0,C.Tl)("account(s) from")," ",f.filesCount," ",(0,C.Tl)("file(s)")]})]}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&p.failed>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,C.Tl)("failed")]}),w.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,C.Tl)("Importing..."):(0,C.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:v,variant:"ghost",fullWidth:!0,disabled:n,children:(0,C.Tl)("Close")})]})]})})}let H={claude:"claudeAutoPing",codex:"codexAutoPing"};function G(){let e,t,i,r,u,x=(0,l.useParams)(),h=(0,l.useRouter)(),f=x.id,{getCaps:g}=(0,N.y)(),[y,v]=(0,a.useState)([]),[b,j]=(0,a.useState)(!0),[S,$]=(0,a.useState)(null),[O,E]=(0,a.useState)([]),[D,R]=(0,a.useState)(!1),[q,K]=(0,a.useState)(!1),[M,L]=(0,a.useState)(!1),[W,G]=(0,a.useState)(!1),[Q,V]=(0,a.useState)(""),[Z,X]=(0,a.useState)(!1),[Y,ee]=(0,a.useState)(!1),[et,ei]=(0,a.useState)(!1),[es,ea]=(0,a.useState)(!1),[el,er]=(0,a.useState)(!1),[en,eo]=(0,a.useState)(null),[ed,ec]=(0,a.useState)({}),[em,ep]=(0,a.useState)([]),[eu,ex]=(0,a.useState)(!1),[eh,ef]=(0,a.useState)({}),[eg,ey]=(0,a.useState)(""),[ev,eb]=(0,a.useState)(()=>new Set),[ej,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)([]),[eC,eS]=(0,a.useState)("__none__"),[eA,eT]=(0,a.useState)(!1),[e$,eO]=(0,a.useState)(null),[eP,eE]=(0,a.useState)(""),[eI,eD]=(0,a.useState)("auto"),[eR,e_]=(0,a.useState)({enabled:!1,connections:{}}),[eq,ez]=(0,a.useState)([]),[eU,eK]=(0,a.useState)([]),[eJ,eM]=(0,a.useState)(null),[eF,eL]=(0,a.useState)([]),[eW,eB]=(0,a.useState)([]),[eH,eG]=(0,a.useState)(null),[eQ,eV]=(0,a.useState)(!1),[eZ,eX]=(0,a.useState)(!1),[eY,e0]=(0,a.useState)(!1),[e1,e5]=(0,a.useState)(null),[e2,e3]=(0,a.useState)({}),[e4,e6]=(0,a.useState)(null),e7=(0,a.useRef)(!1),[e8,e9]=(0,a.useState)(!1),[te,tt]=(0,a.useState)(!1),{copied:ti,copy:ts}=(0,k.C)(),ta="ag_risk_confirmed",tl=()=>{R(!0)},tr=()=>{"antigravity"===f&&"true"!==window.localStorage.getItem(ta)?eV(!0):"xiaomi-mimo"===f?K(!0):tm?tl():(V(""),G(!0))},tn=()=>{V(""),G(!0)},to=()=>{tm?tr():tn()},td=S?{id:S.id,name:S.name||("anthropic-compatible"===S.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===S.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===S.type?"AC":"OC",apiType:S.apiType,baseUrl:S.baseUrl,type:S.type}:m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f]||m.br[f],tc=td?.authModes||[],tm=!!m.zN[f]||!!m.IS[f]||tc.includes("oauth"),tp=!!m.fg[f]||tc.includes("apikey"),tu=!!m.IS[f]?.noAuth,tx=(0,p.KC)(f),th=("cursor"===f||"zed"===f)&&eU.length>0?eU:tx,tf=(0,m.wG)(f),tg=(0,m.mq)(f),ty=(0,m.gb)(f),tv=tg||ty,tb=!tv&&tm&&tp,tj="xai"===f?"Grok Build OAuth":"grok-cli"===f?"Grok CLI Device Login":"kimi"===f?"Kimi Coding OAuth":"OAuth",tw="xai"===f?"xAI API Key":"kimi"===f?"Kimi API Key":"qoder"===f||"qoder-cn"===f?"PAT":"API Key",tk=e=>{if(!eI||"auto"===eI)return null;let t=w(f,e);return t&&t.includes(eI)?eI:null},tN=tv?f:tf,tC=(()=>{let e=new Set,t=new Set,i=i=>{if(!i||t.has(i))return;t.add(i);let s=w(f,i);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of th)i(e.id);for(let e of eF)i(e.id);for(let e of em)e.providerAlias===tN&&"llm"===(e.kind||e.type||"llm")&&i(e.id);return e.size?["auto",...e]:null})(),tS=tv?S?.prefix||f:tf,tA=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}`,{cache:"no-store"}),t=await e.json();e.ok&&eB(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tN]),tT=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tN,ids:[e]})})).ok&&await tA()}catch(e){console.log("Error disabling model:",e)}},t$=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tA()}catch(e){console.log("Error enabling model:",e)}},tO=async e=>{e.length&&eG({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eG(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tN,ids:e})})).ok&&await tA()}catch(e){console.log("Error disabling all models:",e)}}})},tP=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}`,{method:"DELETE"})).ok&&await tA()}catch(e){console.log("Error enabling all models:",e)}},tE=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ec(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tI=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ep(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,a.useEffect)(()=>{"kilocode"===f&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eL(e.models)}).catch(()=>{})},[f]);let tD=(0,a.useCallback)(async()=>{try{let[e,t,i,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),l=await t.json(),r=await i.json(),n=s.ok?await s.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===f);v(e)}i.ok&&E(r.proxyPools||[]);let o=(n.providerStrategies||{})[f]||{};eO(o.fallbackStrategy||null),eE(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[f]||{};eD(d.mode||"auto");let c=H[f],m=c&&n[c]||{};if(e_({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===f)||null;if(!e&&tv)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===f)||null))break}$(e)}}catch(e){console.log("Error fetching connections:",e)}finally{j(!1)}},[f,tv]),tR=async e=>{try{let t=await fetch(`/api/provider-nodes/${f}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();t.ok&&($(i.node),await tD(),ea(!1))}catch(e){console.log("Error updating provider node:",e)}},t_=async(e,t)=>{try{let i=await fetch("/api/settings",{cache:"no-store"}),s=(i.ok?await i.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let l={...s};0===Object.keys(a).length?delete l[f]:l[f]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tq=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?i[f]={mode:e}:delete i[f],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:i})})}catch(e){console.log("Error saving thinking config:",e)}},tz=async e=>{let t=H[f];if(t){e_(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,a.useEffect)(()=>{tD(),tE(),tI(),tA()},[tD,tE,tI,tA]),(0,a.useEffect)(()=>{if("cursor"!==f&&"zed"!==f)return void eK([]);let e=y.find(e=>!1!==e.isActive);if(!e?.id){eK([]),"zed"===f&&eM(null);return}let t=!1;return"zed"===f&&eM(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:i})=>{if(!t){if(e&&Array.isArray(i?.models)&&i.models.length>0){eK(i.models),"zed"===f&&i?.warning&&eM(i.warning);return}"zed"===f&&(eK([]),eM(i?.warning||i?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==f||(eK([]),eM("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[f,y]),(0,a.useEffect)(()=>{let e=(m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f])?.modelsFetcher;e&&A(e).then(ez)},[f]);let tU=async(e,t,i=tf)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tE();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tK=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tE()}catch(e){console.log("Error deleting alias:",e)}},tJ=async(e,t="llm",i=tN,s)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:i,id:e,type:t,...s?{caps:s}:{}})});if(a.ok)await tI(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tM=async(e,t="llm",i=tN)=>{try{let s=new URLSearchParams({providerAlias:i,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tI(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tF=async()=>{if(e8)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,C.Tl)("Please add an active Qoder connection first"));e9(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||(0,C.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void alert((0,C.Tl)("No models returned"));let a=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let i=t.replace(/^(qoder-cn|qoder)\//,"");em.some(e=>e.providerAlias===tN&&e.id===i&&"llm"===(e.kind||e.type||"llm"))||Object.values(ed).includes(`${tN}/${i}`)||(await tJ(i,"llm",tN),a+=1)}0===a?alert((0,C.Tl)("All models already exist, no new models added")):alert((0,C.Tl)("Successfully added")+` ${a} `+(0,C.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,C.Tl)("Error fetching models")+": "+e.message)}finally{e9(!1)}},tL=async()=>{if(te)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,C.Tl)("Please add an active Cline connection first"));tt(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||(0,C.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void alert((0,C.Tl)("No models returned"));let a=0;for(let e of s){let t=e.id||e.name;t&&(em.some(e=>e.providerAlias===tN&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ed).includes(`${tN}/${t}`)||(await tJ(t,"llm",tN),a+=1))}0===a?alert((0,C.Tl)("All models already exist, no new models added")):alert((0,C.Tl)("Successfully added")+` ${a} `+(0,C.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,C.Tl)("Error fetching models")+": "+e.message)}finally{tt(!1)}},tW=async()=>{if(eZ||0===y.length)return;let e=Object.fromEntries(y.map(e=>[e.id,{state:"queued",error:null}]));e7.current=!1,eX(!0),e0(!1),e5(null),e3(e),e6({total:y.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,i=0;try{for(let e=0;e<y.length;e+=1){if(e7.current){e6({total:y.length,completed:e,passed:t,failed:i,stopped:!0});break}let s=y[e];e5(s.id),e3(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),a=await e.json(),l=!!a.valid;l?t+=1:i+=1,e3(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:a.error||null}}))}catch(e){i+=1,e3(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}e6({total:y.length,completed:e+1,passed:t,failed:i,stopped:!1}),e<y.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e5(null),eX(!1),e0(!1),e7.current=!1}},tB=async e=>{eG({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eG(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&v(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tH=()=>{tD(),R(!1)},tG=async e=>{V("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:f,...e})}),i=null;try{i=await t.json()}catch{i=null}if(t.ok){await tD(),G(!1);return}V(i?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),V("Failed to save connection")}},tQ=async e=>{try{(await fetch(`/api/providers/${en.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tD(),ei(!1))}catch(e){console.log("Error updating connection:",e)}},tV=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&v(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},tZ=async(e,t)=>{let i=[...y];[i[e],i[t]]=[i[t],i[e]],v(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tD()}},tX=y.filter(e=>ek.includes(e.id)),tY=y.length>0&&ek.length===y.length;(0,a.useEffect)(()=>{eN(e=>e.filter(e=>y.some(t=>t.id===e)))},[y]),(()=>{if(0===tX.length)return;let e=new Set(tX.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let i=O.find(e=>e.id===t);return i?.name}})();let t0=()=>{eA||er(!1)},t1=async e=>{eT(!0);try{let t=0;for(let{connectionId:i,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",i,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tD(),er(!1)}finally{eT(!1)}},t5=e=>t1(y.map(t=>({connectionId:t.id,proxyPoolId:e}))),t2=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:y.map((e,t)=>{let i;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(i=e.id,ek.includes(i)),onChange:()=>{var t;return t=e.id,void eN(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(_,{connection:e,proxyPools:O,isOAuth:tm,isFirst:0===t,isLast:t===y.length-1,onMoveUp:()=>tZ(t,t-1),onMoveDown:()=>tZ(t,t+1),onToggleActive:t=>tV(e.id,t),autoPing:H[f]&&"oauth"===e.authType?{on:!0===eR.connections[e.id],onToggle:t=>{var i;return i=e.id,void tz({...eR,connections:{...eR.connections,[i]:t}})},provider:f}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&v(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{eo(e),ei(!0)},onDelete:()=>tB(e.id),oneByOneStatus:e2[e.id]||null})})]},e.id)})}),t3=O.filter(e=>!0===e.isActive),t4=(0,s.jsx)(c.aF,{isOpen:el,onClose:t0,title:`Apply Proxy (${y.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=O.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t1(y.map((t,i)=>({connectionId:t.id,proxyPoolId:e[i%e.length].id})))},disabled:eA||0===t3.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>t5(null),disabled:eA,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),O.map(e=>(0,s.jsxs)("button",{onClick:()=>t5(e.id),disabled:eA||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eA&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(c.$n,{onClick:t0,variant:"ghost",fullWidth:!0,disabled:eA,children:"Cancel"})]})}),t6=async e=>{if(!ev.has(e)){eb(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tN}/${e}`})}),i=await t.json();ef(t=>({...t,[e]:i.ok?"ok":"error"})),ey(i.ok?"":i.error||"Model not reachable")}catch{ef(t=>({...t,[e]:"error"})),ey("Network error")}finally{eb(t=>{let i=new Set(t);return i.delete(e),i})}}};if(b)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(c.Qv,{}),(0,s.jsx)(c.Qv,{})]});if(!td)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let t7=()=>tg&&td.apiType?"responses"===td.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ty?"/providers/anthropic-m.png":(0,d.HY)(td.id);return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${td.color}15`},children:eu||!t7()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:td.color},children:td.textIcon||td.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:t7(),alt:td.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(td.id),ex(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:td.name}),(td.notice?.apiKeyUrl||td.notice?.signupUrl||td.website)&&(0,s.jsxs)("a",{href:td.notice?.apiKeyUrl||td.notice?.signupUrl||td.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),td.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[y.length," connection",1===y.length?"":"s"]})]})]})]}),td.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:td.deprecationNotice})]}),td.notice?.text&&!td.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:td.notice.text}),td.notice.apiKeyUrl&&(0,s.jsx)("a",{href:td.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tv&&S&&(0,s.jsx)(c.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ty?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ty?"Messages API":"responses"===S.apiType?"Responses API":"Chat Completions"," \xb7 ",(S.baseUrl||"").replace(/\/$/,""),"/",ty?"messages":"responses"===S.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{V(""),G(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ea(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eG({title:"Delete Compatible Node",message:`Delete this ${ty?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eG(null);try{(await fetch(`/api/provider-nodes/${f}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tu?(0,s.jsx)(c.gw,{providerId:f}):(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[y.length>0&&O.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>er(!0),children:"Apply Proxy"}),y.length>0&&(0,s.jsxs)(s.Fragment,{children:[ek.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ek.length;0!==e&&eG({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eG(null);let e=0,t=[...ek];for(let i of t)try{(await fetch(`/api/providers/${i}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}v(e=>e.filter(e=>!t.includes(e.id))),eN([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ek.length,")"]}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tW,disabled:eZ,children:eZ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eZ&&(0,s.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eZ&&(e7.current=!0,e0(!0))},disabled:eY,children:eY?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(c.lM,{checked:"round-robin"===e$,onChange:e=>{let t=e?"round-robin":null,i=e?eP||"1":eP;e&&!eP&&eE("1"),eO(t),t_(t,i)}}),"round-robin"===e$&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eP,onChange:e=>{var t;eE(t=e.target.value),t_("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===y.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tm?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tb&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tj," or ",tw,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:tb?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tr,children:tj}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:tn,children:tw})]}):(0,s.jsxs)(s.Fragment,{children:[!tv&&"iflow"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),children:"Cookie"}),"codex"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,C.Tl)("Bulk Add")}),"grok-cli"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ee(!0),children:(0,C.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:to,children:tv?"Add API Key":"iflow"===f?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[e4&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",e4.total]}),(0,s.jsxs)("span",{children:["Completed: ",e4.completed]}),(0,s.jsxs)("span",{children:["Passed: ",e4.passed]}),(0,s.jsxs)("span",{children:["Failed: ",e4.failed]}),e4.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eZ&&e1&&(0,s.jsxs)("span",{children:["Running: ",y.find(e=>e.id===e1)?.name||e1]})]})}),y.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:tY,onChange:()=>{tY?eN([]):eN(y.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),t2,!tv&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,C.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,C.Tl)("Bulk Add")}),"grok-cli"===f&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ee(!0),title:(0,C.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,C.Tl)("Bulk Add")}),tb?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tr,className:"w-full sm:w-auto",children:tj}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:tn,className:"w-full sm:w-auto",children:tw})]}):(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:to,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tC&&(0,s.jsx)("select",{value:eI,onChange:e=>{var t;eD(t=e.target.value),tq(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tC.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tv&&(e=[...th,...eF.filter(e=>!th.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eW.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eW.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tP,children:"Active All"}),e.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tO(e),children:"Disable All"})]}))]}),!!eg&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:eg}),/RegionError|hosted in China|regionNotAllowed/i.test(eg)&&(i=(t="string"==typeof eg?eg:JSON.stringify(eg)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),r=t.match(/wrk_[0-9A-Za-z]+/),u=i?i[0].endsWith("/go")?i[0]:`${i[0]}/go`:r?`https://opencode.ai/workspace/${r[0]}/go`:"https://opencode.ai",(0,s.jsx)("div",{className:"mt-1.5",children:(0,s.jsxs)("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,s.jsx)("span",{children:"Allow China-hosted models"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===f&&!!eJ&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eJ}),(()=>{let e,t,i;if(tv)return(0,s.jsx)(I,{providerStorageAlias:tN,providerDisplayAlias:tS,modelAliases:ed,customModels:em,copied:ti,onCopy:ts,onSetAlias:tU,onDeleteAlias:tK,onAddCustomModel:e=>tJ(e,"llm",tN),onDeleteCustomModel:e=>tM(e,"llm",tN),connections:y,isAnthropic:ty});let a=[...th,...eF.filter(e=>!th.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(eW),r=a.filter(e=>!l.has(e.id)),n=a.filter(e=>l.has(e.id)),o=T({customModels:em,modelAliases:ed,providerAlias:tN,builtInModels:th,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o.map(e=>(0,s.jsx)(P,{model:{id:e.id,name:e.name},fullModel:`${tS}/${e.id}`,alias:e.alias,copied:ti,onCopy:ts,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tM(e.id,"llm",tN):tK(e.alias)},testStatus:eh[e.id],onTest:y.length>0||tu?()=>t6(e.id):void 0,isTesting:ev.has(e.id),isCustom:!0,isFree:!1,caps:g(`${f}/${e.id}`),thinkingSuffix:tk(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tN}/${e.id}`,i=`${f}/${e.id}`,a=Object.entries(ed).find(([,e])=>e===t||e===i)?.[0];return(0,s.jsx)(P,{model:e,fullModel:`${tS}/${e.id}`,alias:a,copied:ti,onCopy:ts,onSetAlias:t=>tU(e.id,t,tN),onDeleteAlias:()=>tK(a),testStatus:eh[e.id],onTest:y.length>0||tu?()=>t6(e.id):void 0,isTesting:ev.has(e.id),isFree:e.isFree,onDisable:()=>tT(e.id),caps:g(`${f}/${e.id}`),thinkingSuffix:tk(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ew(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===f||"qoder-cn"===f)&&y.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tF,disabled:e8,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:e8?{animation:"spin 1s linear infinite"}:void 0,children:e8?"progress_activity":"download"}),e8?(0,C.Tl)("Fetching..."):(0,C.Tl)("Fetch Qoder Models")]}),("cline"===f||"clinepass"===f)&&y.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tL,disabled:te,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:te?{animation:"spin 1s linear infinite"}:void 0,children:te?"progress_activity":"download"}),te?(0,C.Tl)("Fetching..."):(0,C.Tl)("Import from /models")]}),eq.length>0&&(e=new Set([...Object.values(ed),...o.map(e=>e.fullModel)]),t=new Set(th.map(e=>e.id)),0===(i=eq.filter(i=>!e.has(`${tN}/${i.id}`)&&!t.has(i.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tJ(e.id,"llm",tN)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,s.jsxs)("button",{onClick:()=>t$(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t4,"kiro"===f?(0,s.jsx)(c.Mh,{isOpen:D,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}):"cursor"===f?(0,s.jsx)(c.G9,{isOpen:D,onSuccess:tH,onClose:()=>R(!1)}):"gitlab"===f?(0,s.jsx)(c.vj,{isOpen:D,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}):(0,s.jsx)(c.LF,{isOpen:D,provider:f,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}),(0,s.jsx)(c.LH,{isOpen:q,onSuccess:tH,onClose:()=>K(!1)}),"iflow"===f&&(0,s.jsx)(c.vE,{isOpen:M,onSuccess:()=>{tD(),L(!1)},onClose:()=>L(!1)}),(0,s.jsx)(z,{isOpen:W,provider:f,providerName:td.name,isCompatible:tv,isAnthropic:ty,authType:td?.authType,authHint:td?.authHint,website:td?.website,proxyPools:O,error:Q,existingNames:y.map(e=>e.name).filter(Boolean),onSave:tG,onBulkDone:tD,onClose:()=>{V(""),G(!1)}}),(0,s.jsx)(c.wI,{isOpen:et,connection:en,proxyPools:O,onSave:tQ,onClose:()=>ei(!1)}),tv&&(0,s.jsx)(U,{isOpen:es,node:S,onSave:tR,onClose:()=>ea(!1),isAnthropic:ty}),!tv&&(0,s.jsx)(J,{isOpen:ej,providerAlias:tN,providerDisplayAlias:tS,onSave:async(e,t)=>{await tJ(e,"llm",tN,t),ew(!1)},onClose:()=>ew(!1)}),"codex"===f&&(0,s.jsx)(F,{isOpen:Z,onClose:()=>X(!1),onSuccess:tD}),"grok-cli"===f&&(0,s.jsx)(B,{isOpen:Y,onClose:()=>ee(!1),onSuccess:tD}),(0,s.jsx)(c.uo,{isOpen:eQ,onClose:()=>eV(!1),onConfirm:()=>{(window.localStorage.setItem(ta,"true"),eV(!1),tm)?tl():tn()},title:"Risk Notice",message:td?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(c.uo,{isOpen:!!eH,onClose:()=>eG(null),onConfirm:eH?.onConfirm,title:eH?.title||"Confirm",message:eH?.message,variant:"danger"})]})}}},e=>{e.O(0,[2997,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=67094)),_N_E=e.O()}]);