9router 0.4.12 → 0.4.13

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 (343) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +4 -4
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  7. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  10. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +4 -4
  16. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page.js +2 -2
  20. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/page.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/_global-error.html +1 -1
  46. package/app/.next/server/app/_global-error.rsc +1 -1
  47. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  48. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  49. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  50. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  51. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  52. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  53. package/app/.next/server/app/_not-found/page.js +1 -1
  54. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/_not-found.html +1 -1
  56. package/app/.next/server/app/_not-found.rsc +4 -4
  57. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  58. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  59. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  60. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  61. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  62. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  63. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  64. package/app/.next/server/app/api/init/route.js +1 -1
  65. package/app/.next/server/app/api/models/route.js +1 -1
  66. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  67. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  68. package/app/.next/server/app/api/providers/route.js +1 -1
  69. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  70. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  71. package/app/.next/server/app/api/translator/console-logs/stream/route.js +4 -4
  72. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  73. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  74. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  75. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  76. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  77. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +11 -13
  78. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  79. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  80. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +11 -13
  81. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  82. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  83. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  84. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  85. package/app/.next/server/app/api/v1/models/route.js +1 -1
  86. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  87. package/app/.next/server/app/api/v1/route.js +1 -1
  88. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  89. package/app/.next/server/app/api/version/route.js +1 -1
  90. package/app/.next/server/app/api/version/update/route.js +1 -1
  91. package/app/.next/server/app/callback/page.js +1 -1
  92. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  93. package/app/.next/server/app/callback.html +1 -1
  94. package/app/.next/server/app/callback.rsc +4 -4
  95. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  96. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  97. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  98. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  99. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  100. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  101. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  102. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  103. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  104. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  105. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  106. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  107. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  108. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  109. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  110. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  111. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  112. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  113. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  114. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  115. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  116. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  117. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  118. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  119. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  120. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  121. package/app/.next/server/app/dashboard/combos.html +1 -1
  122. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  123. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  124. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  125. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  126. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  127. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  128. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  129. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  130. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  131. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  132. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  133. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  134. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  135. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  136. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  137. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  138. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  139. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  140. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  141. package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
  142. package/app/.next/server/app/dashboard/media-providers/web.rsc +6 -6
  143. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  144. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  145. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  146. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  147. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  148. package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  149. package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  150. package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  151. package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  152. package/app/.next/server/app/dashboard/mitm.html +1 -1
  153. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  154. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  155. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  156. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  157. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  158. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  159. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  160. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  161. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  162. package/app/.next/server/app/dashboard/profile.html +1 -1
  163. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  164. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  165. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  166. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  167. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  168. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  169. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  170. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  171. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  172. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  173. package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
  174. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  175. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  176. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  177. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  178. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  179. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  180. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  181. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  182. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  183. package/app/.next/server/app/dashboard/providers.html +1 -1
  184. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  185. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  186. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  187. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  188. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  189. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  190. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  191. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  192. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  193. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  194. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  195. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  196. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  197. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  198. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  199. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  200. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  201. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  202. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  203. package/app/.next/server/app/dashboard/quota.html +2 -2
  204. package/app/.next/server/app/dashboard/quota.rsc +7 -7
  205. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  206. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  207. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  208. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  209. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  210. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  211. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  212. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  213. package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
  214. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  215. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  216. package/app/.next/server/app/dashboard/settings/pricing.rsc +5 -5
  217. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  218. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  219. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  220. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  221. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  222. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  223. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  224. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  225. package/app/.next/server/app/dashboard/translator.html +1 -1
  226. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  227. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  228. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  230. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  231. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  232. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  233. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  234. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  235. package/app/.next/server/app/dashboard/usage.html +1 -1
  236. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  237. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  238. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  239. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  240. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  241. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  242. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  243. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  244. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  245. package/app/.next/server/app/dashboard.html +1 -1
  246. package/app/.next/server/app/dashboard.rsc +6 -6
  247. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  248. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  249. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  250. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
  251. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  252. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  253. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  254. package/app/.next/server/app/index.html +1 -1
  255. package/app/.next/server/app/index.rsc +4 -4
  256. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  257. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  258. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  259. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  260. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  261. package/app/.next/server/app/landing/page.js +1 -1
  262. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  263. package/app/.next/server/app/landing.html +1 -1
  264. package/app/.next/server/app/landing.rsc +4 -4
  265. package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
  266. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  267. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  268. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  269. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  270. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  271. package/app/.next/server/app/login/page.js +2 -2
  272. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  273. package/app/.next/server/app/login.html +1 -1
  274. package/app/.next/server/app/login.rsc +5 -5
  275. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  276. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  277. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  278. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  279. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  280. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  281. package/app/.next/server/app/page.js +1 -1
  282. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  283. package/app/.next/server/app-paths-manifest.json +4 -4
  284. package/app/.next/server/chunks/1574.js +2 -2
  285. package/app/.next/server/chunks/1578.js +1 -1
  286. package/app/.next/server/chunks/2049.js +1 -1
  287. package/app/.next/server/chunks/21.js +1 -1
  288. package/app/.next/server/chunks/2141.js +1 -1
  289. package/app/.next/server/chunks/253.js +1 -1
  290. package/app/.next/server/chunks/2692.js +23 -0
  291. package/app/.next/server/chunks/450.js +2 -2
  292. package/app/.next/server/chunks/5339.js +1 -1
  293. package/app/.next/server/chunks/7770.js +1 -1
  294. package/app/.next/server/chunks/8035.js +1 -1
  295. package/app/.next/server/chunks/8193.js +1 -1
  296. package/app/.next/server/chunks/8202.js +5 -5
  297. package/app/.next/server/chunks/8513.js +13 -15
  298. package/app/.next/server/chunks/8565.js +1 -0
  299. package/app/.next/server/middleware-build-manifest.js +1 -1
  300. package/app/.next/server/middleware.js +1 -1
  301. package/app/.next/server/pages/404.html +1 -1
  302. package/app/.next/server/pages/500.html +1 -1
  303. package/app/.next/static/chunks/3116-cec85bb5f212583f.js +23 -0
  304. package/app/.next/static/chunks/4156-cb6c83e3583f0406.js +7 -0
  305. package/app/.next/static/chunks/505-18fef307aacf3205.js +1 -0
  306. package/app/.next/static/chunks/8035-51e868622e22263b.js +3 -0
  307. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-2709902f127ecc7a.js +1 -0
  308. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-24f203d25ad3f861.js +1 -0
  309. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-99e1297a29f0994e.js +53 -0
  310. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-e95c413c30b592eb.js +1 -0
  311. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page-8b1737ee82d2cbfa.js +4 -0
  312. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-c32e5ceca2e291dd.js +1 -0
  313. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-dc8502d8e3b95e92.js +1 -0
  314. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-22e6b2c60c4849ad.js → page-20eb7b59c080e8f7.js} +1 -1
  315. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-92b9dd8c50ab5e50.js +1 -0
  316. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-77a73529baba955b.js +1 -0
  317. package/app/.next/static/chunks/app/login/page-2f45309b2d2ca209.js +1 -0
  318. package/app/.next/static/css/c5a3b7a7aed78240.css +1 -0
  319. package/app/package.json +1 -1
  320. package/app/public/i18n/literals/zh-CN.json +404 -127
  321. package/app/public/providers/cloudflare-ai.png +0 -0
  322. package/app/public/providers/nebius.png +0 -0
  323. package/app/src/mitm/server.js +34 -31
  324. package/cli.js +6 -0
  325. package/package.json +1 -1
  326. package/app/.next/server/chunks/6762.js +0 -23
  327. package/app/.next/static/chunks/4156-3dd571c503014372.js +0 -7
  328. package/app/.next/static/chunks/4380-7f3ec9a5adb060e2.js +0 -23
  329. package/app/.next/static/chunks/505-61eefa51ae7fae57.js +0 -1
  330. package/app/.next/static/chunks/8035-be13431b81f6e555.js +0 -3
  331. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3d80412b21111041.js +0 -1
  332. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-3390652c042161bf.js +0 -1
  333. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-51ab2246cec930f0.js +0 -53
  334. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-1cd57da85dc9a5a0.js +0 -1
  335. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page-55f152f000244dfd.js +0 -4
  336. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-c02c96576b763028.js +0 -1
  337. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-ef2689a6b468da49.js +0 -1
  338. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-17d9ef16d4d56317.js +0 -1
  339. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-d9a2df5b3f666b3b.js +0 -1
  340. package/app/.next/static/chunks/app/login/page-2424ce8673ecf5cb.js +0 -1
  341. package/app/.next/static/css/06f471e66daf399e.css +0 -1
  342. /package/app/.next/static/{twJQz13yvhkiPdQu-x4vH → 7D6ZXM7R9e5iCcGAVJvY1}/_buildManifest.js +0 -0
  343. /package/app/.next/static/{twJQz13yvhkiPdQu-x4vH → 7D6ZXM7R9e5iCcGAVJvY1}/_ssgManifest.js +0 -0
@@ -1,23 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4380],{7127:(e,t,s)=>{s.d(t,{Tk:()=>o,Ah:()=>d,a7:()=>g,ZM:()=>m,RF:()=>u,gY:()=>k,tA:()=>b,kn:()=>N,yZ:()=>x,qO:()=>f});var a=s(73365),l=s(1521),r=s(74156),i=s(58872);let n=s(89651).env.NEXT_PUBLIC_CLOUD_URL;function o({tool:e,isExpanded:t,onToggle:s,activeProviders:d,modelMappings:c,onModelMappingChange:m,baseUrl:x,hasActiveProviders:p,apiKeys:u,cloudEnabled:h,initialStatus:g}){let f,y,b,[j,N]=(0,l.useState)(g||null),[v,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(!1),[_,S]=(0,l.useState)(!1),[A,E]=(0,l.useState)(null),[O,M]=(0,l.useState)(!1),[I,R]=(0,l.useState)(!1),[T,P]=(0,l.useState)(null),[$,L]=(0,l.useState)(""),[U,K]=(0,l.useState)({}),[z,D]=(0,l.useState)(!1),[F,H]=(0,l.useState)(""),[B,q]=(0,l.useState)(!1),W=(0,l.useRef)(!1),G=(()=>{if(!j?.installed)return null;let e=j.settings?.env?.ANTHROPIC_BASE_URL;if(!e)return"not_configured";let t=e.includes("localhost")||e.includes("127.0.0.1"),s=h&&n&&e.startsWith(n),a=x&&e.startsWith(x);return t||s||a?"configured":"other"})();(0,l.useEffect)(()=>{u?.length>0&&!$&&L(u[0].key)},[u,$]),(0,l.useEffect)(()=>{g&&N(g)},[g]),(0,l.useEffect)(()=>{t&&!j&&(Y(),Z()),t&&Z()},[t]),(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{q(!!e.ccFilterNaming)}).catch(()=>{})},[]);let J=async e=>{let t=e.target.checked;q(t),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:t})}).catch(()=>{})},Z=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(j?.installed&&!W.current){W.current=!0;let t=j.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&m(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&u?.some(e=>e.key===s)&&L(s)}},[j,u,e.defaultModels,m]);let Y=async()=>{w(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();N(t)}catch(e){N({installed:!1,error:e.message})}finally{w(!1)}},V=()=>{let e=F||x;return e.endsWith("/v1")?e:`${e}/v1`},X=async()=>{C(!0),E(null);try{let t={ANTHROPIC_BASE_URL:V()},s=$?.trim()||(u?.length>0?u[0].key:null)||(h?null:"sk_9router");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=c[e.alias];s&&e.envKey&&(t[e.envKey]=s)});let a=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t})}),l=await a.json();a.ok?(E({type:"success",text:"Settings applied successfully!"}),N(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t}}))):E({type:"error",text:l.error||"Failed to apply settings"})}catch(e){E({type:"error",text:e.message})}finally{C(!1)}},Q=async()=>{S(!0),E(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(E({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>m(e.alias,e.defaultValue||"")),L("")):E({type:"error",text:s.error||"Failed to reset settings"})}catch(e){E({type:"error",text:e.message})}finally{S(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.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"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===G&&(0,a.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"===G&&(0,a.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"===G&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[v&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Claude CLI..."})]}),!v&&j&&!j.installed&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,a.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>D(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>M(!O),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:O?"expand_less":"help"}),O?"Hide":"How to Install"]})]})]}),O&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,a.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,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!v&&j?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[j?.settings?.env?.ANTHROPIC_BASE_URL&&(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:j.settings.env.ANTHROPIC_BASE_URL})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(f=F||x).endsWith("/v1")?f:`${f}/v1`,onChange:e=>H(e.target.value),placeholder:"https://.../v1",className:"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"}),F&&F!==x&&(0,a.jsx)("button",{onClick:()=>H(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),u.length>0?(0,a.jsx)("select",{value:$,onChange:e=>L(e.target.value),className:"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,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:h?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:c[e.alias]||"",onChange:t=>m(e.alias,t.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>{P(e.alias),R(!0)},disabled:!p,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${p?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),c[e.alias]&&(0,a.jsx)("button",{onClick:()=>m(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:B,onChange:J,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"})]}),(0,a.jsx)(r.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),A&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,a.jsx)("span",{children:A.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:X,disabled:!p,loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Q,disabled:!j?.has9Router,loading:_,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:I,onClose:()=>R(!1),onSelect:e=>{T&&m(T,e.value)},selectedModel:T?c[T]:null,activeProviders:d,modelAliases:U,title:`Select model for ${T}`}),(0,a.jsx)(r.uR,{isOpen:z,onClose:()=>D(!1),title:"Claude CLI - Manual Configuration",configs:(y=$&&$.trim()?$:h?"<API_KEY_FROM_DASHBOARD>":"sk_9router",b={ANTHROPIC_BASE_URL:V(),ANTHROPIC_AUTH_TOKEN:y},e.defaultModels.forEach(e=>{let t=c[e.alias];t&&e.envKey&&(b[e.envKey]=t)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:b},null,2)}])})]})}function d({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:c,cloudEnabled:m,initialStatus:x}){let p,u,h,g,[f,y]=(0,l.useState)(x||null),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[C,_]=(0,l.useState)(null),[S,A]=(0,l.useState)(!1),[E,O]=(0,l.useState)(""),[M,I]=(0,l.useState)(""),[R,T]=(0,l.useState)(""),[P,$]=(0,l.useState)(!1),[L,U]=(0,l.useState)(!1),[K,z]=(0,l.useState)({}),[D,F]=(0,l.useState)(!1),[H,B]=(0,l.useState)("");(0,l.useEffect)(()=>{o?.length>0&&!E&&O(o[0].key)},[o,E]),(0,l.useEffect)(()=>{x&&y(x)},[x]),(0,l.useEffect)(()=>{t&&!f&&(J(),q()),t&&q()},[t]);let q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&z(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(f?.config){let e=f.config.match(/^model\s*=\s*"([^"]+)"/m);e&&I(e[1]);let t=f.config.match(/\[agents\.subagent\]\s*\n\s*model\s*=\s*"([^"]+)"/m);t&&T(t[1])}},[f]);let W=f?.installed?f.config?f.config.includes(n)||f.config.includes("localhost")||f.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,G=()=>{let e=H||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},J=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();y(t)}catch(e){y({installed:!1,error:e.message})}finally{j(!1)}},Z=async()=>{v(!0),_(null);try{let e=E&&E.trim()||m?E:"sk_9router",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:M,subagentModel:R||M})}),s=await t.json();t.ok?(_({type:"success",text:"Settings applied successfully!"}),J()):_({type:"error",text:s.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{v(!1)}},Y=async()=>{k(!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!"}),I(""),T(""),J()):_({type:"error",text:t.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{k(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.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"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,a.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"===W&&(0,a.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"===W&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Codex CLI..."})]}),!b&&f&&!f.installed&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,a.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>F(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>A(!S),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:S?"expand_less":"help"}),S?"Hide":"How to Install"]})]})]}),S&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,a.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,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,a.jsx)("div",{className:"pt-2 border-t border-border",children:(0,a.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!b&&f?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f?.config&&((u=(p=f.config.match(/base_url\s*=\s*"([^"]+)"/))?p[1]:null)?(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:u})]}):null),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:H||`${n}/v1`,onChange:e=>B(e.target.value),placeholder:"https://.../v1",className:"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"}),H&&H!==`${n}/v1`&&(0,a.jsx)("button",{onClick:()=>B(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),o.length>0?(0,a.jsx)("select",{value:E,onChange:e=>O(e.target.value),className:"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:o.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:m?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:M,onChange:e=>I(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>$(!0),disabled:!c?.length,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${c?.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,a.jsx)("button",{onClick:()=>I(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:R,onChange:e=>T(e.target.value),placeholder:M||"provider/model-id (defaults to main model)",className:"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,a.jsx)("button",{onClick:()=>U(!0),disabled:!c?.length,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${c?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),R&&(0,a.jsx)("button",{onClick:()=>T(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,a.jsx)("span",{children:C.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Z,disabled:!E&&m&&o.length>0||!M,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Y,disabled:w,loading:w,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>F(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:P,onClose:()=>$(!1),onSelect:e=>{I(e.value),R||T(e.value),$(!1)},selectedModel:M,activeProviders:c,modelAliases:K,title:"Select Model for Codex"}),(0,a.jsx)(r.rq,{isOpen:L,onClose:()=>U(!1),onSelect:e=>{T(e.value),U(!1)},selectedModel:R,activeProviders:c,modelAliases:K,title:"Select Subagent Model for Codex"}),(0,a.jsx)(r.uR,{isOpen:D,onClose:()=>F(!1),title:"Codex CLI - Manual Configuration",configs:(h=E&&E.trim()?E:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",g=R||M,[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
2
- model = "${M}"
3
- model_provider = "9router"
4
-
5
- [model_providers.9router]
6
- name = "9Router"
7
- base_url = "${G()}"
8
- wire_api = "responses"
9
-
10
- [agents.subagent]
11
- model = "${g}"
12
- `},{filename:"~/.codex/auth.json",content:JSON.stringify({auth_mode:"apikey",OPENAI_API_KEY:h},null,2)}])})]})}let c=s(89651).env.NEXT_PUBLIC_CLOUD_URL;function m({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:o,apiKeys:d,activeProviders:x,cloudEnabled:p,initialStatus:u}){let h,g,f,y,[b,j]=(0,l.useState)(u||null),[N,v]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[C,_]=(0,l.useState)(!1),[S,A]=(0,l.useState)(null),[E,O]=(0,l.useState)(""),[M,I]=(0,l.useState)([]),[R,T]=(0,l.useState)(""),[P,$]=(0,l.useState)(!1),[L,U]=(0,l.useState)({}),[K,z]=(0,l.useState)(!1),[D,F]=(0,l.useState)(!1),[H,B]=(0,l.useState)(""),q=(0,l.useRef)(!1),W=(()=>{if(!b?.installed)return null;let e=b.settings?.customModels?.find(e=>e.id?.startsWith("custom:9Router"));if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=p&&c&&e.baseUrl?.startsWith(c),a=n&&e.baseUrl?.startsWith(n);return t||s||a?"configured":"other"})();(0,l.useEffect)(()=>{d?.length>0&&!E&&O(d[0].key)},[d,E]),(0,l.useEffect)(()=>{u&&j(u)},[u]),(0,l.useEffect)(()=>{t&&!b&&(J(),G()),t&&G()},[t]);let G=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&U(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(b?.installed&&!q.current){q.current=!0;let e=(b.settings?.customModels||[]).filter(e=>e.id?.startsWith("custom:9Router")).sort((e,t)=>(e.index||0)-(t.index||0)).map(e=>e.model);if(e.length>0)I(e);else{let e=b.settings?.customModels?.find(e=>"custom:9Router-0"===e.id);e?.model&&I([e.model])}}},[b]);let J=async()=>{v(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();j(t)}catch(e){j({installed:!1,error:e.message})}finally{v(!1)}},Z=()=>{let e=H||n;return e.endsWith("/v1")?e:`${e}/v1`},Y=()=>{let e=R.trim();!e||M.includes(e)||(I(t=>[...t,e]),T(""))},V=async()=>{k(!0),A(null);try{let e=E?.trim()||(d?.length>0?d[0].key:null)||(p?null:"sk_9router"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Z(),apiKey:e,models:M,activeModel:M[0]||""})}),s=await t.json();t.ok?(A({type:"success",text:"Settings applied successfully!"}),J()):A({type:"error",text:s.error||"Failed to apply settings"})}catch(e){A({type:"error",text:e.message})}finally{k(!1)}},X=async()=>{_(!0),A(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(A({type:"success",text:"Settings reset successfully!"}),I([]),J()):A({type:"error",text:t.error||"Failed to reset settings"})}catch(e){A({type:"error",text:e.message})}finally{_(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:"/providers/droid.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,a.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"===W&&(0,a.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"===W&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[N&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!N&&b&&!b.installed&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>F(!D),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:D?"expand_less":"help"}),D?"Hide":"How to Install"]})]})]}),D&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,a.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"curl -fsSL https://app.factory.ai/cli | sh"})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"droid"})," to verify."]})]})]})]}),!N&&b?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[b?.settings?.customModels?.find(e=>e.id?.startsWith("custom:9Router"))?.baseUrl&&(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:b.settings.customModels.find(e=>e.id?.startsWith("custom:9Router")).baseUrl})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(h=H||n).endsWith("/v1")?h:`${h}/v1`,onChange:e=>B(e.target.value),placeholder:"https://.../v1",className:"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"}),H&&H!==n&&(0,a.jsx)("button",{onClick:()=>B(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),d.length>0?(0,a.jsx)("select",{value:E,onChange:e=>O(e.target.value),className:"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:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:p?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:["Models ",M.length>0&&(0,a.jsxs)("span",{className:"text-primary",children:["(",M.length,")"]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[M.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-0.5 mb-1",children:M.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-bg-secondary rounded border border-border",children:[(0,a.jsx)("span",{className:"flex-1 text-xs font-mono truncate",children:e}),(0,a.jsx)("button",{onClick:()=>I(t=>t.filter(t=>t!==e)),className:"text-text-muted hover:text-red-500 transition-colors shrink-0",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"text",value:R,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),Y())},placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>$(!0),disabled:!o,className:`px-2 py-1.5 rounded border text-xs shrink-0 ${o?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),(0,a.jsx)("button",{onClick:Y,disabled:!R.trim(),className:"px-2 py-1.5 rounded border bg-surface border-border hover:border-primary text-xs shrink-0 disabled:opacity-50",title:"Add model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"})})]})]})]})]}),S&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,a.jsx)("span",{children:S.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:V,disabled:0===M.length,loading:w,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:X,disabled:!b?.has9Router,loading:C,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>z(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:P,onClose:()=>$(!1),onSelect:e=>{!e.value||M.includes(e.value)||(I(t=>[...t,e.value]),$(!1))},selectedModel:null,activeProviders:x,modelAliases:L,title:"Select Model for Factory Droid"}),(0,a.jsx)(r.uR,{isOpen:K,onClose:()=>z(!1),title:"Factory Droid - Manual Configuration",configs:(g=E&&E.trim()?E:p?"<API_KEY_FROM_DASHBOARD>":"sk_9router",f={customModels:M.map((e,t)=>({model:e,id:`custom:9Router-${t}`,index:t,baseUrl:Z(),apiKey:g,displayName:e,maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}))},y="u">typeof navigator&&navigator.platform,[{filename:y?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(f,null,2)}])})]})}function x({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:o,apiKeys:d,activeProviders:c,cloudEnabled:m,initialStatus:p}){let u,h,[g,f]=(0,l.useState)(p||null),[y,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(null),[_,S]=(0,l.useState)(""),[A,E]=(0,l.useState)(""),[O,M]=(0,l.useState)({}),[I,R]=(0,l.useState)(null),[T,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)({}),[U,K]=(0,l.useState)(!1),[z,D]=(0,l.useState)(""),F=(0,l.useRef)(!1),H=(()=>{if(!g?.installed)return null;let e=g.settings?.models?.providers?.["9router"];if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1")||e.baseUrl?.includes("0.0.0.0"),s=n&&e.baseUrl?.startsWith(n);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{d?.length>0&&!_&&S(d[0].key)},[d,_]),(0,l.useEffect)(()=>{p&&f(p)},[p]),(0,l.useEffect)(()=>{t&&!g&&(q(),B()),t&&B()},[t]);let B=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&L(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(g?.installed&&!F.current){F.current=!0;let e=g.settings?.models?.providers?.["9router"];if(e){let t=g.settings?.agents?.defaults?.model?.primary;t&&E(t.replace("9router/","")),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&S(e.apiKey)}let t=g.agents||[],s={};t.forEach(e=>{e.currentModel&&(s[e.id]=e.currentModel)}),M(s)}},[g,d]);let q=async()=>{b(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{b(!1)}},W=()=>window.location.origin.replace("://localhost","://127.0.0.1"),G=()=>{let e=z||W();return e.endsWith("/v1")?e:`${e}/v1`},J=async()=>{N(!0),C(null);try{let e=_?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_9router"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:A,agentModels:O})}),s=await t.json();t.ok?(C({type:"success",text:"Settings applied successfully!"}),q()):C({type:"error",text:s.error||"Failed to apply settings"})}catch(e){C({type:"error",text:e.message})}finally{N(!1)}},Z=async()=>{w(!0),C(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(C({type:"success",text:"Settings reset successfully!"}),E(""),S(""),q()):C({type:"error",text:t.error||"Failed to reset settings"})}catch(e){C({type:"error",text:e.message})}finally{w(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:"/providers/openclaw.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===H&&(0,a.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"===H&&(0,a.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"===H&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!y&&g&&!g.installed&&(0,a.jsx)("div",{className:"flex flex-col gap-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,a.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>K(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!y&&g?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[g?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:g.settings.models.providers["9router"].baseUrl})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(u=z||W()).endsWith("/v1")?u:`${u}/v1`,onChange:e=>D(e.target.value),placeholder:"https://.../v1",className:"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"}),z&&z!==n&&(0,a.jsx)("button",{onClick:()=>D(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),d.length>0?(0,a.jsx)("select",{value:_,onChange:e=>S(e.target.value),className:"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:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:m?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>{R(null),P(!0)},disabled:!o,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${o?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),A&&(0,a.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(g.agents||[]).filter(e=>e.agentDir).map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,a.jsxs)("span",{className:"w-32 shrink-0 text-xs text-primary text-right truncate",title:e.name||e.id,children:["Agent ",e.name||e.id]}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:O[e.id]||"",onChange:t=>M(s=>({...s,[e.id]:t.target.value})),placeholder:`default (${A||"provider/model-id"})`,className:"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,a.jsx)("button",{onClick:()=>{R(e.id),P(!0)},disabled:!o,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${o?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),O[e.id]&&(0,a.jsx)("button",{onClick:()=>M(t=>({...t,[e.id]:""})),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.id))]}),k&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===k.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===k.type?"check_circle":"error"}),(0,a.jsx)("span",{children:k.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:J,disabled:!A,loading:j,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:!g?.has9Router,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:T,onClose:()=>P(!1),onSelect:e=>{I?(M(t=>({...t,[I]:e.value})),R(null)):E(e.value),P(!1)},selectedModel:A,activeProviders:c,modelAliases:$,title:"Select Model for Open Claw"}),(0,a.jsx)(r.uR,{isOpen:U,onClose:()=>K(!1),title:"Open Claw - Manual Configuration",configs:(h=_&&_.trim()?_:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${A||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:G(),apiKey:h,api:"openai-completions",models:[{id:A||"provider/model-id",name:(A||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let p="/api/cli-tools/hermes-settings";function u({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:o,apiKeys:d,activeProviders:c,cloudEnabled:m,initialStatus:x}){let h,[g,f]=(0,l.useState)(x||null),[y,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(null),[_,S]=(0,l.useState)(""),[A,E]=(0,l.useState)(""),[O,M]=(0,l.useState)(!1),[I,R]=(0,l.useState)({}),[T,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)(""),U=(0,l.useRef)(!1),K=(()=>{if(!g?.installed)return null;let e=g.settings?.model;if(!e?.base_url)return"not_configured";let t=/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(e.base_url),s=n&&e.base_url.startsWith(n);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{d?.length>0&&!_&&S(d[0].key)},[d,_]),(0,l.useEffect)(()=>{x&&f(x)},[x]),(0,l.useEffect)(()=>{t&&!g&&(D(),z()),t&&z()},[t]);let z=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&R(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(g?.installed&&!U.current){U.current=!0;let e=g.settings?.model;e?.default&&E(e.default)}},[g]);let D=async()=>{b(!0);try{let e=await fetch(p),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{b(!1)}},F=()=>{let e=$||window.location.origin.replace("://localhost","://127.0.0.1");return e.endsWith("/v1")?e:`${e}/v1`},H=async()=>{N(!0),C(null);try{let e=_?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_9router"),t=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:F(),apiKey:e,model:A})}),s=await t.json();t.ok?(C({type:"success",text:"Settings applied successfully!"}),D()):C({type:"error",text:s.error||"Failed to apply settings"})}catch(e){C({type:"error",text:e.message})}finally{N(!1)}},B=async()=>{w(!0),C(null);try{let e=await fetch(p,{method:"DELETE"}),t=await e.json();e.ok?(C({type:"success",text:"Settings reset successfully!"}),E(""),D()):C({type:"error",text:t.error||"Failed to reset settings"})}catch(e){C({type:"error",text:e.message})}finally{w(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:"/providers/hermes.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===K&&(0,a.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"===K&&(0,a.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"===K&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Hermes Agent..."})]}),!y&&g&&!g.installed&&(0,a.jsx)("div",{className:"flex flex-col gap-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Hermes Agent not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Install: curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,a.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>P(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!y&&g?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[g?.settings?.model?.base_url&&(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:g.settings.model.base_url})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:F(),onChange:e=>L(e.target.value),placeholder:"https://.../v1",className:"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"}),$&&$!==n&&(0,a.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),d.length>0?(0,a.jsx)("select",{value:_,onChange:e=>S(e.target.value),className:"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:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:m?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>M(!0),disabled:!o,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${o?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),A&&(0,a.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),k&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===k.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===k.type?"check_circle":"error"}),(0,a.jsx)("span",{children:k.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:H,disabled:!A,loading:j,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:B,disabled:!g?.has9Router,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:O,onClose:()=>M(!1),onSelect:e=>{E(e.value),M(!1)},selectedModel:A,activeProviders:c,modelAliases:I,title:"Select Model for Hermes Agent"}),(0,a.jsx)(r.uR,{isOpen:T,onClose:()=>P(!1),title:"Hermes Agent - Manual Configuration",configs:(h=_&&_.trim()?_:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.hermes/config.yaml",content:`model:
13
- default: "${A||"provider/model-id"}"
14
- provider: "custom"
15
- base_url: "${F()}"
16
- `},{filename:"~/.hermes/.env",content:`OPENAI_API_KEY=${h}
17
- `}])})]})}var h=s(96459);function g({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:o,apiKeys:d,activeProviders:c=[],cloudEnabled:m=!1,tunnelEnabled:x=!1}){let[p,u]=(0,l.useState)(null),[f,y]=(0,l.useState)(!1),[b,j]=(0,l.useState)(""),[N,v]=(0,l.useState)(()=>d?.length>0?d[0].key:""),w=e=>{let t=N&&N.trim()?N:m?"your-api-key":"sk_9router",s=o||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,a).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,b||"provider/model-id")},{copy:k}=(0,h.C)(),C=async(e,t)=>{await k(w(e),`toolcard-${t}`),u(t),setTimeout(()=>u(null),2e3)},_=c.length>0,S=()=>(!t.requiresExternalUrl||!!m||!!x)&&(!t.requiresCloud||!!m);return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,a.jsx)(i.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,a.jsx)(i.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,a.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&(m||x))return null;let s="warning"===e.type,l="cloudCheck"===e.type&&!m&&!x,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):l&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,a.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,a.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,S()&&t.guideSteps.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,a.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2",children:d&&d.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("select",{value:N,onChange:e=>v(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,a.jsx)("button",{onClick:()=>C(N,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===p?"check":"content_copy"})})]}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:m?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===e.type&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:b,onChange:e=>j(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>y(!0),disabled:!_,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${_?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>C(b,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===p?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>j(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:w(e.value)}),e.copyable&&(0,a.jsx)("button",{onClick:()=>C(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:p===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),S()&&t.codeBlock&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,a.jsxs)("button",{onClick:()=>C(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===p?"check":"content_copy"}),"codeblock"===p?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,a.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:w(t.codeBlock.code)})})]})]}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,a.jsx)(r.rq,{isOpen:f,onClose:()=>y(!1),onSelect:e=>{j(e.value)},selectedModel:b,activeProviders:c,title:"Select Model"})]})}function f({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m}){let x,p,u,h,g,[y,b]=(0,l.useState)(m||null),[j,N]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(!1),[_,S]=(0,l.useState)(null),[A,E]=(0,l.useState)(!1),[O,M]=(0,l.useState)(""),[I,R]=(0,l.useState)(""),[T,P]=(0,l.useState)(""),[$,L]=(0,l.useState)(!1),[U,K]=(0,l.useState)(!1),[z,D]=(0,l.useState)({}),[F,H]=(0,l.useState)(!1),[B,q]=(0,l.useState)(""),[W,G]=(0,l.useState)([]),[J,Z]=(0,l.useState)("");(0,l.useEffect)(()=>{o?.length>0&&!O&&M(o[0].key)},[o,O]),(0,l.useEffect)(()=>{m&&b(m)},[m]),(0,l.useEffect)(()=>{t&&!y&&(Q(),Y()),t&&Y()},[t]),(0,l.useEffect)(()=>{y?.opencode?.models&&G(y.opencode.models),y?.opencode?.activeModel&&Z(y.opencode.activeModel),y?.config?.agent?.explorer?.model?.startsWith("9router/")&&P(y.config.agent.explorer.model.replace("9router/",""))},[y]);let Y=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&D(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},V=(()=>{if(!y?.installed)return null;if(!y.config)return"not_configured";let e=y.config?.provider?.["9router"]?.options?.baseURL||"",t=e.includes("localhost")||e.includes("127.0.0.1");return y.has9Router&&(t||e.includes(n))?"configured":y.has9Router?"other":"not_configured"})(),X=()=>{let e=B||n;return e.endsWith("/v1")?e:`${e}/v1`},Q=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/opencode-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},ee=async()=>{w(!0),S(null);try{let e=O&&O.trim()||c?O:"sk_9router",t=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:e,models:W,activeModel:""===J?"":J||W[0],subagentModel:T})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),Q()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},et=async()=>{C(!0),S(null);try{let e=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),R(""),P(""),G([]),Z(""),Q()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{C(!1)}};return(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:"/providers/opencode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===V&&(0,a.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"===V&&(0,a.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"===V&&(0,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!j&&y&&!y.installed&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,a.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>H(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>E(!A),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]})]}),A&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,a.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g opencode-ai"})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!j&&y?.installed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.config?.provider?.["9router"]?.options?.baseURL&&(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.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:y.config.provider["9router"].options.baseURL})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:B||`${n}/v1`,onChange:e=>q(e.target.value),placeholder:"https://.../v1",className:"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"}),B&&B!==`${n}/v1`&&(0,a.jsx)("button",{onClick:()=>q(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),o.length>0?(0,a.jsx)("select",{value:O,onChange:e=>M(e.target.value),className:"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:o.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:c?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===W.length?(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):W.map(e=>(0,a.jsxs)("span",{onClick:async()=>{if(e===J)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(Z(""),Q())}catch(e){console.log("Error clearing active model:",e)}else Z(e)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${e===J?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:e===J?"Click to clear active model":"Click to set as active",children:[e===J&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),e,(0,a.jsx)("button",{onClick:async t=>{t.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(e)}`,{method:"DELETE"})).ok){let t=W.filter(t=>t!==e);G(t),J===e&&Z(""),Q()}}catch(e){console.log("Error removing model:",e)}},className:"ml-0.5 hover:text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("button",{onClick:()=>L(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:W.length>0&&J?(0,a.jsxs)(a.Fragment,{children:["Active: ",(0,a.jsx)("span",{className:"text-primary",children:J})]}):W.length>0?(0,a.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:T,onChange:e=>P(e.target.value),placeholder:I||"provider/model-id (defaults to main model)",className:"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,a.jsx)("button",{onClick:()=>K(!0),disabled:!d?.length,className:`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"}),T&&(0,a.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),_&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===_.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===_.type?"check_circle":"error"}),(0,a.jsx)("span",{children:_.text})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ee,disabled:0===W.length,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:et,disabled:!y.has9Router,loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>H(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:$,onClose:()=>L(!1),onSelect:e=>{!W.includes(e.value)&&(G([...W,e.value]),J||Z(e.value)),L(!1)},selectedModel:null,activeProviders:d,modelAliases:z,title:"Add Model for OpenCode"}),(0,a.jsx)(r.rq,{isOpen:U,onClose:()=>K(!1),onSelect:e=>{P(e.value),K(!1)},selectedModel:T,activeProviders:d,modelAliases:z,title:"Select Subagent Model for OpenCode"}),(0,a.jsx)(r.uR,{isOpen:F,onClose:()=>H(!1),title:"OpenCode - Manual Configuration",configs:(x=O&&O.trim()?O:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",p=W.length>0?W:["provider/model-id"],u=J||W[0]||p[0],h=T||u,g={},p.forEach(e=>{g[e]={name:e}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:X(),apiKey:x},models:g}},model:`9router/${u}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${h}`}}},null,2)}])})]})}let y="http://localhost:20128";function b({apiKeys:e,cloudEnabled:t,onStatusChange:s}){let[i,n]=(0,l.useState)(null),[o,d]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[x,p]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[g,f]=(0,l.useState)(null),[j,N]=(0,l.useState)(null),[v,w]=(0,l.useState)(null),[k,C]=(0,l.useState)(y),_="u">typeof navigator&&navigator.userAgent?.includes("Windows"),S=i?.isAdmin!==!1;(0,l.useEffect)(()=>{e?.length>0&&!u&&h(e[0].key)},[e,u]),(0,l.useEffect)(()=>{A()},[]);let A=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();n(t),t.mitmRouterBaseUrl&&C(t.mitmRouterBaseUrl),s?.(t)}}catch{n({running:!1,certExists:!1,dnsStatus:{}})}},E=e=>{w(null),_||i?.hasCachedPassword?O(e,""):(f(e),m(!0),N(null))},O=async(s,a)=>{d(!0),w(null);try{let l;if("trust-cert"===s)l=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:a})});else if("start"===s){let s=u?.trim()||(e?.length>0?e[0].key:null)||(t?null:"sk_9router");l=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,sudoPassword:a,mitmRouterBaseUrl:k.trim()||y})})}else l=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})});if(!l.ok){let e=await l.json().catch(()=>({}));w(e.error||`Failed to ${s} MITM server`);return}m(!1),p(""),await A()}catch(e){w(e.message||"Network error")}finally{d(!1),f(null)}},M=()=>{x.trim()?O(g,x):N("Sudo password is required")},I=i?.running;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,a.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),I?(0,a.jsx)(r.Ex,{variant:"success",size:"sm",children:"Running"}):(0,a.jsx)(r.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:i?.certExists},{label:"Trusted",ok:i?.certTrusted},{label:"Server",ok:I}].map(({label:e,ok:t})=>(0,a.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${t?"text-green-600":"text-text-muted"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:t?"check_circle":"cancel"}),e]},e))})]}),(0,a.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,a.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router"]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"9Router Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:y,disabled:I,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!I&&(0,a.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",list:"mitm-api-keys",value:u,onChange:e=>h(e.target.value),placeholder:t?"Enter or pick API key":"sk_9router (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),e?.length>0&&(0,a.jsx)("datalist",{id:"mitm-api-keys",children:e.map(e=>(0,a.jsx)("option",{value:e.key,children:e.name||e.key},e.id))})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center","data-i18n-skip":"true",children:[i?.certExists&&!i?.certTrusted&&(0,a.jsxs)("button",{onClick:()=>E("trust-cert"),disabled:o,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-2 text-xs font-medium text-yellow-600 transition-colors hover:bg-yellow-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),I?(0,a.jsxs)("button",{onClick:()=>E("stop"),disabled:o,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,a.jsxs)("button",{onClick:()=>E("start"),disabled:o||_&&!S,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),I&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),v&&(0,a.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,a.jsx)("span",{children:v})]}),_&&!S&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,a.jsx)("span",{children:"Administrator required — restart 9Router as Administrator to use MITM"})]})]})}),c&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and server startup"})]}),(0,a.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:x,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||o||M()}}),j&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{children:j})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{m(!1),p(""),N(null)},disabled:o,children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"primary",size:"sm",onClick:M,loading:o,children:"Confirm"})]})]})})]})}var j=s(45727);function N({tool:e,isExpanded:t,onToggle:s,serverRunning:n,dnsActive:o,hasCachedPassword:d,apiKeys:c,activeProviders:m,hasActiveProviders:x,modelAliases:p={},cloudEnabled:u,onDnsChange:h}){let[g,f]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),[v,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(""),[_,S]=(0,l.useState)(null),[A,E]=(0,l.useState)(null),[O,M]=(0,l.useState)({}),[I,R]=(0,l.useState)(!1),[T,P]=(0,l.useState)(null),$=j.TOOL_HOSTS[e.id]??[],L="u">typeof navigator&&navigator.userAgent?.includes("Windows");(0,l.useEffect)(()=>{t&&U()},[t]);let U=async()=>{try{let t=await fetch(`/api/cli-tools/antigravity-mitm/alias?tool=${e.id}`);if(t.ok){let e=await t.json();Object.keys(e.aliases||{}).length>0&&M(e.aliases)}}catch{}},K=(0,l.useCallback)(async t=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,mappings:t})})}catch{}},[e.id]),z=(e,t)=>{M(s=>({...s,[e]:t}))},D=()=>{if(!n)return;let e=o?"disable":"enable";L||d?F(e,""):(S(e),w(!0),E(null))},F=async(t,s)=>{f(!0),b(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,action:t,sudoPassword:s})}),l=await a.json();if(!a.ok)throw Error(l.error||"Failed to toggle DNS");"enable"===t&&b(`Restart ${e.name} to apply changes`),w(!1),C(""),h?.(l)}catch{}finally{f(!1),S(null)}},H=()=>{k.trim()?F(_,k):E("Sudo password is required")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),n?o?(0,a.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,a.jsx)(r.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,a.jsx)(r.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted sm:truncate",children:["Intercept ",e.name," requests via MITM proxy"]})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[$.length>0&&(0,a.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,a.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:$.map(e=>(0,a.jsxs)("li",{children:["127.0.0.1 ",e]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,a.jsxs)("p",{children:["Toggle DNS to redirect ",e.name," traffic through 9Router via MITM."]}),!o&&(0,a.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),e.defaultModels?.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"grid gap-1.5 sm:grid-cols-[9rem_auto_1fr_auto_auto] sm:items-center sm:gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:O[e.alias]||"",onChange:t=>z(e.alias,t.target.value),onBlur:t=>{var s,a;return s=e.alias,a=t.target.value,void K({...O,[s]:a})},placeholder:"provider/model-id",disabled:!o,className:`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 ${!o?"opacity-50 cursor-not-allowed":""}`}),(0,a.jsx)("button",{onClick:()=>{P(e.alias),R(!0)},disabled:!x||!o,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 ${x&&o?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),O[e.alias]&&(0,a.jsx)("button",{onClick:()=>{z(e.alias,""),K({...O,[e.alias]:""})},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))}),e.defaultModels?.length===0&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:items-start",children:[o?(0,a.jsxs)("button",{onClick:D,disabled:!n||g,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,a.jsxs)("button",{onClick:D,disabled:!n||g,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,a.jsx)("span",{children:y})]})]})]})]}),v&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Required to modify /etc/hosts and flush DNS cache"})]}),(0,a.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:k,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"!==e.key||g||H()}}),A&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{children:A})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{w(!1),C(""),E(null)},disabled:g,children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"primary",size:"sm",onClick:H,loading:g,children:"Confirm"})]})]})}),(0,a.jsx)(r.rq,{isOpen:I,onClose:()=>R(!1),onSelect:e=>{if(!T||e.isPlaceholder)return;let t={...O,[T]:e.value};M(t),K(t)},selectedModel:T?O[T]:null,activeProviders:m,modelAliases:p,title:`Select model for ${T}`})]})}var v=s(99568),w=s.n(v);function k({tool:e}){return(0,a.jsx)(w(),{href:"/dashboard/mitm",className:"block",children:(0,a.jsx)(r.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"chevron_right"})]})})})}},45727:e=>{e.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},97990:(e,t,s)=>{s.d(t,{dM:()=>l,wn:()=>a});let a={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3-pro-high","gemini-3-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash / Default",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-4o-mini","claude-haiku-4.5","gpt-4o","gpt-5-mini"],defaultModels:[{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},l={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-6"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-6"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Cline Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Kilo Code Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
18
- "apiBase": "{{baseUrl}}",
19
- "title": "{{model}}",
20
- "model": "{{model}}",
21
- "provider": "openai",
22
- "apiKey": "{{apiKey}}"
23
- }`}},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{36698:(e,i,a)=>{a.d(i,{pp:()=>d,jY:()=>m});let t={alloy:{id:"alloy",name:"Alloy"},ash:{id:"ash",name:"Ash"},ballad:{id:"ballad",name:"Ballad"},cedar:{id:"cedar",name:"Cedar"},coral:{id:"coral",name:"Coral"},echo:{id:"echo",name:"Echo"},fable:{id:"fable",name:"Fable"},marin:{id:"marin",name:"Marin"},nova:{id:"nova",name:"Nova"},onyx:{id:"onyx",name:"Onyx"},sage:{id:"sage",name:"Sage"},shimmer:{id:"shimmer",name:"Shimmer"},verse:{id:"verse",name:"Verse"}},n=(...e)=>e.map(e=>({...t[e],type:"tts"})),o=n("alloy","ash","coral","echo","fable","nova","onyx","sage","shimmer"),s=n("alloy","ash","ballad","cedar","coral","echo","fable","marin","nova","onyx","sage","shimmer","verse"),r={openai:{models:[{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"tts-1",name:"TTS-1",type:"tts"}],voices:{"gpt-4o-mini-tts":s,"tts-1":o,"tts-1-hd":o},allVoices:s},openrouter:{models:[{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"openai/tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"openai/tts-1",name:"TTS-1",type:"tts"}],voices:{"openai/gpt-4o-mini-tts":s,"openai/tts-1":o,"openai/tts-1-hd":o},allVoices:s},elevenlabs:{models:[{id:"eleven_flash_v2_5",name:"Flash v2.5 (Fastest)",type:"tts"},{id:"eleven_turbo_v2_5",name:"Turbo v2.5 (Fast)",type:"tts"},{id:"eleven_multilingual_v2",name:"Multilingual v2 (Quality)",type:"tts"},{id:"eleven_monolingual_v1",name:"Monolingual v1 (English)",type:"tts"}]},"edge-tts":{defaults:[{id:"en-US-AriaNeural",name:"Aria (en-US)",type:"tts"},{id:"en-US-GuyNeural",name:"Guy (en-US)",type:"tts"},{id:"en-GB-SoniaNeural",name:"Sonia (en-GB)",type:"tts"},{id:"vi-VN-HoaiMyNeural",name:"Hoai My (vi-VN)",type:"tts"},{id:"vi-VN-NamMinhNeural",name:"Nam Minh (vi-VN)",type:"tts"},{id:"zh-CN-XiaoxiaoNeural",name:"Xiaoxiao (zh-CN)",type:"tts"},{id:"zh-CN-YunxiNeural",name:"Yunxi (zh-CN)",type:"tts"},{id:"fr-FR-DeniseNeural",name:"Denise (fr-FR)",type:"tts"},{id:"de-DE-KatjaNeural",name:"Katja (de-DE)",type:"tts"},{id:"ja-JP-NanamiNeural",name:"Nanami (ja-JP)",type:"tts"},{id:"ko-KR-SunHiNeural",name:"SunHi (ko-KR)",type:"tts"}]},"local-device":{defaults:[{id:"default",name:"System Default Voice",type:"tts"}]},"google-tts":{defaults:[{id:"af",name:"Afrikaans",type:"tts"},{id:"ar",name:"Arabic",type:"tts"},{id:"bg",name:"Bulgarian",type:"tts"},{id:"bn",name:"Bengali",type:"tts"},{id:"bs",name:"Bosnian",type:"tts"},{id:"ca",name:"Catalan",type:"tts"},{id:"cs",name:"Czech",type:"tts"},{id:"cy",name:"Welsh",type:"tts"},{id:"da",name:"Danish",type:"tts"},{id:"de",name:"German",type:"tts"},{id:"el",name:"Greek",type:"tts"},{id:"en",name:"English",type:"tts"},{id:"eo",name:"Esperanto",type:"tts"},{id:"es",name:"Spanish",type:"tts"},{id:"et",name:"Estonian",type:"tts"},{id:"fi",name:"Finnish",type:"tts"},{id:"fr",name:"French",type:"tts"},{id:"gu",name:"Gujarati",type:"tts"},{id:"hi",name:"Hindi",type:"tts"},{id:"hr",name:"Croatian",type:"tts"},{id:"hu",name:"Hungarian",type:"tts"},{id:"hy",name:"Armenian",type:"tts"},{id:"id",name:"Indonesian",type:"tts"},{id:"is",name:"Icelandic",type:"tts"},{id:"it",name:"Italian",type:"tts"},{id:"ja",name:"Japanese",type:"tts"},{id:"jw",name:"Javanese",type:"tts"},{id:"km",name:"Khmer",type:"tts"},{id:"kn",name:"Kannada",type:"tts"},{id:"ko",name:"Korean",type:"tts"},{id:"la",name:"Latin",type:"tts"},{id:"lv",name:"Latvian",type:"tts"},{id:"mk",name:"Macedonian",type:"tts"},{id:"ml",name:"Malayalam",type:"tts"},{id:"mr",name:"Marathi",type:"tts"},{id:"my",name:"Myanmar (Burmese)",type:"tts"},{id:"ne",name:"Nepali",type:"tts"},{id:"nl",name:"Dutch",type:"tts"},{id:"no",name:"Norwegian",type:"tts"},{id:"pl",name:"Polish",type:"tts"},{id:"pt",name:"Portuguese",type:"tts"},{id:"ro",name:"Romanian",type:"tts"},{id:"ru",name:"Russian",type:"tts"},{id:"si",name:"Sinhala",type:"tts"},{id:"sk",name:"Slovak",type:"tts"},{id:"sq",name:"Albanian",type:"tts"},{id:"sr",name:"Serbian",type:"tts"},{id:"su",name:"Sundanese",type:"tts"},{id:"sv",name:"Swedish",type:"tts"},{id:"sw",name:"Swahili",type:"tts"},{id:"ta",name:"Tamil",type:"tts"},{id:"te",name:"Telugu",type:"tts"},{id:"th",name:"Thai",type:"tts"},{id:"tl",name:"Filipino",type:"tts"},{id:"tr",name:"Turkish",type:"tts"},{id:"uk",name:"Ukrainian",type:"tts"},{id:"ur",name:"Urdu",type:"tts"},{id:"vi",name:"Vietnamese",type:"tts"},{id:"zh-CN",name:"Chinese (Simplified)",type:"tts"},{id:"zh-TW",name:"Chinese (Traditional)",type:"tts"}]}};function m(e,i){let a=r[e];return a?.voices&&(a.voices[i]||a.allVoices)||null}function d(){let e={};for(let[i,a]of Object.entries(r))a.models&&(e[`${i}-tts-models`]=a.models),a.allVoices&&(e[`${i}-tts-voices`]=a.allVoices),a.defaults&&(e[i]=a.defaults);return e["openai-tts-voices"]=r.openai.allVoices,e["openrouter-tts-voices"]=r.openrouter.allVoices,e}},43202:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>n,MA:()=>t.MA,UY:()=>m,Nu:()=>o,zN:()=>t.zN,B2:()=>r,h0:()=>s});var t=a(82495);a(69633);let n={name:"9Router proxy",description:"AI Infrastructure Management",version:"0.4.12"},o={changelogUrl:"https://raw.githubusercontent.com/decolua/9router/refs/heads/master/CHANGELOG.md"},s={npmPackageName:"9router",installCmd:"npm i -g 9router",exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:3e3,waitForExitMaxMs:15e3,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},m={maxLines:200,pollIntervalMs:1e3}},55348:(e,i,a)=>{a.d(i,{CL:()=>o,QC:()=>s,Xn:()=>n,YZ:()=>t});let t=["en","vi","zh-CN","zh-TW","ja","pt-BR","pt-PT","ko","es","de","fr","he","ar","ru","pl","cs","nl","tr","uk","tl","id","th","hi","bn","ur","ro","sv","it","el","hu","fi","da","no"],n="en",o="locale";function s(e){return"zh"===e||"zh-CN"===e?"zh-CN":"en"===e?"en":"vi"===e?"vi":"zh-TW"===e?"zh-TW":"ja"===e?"ja":"pt-BR"===e?"pt-BR":"pt-PT"===e?"pt-PT":"ko"===e?"ko":"es"===e?"es":"de"===e?"de":"fr"===e?"fr":"he"===e?"he":"ar"===e?"ar":"ru"===e?"ru":"pl"===e?"pl":"cs"===e?"cs":"nl"===e?"nl":"tr"===e?"tr":"uk"===e?"uk":"tl"===e?"tl":"id"===e?"id":"th"===e?"th":"hi"===e?"hi":"bn"===e?"bn":"ur"===e?"ur":"ro"===e?"ro":"sv"===e?"sv":"it"===e?"it":"el"===e?"el":"hu"===e?"hu":"fi"===e?"fi":"da"===e?"da":"no"===e?"no":n}},69633:(e,i,a)=>{a.d(i,{KC:()=>t.KC,Xg:()=>t.Xg});var t=a(94718);Object.entries(a(82495).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},82495:(e,i,a)=>{a.d(i,{DI:()=>c,IS:()=>t,JH:()=>l,MA:()=>b,Q2:()=>g,br:()=>m,fg:()=>r,gC:()=>u,gb:()=>h,mq:()=>p,nJ:()=>n,o5:()=>x,rj:()=>d,s9:()=>o,wG:()=>v,wb:()=>f,zN:()=>s,zt:()=>y});let t={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981",deprecated:!0,deprecationNotice:"Qwen OAuth free tier was discontinued by Alibaba on 2026-04-15. New connections will not work.",serviceKinds:["llm","tts","stt"],ttsConfig:{baseUrl:"http://localhost:8000/v1/audio/speech",authType:"none",authHeader:"none",format:"openai",models:[{id:"qwen3-tts",name:"Qwen3 TTS"}]}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:"Gemini CLI is designed exclusively for Gemini CLI. Using it with other tools (OpenClaw, Claude, Codex...) may result in account restrictions or bans."},iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},n={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding","stt"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev",notice:{apiKeyUrl:"https://aistudio.google.com/app/apikey"},serviceKinds:["llm","embedding","image","imageToText","webSearch"],searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]}},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},o={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},s={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"AG is designed exclusively for Antigravity IDE. Using it with other tools (OpenClaw, Claude, Codex...) may result in account restrictions or bans."},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",thinkingConfig:o.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC"},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL"}},r={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",notice:{apiKeyUrl:"https://platform.moonshot.ai/console/api-keys"},serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","image","imageToText","webSearch"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"}},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com",notice:{apiKeyUrl:"https://bailian.console.aliyun.com/?apiKey=1"}},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"xiaomi-mimo":{id:"xiaomi-mimo",alias:"mimo",name:"Xiaomi MiMo",icon:"smart_toy",color:"#FF6900",textIcon:"XM",website:"https://xiaomimimo.com",notice:{apiKeyUrl:"https://xiaomimimo.com"}},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com",notice:{apiKeyUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey"}},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",notice:{apiKeyUrl:"https://platform.openai.com/api-keys"},serviceKinds:["llm","embedding","tts","image","imageToText","webSearch"],thinkingConfig:o.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",notice:{apiKeyUrl:"https://console.anthropic.com/settings/keys"},serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",notice:{apiKeyUrl:"https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"},hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com",notice:{apiKeyUrl:"https://platform.deepseek.com/api_keys"}},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",notice:{apiKeyUrl:"https://console.groq.com/keys"},serviceKinds:["llm","imageToText"]},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai"},serviceKinds:["llm","imageToText","webSearch"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"}},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",notice:{apiKeyUrl:"https://console.mistral.ai/api-keys"},serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",notice:{apiKeyUrl:"https://www.perplexity.ai/settings/api"},serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",notice:{apiKeyUrl:"https://api.together.xyz/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",notice:{apiKeyUrl:"https://fireworks.ai/account/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai",notice:{apiKeyUrl:"https://cloud.cerebras.ai/platform"}},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com",notice:{apiKeyUrl:"https://dashboard.cohere.com/api-keys"}},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",notice:{apiKeyUrl:"https://studio.nebius.com/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com",notice:{apiKeyUrl:"https://cloud.siliconflow.com/account/ak"}},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",notice:{apiKeyUrl:"https://app.hyperbolic.xyz/settings"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",notice:{apiKeyUrl:"https://www.assemblyai.com/app/api-keys"},serviceKinds:["stt"]},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai",notice:{apiKeyUrl:"https://nanobananaapi.ai/dashboard"},serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",notice:{apiKeyUrl:"https://elevenlabs.io/app/settings/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",notice:{apiKeyUrl:"https://play.cartesia.ai/keys"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",notice:{apiKeyUrl:"https://play.ht/studio/api-access"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",notice:{apiKeyUrl:"https://huggingface.co/settings/tokens"},serviceKinds:["image","imageToText","tts"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",notice:{apiKeyUrl:"https://www.blackbox.ai/api-management"},serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai",notice:{apiKeyUrl:"https://chutes.ai/app/api"}},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models",notice:{apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},m={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},d=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"STT",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],l="openai-compatible-",c="anthropic-compatible-";function p(e){return"string"==typeof e&&e.startsWith(l)}function h(e){return"string"==typeof e&&e.startsWith(c)}function u(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}let g={...t,...n,...s,...r,...m},b={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function y(e){for(let i of Object.values(g))if(i.alias===e||i.id===e)return i;return null}function v(e){let i=g[e];return i?.alias||e}function x(e){return Object.values(g).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e)))}Object.values(g).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(g).reduce((e,i)=>(e[i.id]=i.alias,e),{});let f=["claude","antigravity","kiro","github","codex","kimi-coding","ollama"]},83789:(e,i,a)=>{a.d(i,{A:()=>r});var t=a(2074),n=a(11472),o=a(43202);function s(e){let i=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?a:e)?i.classList.add("dark"):i.classList.remove("dark")}let r=(0,t.v)((0,n.Zr)((e,i)=>({theme:o.B2.defaultTheme,setTheme:i=>{e({theme:i}),s(i)},toggleTheme:()=>{let a="dark"===i().theme?"light":"dark";e({theme:a}),s(a)},initTheme:()=>{s(i().theme)}}),{name:o.B2.storageKey}))},84502:(e,i,a)=>{a.d(i,{FE:()=>p,Tl:()=>d,wn:()=>h});var t=a(55348);let n={},o=t.Xn,s=[];function r(){if("u"<typeof document)return t.Xn;let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${t.CL}=`)),i=e?decodeURIComponent(e.split("=")[1]):t.Xn;return(0,t.QC)(i)}async function m(e){if("en"===e){n={};return}try{let i=await fetch(`/i18n/literals/${e}.json`);n=await i.json()}catch(e){console.error("Failed to load translations:",e),n={}}}function d(e){if(!e||"string"!=typeof e)return e;let i=e.trim();return i&&"en"!==o&&n[i]||e}function l(e){if(!e.nodeValue||!e.nodeValue.trim())return;let i=e.parentElement;if(!i)return;let a=i;for(;a;){if(a.hasAttribute&&a.hasAttribute("data-i18n-skip"))return;a=a.parentElement}if(["script","style","code","pre","colgroup","table","thead","tbody","tfoot","tr","select","datalist","optgroup"].includes(i.tagName?.toLowerCase()))return;e._originalText||(e._originalText=e.nodeValue);let t=d(e._originalText);t!==e.nodeValue&&(e.nodeValue=t)}function c(e){let i;if(!e)return;let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),t=[];for(;i=a.nextNode();)t.push(i);t.forEach(l)}async function p(){o=r(),await m(o),c(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?c(e):e.nodeType===Node.TEXT_NODE&&l(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function h(){o=r(),await m(o),s.forEach(e=>e()),c(document.body)}},94718:(e,i,a)=>{a.d(i,{Xg:()=>l,vq:()=>m,KC:()=>c});var t=a(390),n=a(89651);let o={"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,interleaved-thinking-2025-05-14"},s="https://api.kimi.com/coding/v1/messages",r={claude:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28","Anthropic-Dangerous-Direct-Browser-Access":"true","User-Agent":"claude-cli/2.1.92 (external, sdk-cli)","X-App":"cli","X-Stainless-Helper-Method":"stream","X-Stainless-Retry-Count":"0","X-Stainless-Runtime-Version":"v24.14.0","X-Stainless-Package-Version":"0.80.0","X-Stainless-Runtime":"node","X-Stainless-Lang":"js","X-Stainless-Arch":function(){switch((0,t.arch)()){case"x64":return"x64";case"arm64":return"arm64";case"ia32":return"x86";default:return`other::${(0,t.arch)()}`}}(),"X-Stainless-Os":function(){switch((0,t.platform)()){case"darwin":return"MacOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";default:return`Other::${(0,t.platform)()}`}}(),"X-Stainless-Timeout":"600"},clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",tokenUrl:"https://api.anthropic.com/v1/oauth/token"},gemini:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",format:"gemini",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},"gemini-cli":{baseUrl:"https://cloudcode-pa.googleapis.com/v1internal",format:"gemini-cli",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},codex:{baseUrl:"https://chatgpt.com/backend-api/codex/responses",format:"openai-responses",headers:{originator:"codex-cli","User-Agent":"codex-cli/1.0.18 (macOS; arm64)"},clientId:"app_EMoamEEZ73f0CkXaXp7hrann",tokenUrl:"https://auth.openai.com/oauth/token"},qwen:{baseUrl:"https://portal.qwen.ai/v1/chat/completions",format:"openai",clientId:"f0304373b74a44d2b584a3fb70ca9e56",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",authUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code"},iflow:{baseUrl:"https://apis.iflow.cn/v1/chat/completions",format:"openai",headers:{"User-Agent":"iFlow-Cli"},clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://iflow.cn/oauth/token",authUrl:"https://iflow.cn/oauth"},qoder:{baseUrl:"https://api.qoder.com/v1/chat/completions",format:"openai",headers:{"User-Agent":"Qoder-Cli"},clientId:n.env.QODER_OAUTH_CLIENT_ID||"10009311001",clientSecret:n.env.QODER_OAUTH_CLIENT_SECRET||"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://api.qoder.com/oauth/token",authUrl:"https://qoder.com/oauth/authorize"},antigravity:{baseUrls:["https://daily-cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],format:"antigravity",headers:{"User-Agent":`antigravity/1.107.0 ${(0,t.platform)()}/${(0,t.arch)()}`},clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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"},openrouter:{baseUrl:"https://openrouter.ai/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}},openai:{baseUrl:"https://api.openai.com/v1/chat/completions",format:"openai"},glm:{baseUrl:"https://api.z.ai/api/anthropic/v1/messages",format:"claude",headers:{...o}},"glm-cn":{baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",format:"openai",headers:{}},kimi:{baseUrl:s,format:"claude",headers:{...o}},minimax:{baseUrl:"https://api.minimax.io/anthropic/v1/messages",format:"claude",headers:{...o}},"minimax-cn":{baseUrl:"https://api.minimaxi.com/anthropic/v1/messages",format:"claude",headers:{...o}},alicode:{baseUrl:"https://coding.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},"alicode-intl":{baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},"volcengine-ark":{baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",format:"openai",headers:{}},byteplus:{baseUrl:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",format:"openai",headers:{}},github:{baseUrl:"https://api.githubcopilot.com/chat/completions",responsesUrl:"https://api.githubcopilot.com/responses",format:"openai",headers:{"copilot-integration-id":"vscode-chat","editor-version":"vscode/1.110.0","editor-plugin-version":"copilot-chat/0.38.0","user-agent":"GitHubCopilotChat/0.38.0","openai-intent":"conversation-panel","x-github-api-version":"2025-04-01","x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user",Accept:"application/json","Content-Type":"application/json"},clientId:"Iv1.b507a08c87ecfe98"},kiro:{baseUrl:"https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",format:"kiro",retry:{429:2},headers:{"Content-Type":"application/json",Accept:"application/vnd.amazon.eventstream","X-Amz-Target":"AmazonCodeWhispererStreamingService.GenerateAssistantResponse","User-Agent":"AWS-SDK-JS/3.0.0 kiro-ide/1.0.0","X-Amz-User-Agent":"aws-sdk-js/3.0.0 kiro-ide/1.0.0"},tokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authUrl:"https://prod.us-east-1.auth.desktop.kiro.dev"},cursor:{baseUrl:"https://api2.cursor.sh",chatPath:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",format:"cursor",headers:{"connect-accept-encoding":"gzip","connect-protocol-version":"1","Content-Type":"application/connect+proto","User-Agent":"connect-es/1.6.1"},clientVersion:"3.1.0"},"kimi-coding":{baseUrl:s,format:"claude",headers:{...o},clientId:"17e5f671-d194-4dfb-9706-5516cb48c098",tokenUrl:"https://auth.kimi.com/api/oauth/token",refreshUrl:"https://auth.kimi.com/api/oauth/token"},kilocode:{baseUrl:"https://api.kilo.ai/api/openrouter/chat/completions",format:"openai",headers:{}},opencode:{baseUrl:"http://localhost:4096/v1/chat/completions",format:"openai",headers:{}},cline:{baseUrl:"https://api.cline.bot/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://cline.bot","X-Title":"Cline"},tokenUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},nvidia:{baseUrl:"https://integrate.api.nvidia.com/v1/chat/completions",format:"openai"},anthropic:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{...o}},deepseek:{baseUrl:"https://api.deepseek.com/chat/completions",format:"openai"},groq:{baseUrl:"https://api.groq.com/openai/v1/chat/completions",format:"openai"},xai:{baseUrl:"https://api.x.ai/v1/chat/completions",format:"openai"},mistral:{baseUrl:"https://api.mistral.ai/v1/chat/completions",format:"openai"},perplexity:{baseUrl:"https://api.perplexity.ai/chat/completions",format:"openai"},together:{baseUrl:"https://api.together.xyz/v1/chat/completions",format:"openai"},fireworks:{baseUrl:"https://api.fireworks.ai/inference/v1/chat/completions",format:"openai"},cerebras:{baseUrl:"https://api.cerebras.ai/v1/chat/completions",format:"openai"},cohere:{baseUrl:"https://api.cohere.ai/v1/chat/completions",format:"openai"},nebius:{baseUrl:"https://api.studio.nebius.ai/v1/chat/completions",format:"openai"},siliconflow:{baseUrl:"https://api.siliconflow.cn/v1/chat/completions",format:"openai"},hyperbolic:{baseUrl:"https://api.hyperbolic.xyz/v1/chat/completions",format:"openai"},deepgram:{baseUrl:"https://api.deepgram.com/v1/listen",format:"openai"},assemblyai:{baseUrl:"https://api.assemblyai.com/v1/audio/transcriptions",format:"openai"},nanobanana:{baseUrl:"https://api.nanobananaapi.ai/v1/chat/completions",format:"openai"},chutes:{baseUrl:"https://llm.chutes.ai/v1/chat/completions",format:"openai"},ollama:{baseUrl:"https://ollama.com/api/chat",format:"ollama"},"ollama-local":{baseUrl:"http://localhost:11434/api/chat",format:"ollama"},vertex:{baseUrl:"https://aiplatform.googleapis.com",format:"vertex"},"vertex-partner":{baseUrl:"https://aiplatform.googleapis.com",format:"openai"},gitlab:{baseUrl:"https://gitlab.com/api/v4/chat/completions",format:"openai"},codebuddy:{baseUrl:"https://copilot.tencent.com/v1/chat/completions",format:"openai"},opencode:{baseUrl:"https://opencode.ai",format:"openai",headers:{"x-opencode-client":"desktop"},noAuth:!0},"opencode-go":{baseUrl:"https://opencode.ai/zen/go/v1/chat/completions",format:"openai",headers:{}},"grok-web":{baseUrl:"https://grok.com/rest/app-chat/conversations/new",format:"grok-web",authType:"cookie"},"perplexity-web":{baseUrl:"https://www.perplexity.ai/rest/sse/perplexity_ask",format:"perplexity-web",authType:"cookie"},azure:{baseUrl:"",format:"openai",headers:{}},"cloudflare-ai":{baseUrl:"https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",format:"openai"},"xiaomi-mimo":{baseUrl:"https://api.xiaomimimo.com/v1/chat/completions",format:"openai"}},m={cc:[{id:"claude-opus-4-7",name:"Claude Opus 4.7"},{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.5",name:"GPT 5.5"},{id:"gpt-5.4",name:"GPT 5.4"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.3-codex-spark",name:"GPT 5.3 Codex Spark"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"},{id:"gpt-5.4-image",name:"GPT 5.4 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]},{id:"gpt-5.3-image",name:"GPT 5.3 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]},{id:"gpt-5.2-image",name:"GPT 5.2 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"},{id:"coder-model",name:"Qwen3.6 Coder Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-max",name:"Qwen3 Max"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus"},{id:"qwen3-max-preview",name:"Qwen3 Max Preview"},{id:"qwen3-235b",name:"Qwen3 235B A22B"},{id:"qwen3-235b-a22b-instruct",name:"Qwen3 235B A22B Instruct"},{id:"qwen3-235b-a22b-thinking-2507",name:"Qwen3 235B A22B Thinking"},{id:"qwen3-32b",name:"Qwen3 32B"},{id:"kimi-k2",name:"Kimi K2"},{id:"deepseek-v3.2",name:"DeepSeek V3.2 Exp"},{id:"deepseek-v3.1",name:"DeepSeek V3.1 Terminus"},{id:"deepseek-v3",name:"DeepSeek V3 671B"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"glm-4.7",name:"GLM 4.7"},{id:"iflow-rome-30ba3b",name:"iFlow ROME"}],ag:[{id:"gemini-3.1-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3.1-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",thinking:!1},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium"}],gh:[{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"gpt-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"claude-opus-4.7",name:"Claude Opus 4.7"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"},{id:"goldeneye-free-auto",name:"GoldenEye"},{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",type:"embedding"},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",type:"embedding"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",strip:["image","audio"]},{id:"qwen3-coder-next",name:"Qwen3 Coder Next",strip:["image","audio"]},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"claude-4.6-opus-max",name:"Claude 4.6 Opus Max"},{id:"claude-4.6-sonnet-medium-thinking",name:"Claude 4.6 Sonnet Medium Thinking"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"}],kmc:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],kc:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner"}],"opencode-go":[{id:"kimi-k2.6",name:"Kimi K2.6"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"qwen3.5-plus",name:"Qwen 3.5 Plus"},{id:"qwen3.6-plus",name:"Qwen 3.6 Plus"},{id:"mimo-v2-pro",name:"MiMo V2 Pro"},{id:"mimo-v2-omni",name:"MiMo V2 Omni"},{id:"minimax-m2.7",name:"MiniMax M2.7",targetFormat:"claude"},{id:"minimax-m2.5",name:"MiniMax M2.5",targetFormat:"claude"}],oc:[],cl:[{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7"},{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6"},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"openai/gpt-5.4",name:"GPT-5.4"},{id:"google/gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"google/gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"kwaipilot/kat-coder-pro",name:"KAT Coder Pro"}],openai:[{id:"gpt-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 Nano"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-nano",name:"GPT-5 Nano"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini"},{id:"gpt-4.1-nano",name:"GPT-4.1 Nano"},{id:"o3",name:"O3"},{id:"o3-mini",name:"O3 Mini"},{id:"o3-pro",name:"O3 Pro"},{id:"o4-mini",name:"O4 Mini"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",type:"embedding"},{id:"text-embedding-3-small",name:"Text Embedding 3 Small",type:"embedding"},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",type:"embedding"},{id:"tts-1",name:"TTS-1",type:"tts"},{id:"tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"gpt-image-1",name:"GPT Image 1",type:"image",params:["n","size","quality","response_format"]},{id:"dall-e-3",name:"DALL-E 3",type:"image",params:["size","quality","style","response_format"]},{id:"dall-e-2",name:"DALL-E 2",type:"image",params:["n","size","response_format"]}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"},{id:"gemini-2.0-flash",name:"Gemini 2.0 Flash"},{id:"gemini-2.0-flash-lite",name:"Gemini 2.0 Flash Lite"},{id:"gemma-4-31b-it",name:"Gemma 4 31B IT"},{id:"gemini-embedding-2-preview",name:"Gemini Embedding 2 Preview",type:"embedding"},{id:"gemini-embedding-001",name:"Gemini Embedding 001",type:"embedding"},{id:"text-embedding-005",name:"Text Embedding 005",type:"embedding"},{id:"text-embedding-004",name:"Text Embedding 004 (Legacy)",type:"embedding"},{id:"gemini-3.1-flash-image-preview",name:"Gemini 3.1 Flash Image (Nano Banana 2)",type:"image",params:[]},{id:"gemini-3-pro-image-preview",name:"Gemini 3 Pro Image (Nano Banana Pro)",type:"image",params:[]},{id:"gemini-2.5-flash-image",name:"Gemini 2.5 Flash Image (Nano Banana)",type:"image",params:[]}],openrouter:[{id:"openai/text-embedding-3-large",name:"OpenAI Text Embedding 3 Large",type:"embedding"},{id:"openai/text-embedding-3-small",name:"OpenAI Text Embedding 3 Small",type:"embedding"},{id:"openai/text-embedding-ada-002",name:"OpenAI Text Embedding Ada 002",type:"embedding"},{id:"qwen/qwen3-embedding-8b",name:"Qwen3 Embedding 8B",type:"embedding"},{id:"perplexity/pplx-embed-v1-4b",name:"Perplexity Embed V1 4B",type:"embedding"},{id:"perplexity/pplx-embed-v1-0.6b",name:"Perplexity Embed V1 0.6B",type:"embedding"},{id:"nvidia/llama-nemotron-embed-vl-1b-v2:free",name:"NVIDIA Nemotron Embed VL 1B V2 (Free)",type:"embedding"},{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"openai/tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"openai/tts-1",name:"TTS-1",type:"tts"},{id:"openai/dall-e-3",name:"DALL-E 3 (via OpenRouter)",type:"image",params:["size","quality","style","response_format"]},{id:"openai/gpt-image-1",name:"GPT Image 1 (via OpenRouter)",type:"image",params:["n","size","quality","response_format"]},{id:"google/imagen-3.0-generate-002",name:"Imagen 3 (via OpenRouter)",type:"image",params:["n","size"]},{id:"black-forest-labs/FLUX.1-schnell",name:"FLUX.1 Schnell (via OpenRouter)",type:"image",params:["n","size"]}],glm:[{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"},{id:"minimax-image-01",name:"MiniMax Image 01",type:"image",params:["n","size","response_format"]}],blackbox:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Legacy)"},{id:"claude-opus-4-6",name:"Claude Opus 4.6 (Legacy)"},{id:"deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek-v3-671b",name:"DeepSeek V3 671B"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"o1",name:"OpenAI o1"},{id:"o3-mini",name:"OpenAI o3-mini"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-max",name:"Qwen3 Max"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus"}],"minimax-cn":[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],alicode:[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-max-2026-01-23",name:"Qwen3 Max"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],"alicode-intl":[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],"volcengine-ark":[{id:"Doubao-Seed-2.0-Code",name:"Doubao-Seed-2.0-Code"},{id:"Doubao-Seed-2.0-pro",name:"Doubao-Seed-2.0-pro"},{id:"Doubao-Seed-2.0-lite",name:"Doubao-Seed-2.0-lite"},{id:"Doubao-Seed-Code",name:"Doubao-Seed-Code"},{id:"GLM-5.1",name:"GLM-5.1"},{id:"MiniMax-M2.7",name:"MiniMax-M2.7"},{id:"Kimi-K2.6",name:"Kimi-K2.6"},{id:"MiniMax-M2.5",name:"MiniMax-M2.5"},{id:"Kimi-K2.5",name:"Kimi-K2.5"},{id:"GLM-4.7",name:"GLM-4.7"},{id:"DeepSeek-V3.2",name:"DeepSeek-V3.2"}],"cloudflare-ai":[{id:"@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6"},{id:"@cf/zai-org/glm-4.7-flash",name:"GLM 4.7 Flash"}],byteplus:[{id:"seed-2-0-pro-260328",name:"Seed 2.0 Pro"},{id:"seed-2-0-code-preview-260328",name:"Seed 2.0 Code Preview"},{id:"seed-2-0-mini-260215",name:"Seed 2.0 Mini"},{id:"seed-2-0-lite-260228",name:"Seed 2.0 Lite"},{id:"kimi-k2-thinking-251104",name:"Kimi K2 Thinking"},{id:"glm-4-7-251222",name:"GLM 4.7"},{id:"gpt-oss-120b-250805",name:"GPT-OSS-120B"}],deepseek:[{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash"},{id:"deepseek-chat",name:"DeepSeek V3.2 Chat"},{id:"deepseek-reasoner",name:"DeepSeek V3.2 Reasoner"}],groq:[{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B"},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"qwen/qwen3-32b",name:"Qwen3 32B"},{id:"openai/gpt-oss-120b",name:"GPT-OSS 120B"}],xai:[{id:"grok-4",name:"Grok 4"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast"},{id:"grok-3",name:"Grok 3"}],mistral:[{id:"mistral-large-latest",name:"Mistral Large 3"},{id:"codestral-latest",name:"Codestral"},{id:"mistral-medium-latest",name:"Mistral Medium 3"},{id:"mistral-embed",name:"Mistral Embed",type:"embedding"}],perplexity:[{id:"sonar-pro",name:"Sonar Pro"},{id:"sonar",name:"Sonar"}],together:[{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B Turbo"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B"},{id:"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",name:"Llama 4 Maverick"},{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",type:"embedding"},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",type:"embedding"}],fireworks:[{id:"accounts/fireworks/models/deepseek-v3p1",name:"DeepSeek V3.1"},{id:"accounts/fireworks/models/llama-v3p3-70b-instruct",name:"Llama 3.3 70B"},{id:"accounts/fireworks/models/qwen3-235b-a22b",name:"Qwen3 235B"},{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",type:"embedding"}],cerebras:[{id:"gpt-oss-120b",name:"GPT OSS 120B"},{id:"zai-glm-4.7",name:"ZAI GLM 4.7"},{id:"llama-3.3-70b",name:"Llama 3.3 70B"},{id:"llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout"},{id:"qwen-3-235b-a22b-instruct-2507",name:"Qwen3 235B A22B"},{id:"qwen-3-32b",name:"Qwen3 32B"}],cohere:[{id:"command-r-plus-08-2024",name:"Command R+ (Aug 2024)"},{id:"command-r-08-2024",name:"Command R (Aug 2024)"},{id:"command-a-03-2025",name:"Command A (Mar 2025)"}],nvidia:[{id:"minimaxai/minimax-m2.7",name:"Minimax M2.7"},{id:"z-ai/glm4.7",name:"GLM 4.7"},{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",type:"embedding"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"},{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",type:"embedding"}],"voyage-ai":[{id:"voyage-3-large",name:"Voyage 3 Large",type:"embedding"},{id:"voyage-3.5",name:"Voyage 3.5",type:"embedding"},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",type:"embedding"},{id:"voyage-code-3",name:"Voyage Code 3",type:"embedding"},{id:"voyage-finance-2",name:"Voyage Finance 2",type:"embedding"},{id:"voyage-law-2",name:"Voyage Law 2",type:"embedding"},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",type:"embedding"}],siliconflow:[{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek V3.2"},{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek V3.1"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B"},{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3 Coder 480B"},{id:"Qwen/Qwen3-32B",name:"Qwen3 32B"},{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5"},{id:"zai-org/GLM-4.7",name:"GLM 4.7"},{id:"openai/gpt-oss-120b",name:"GPT OSS 120B"},{id:"baidu/ERNIE-4.5-300B-A47B",name:"ERNIE 4.5 300B"}],"xiaomi-mimo":[{id:"mimo-v2.5-pro",name:"MiMo V2.5 Pro"},{id:"mimo-v2.5",name:"MiMo V2.5"},{id:"mimo-v2-omni",name:"MiMo V2 Omni"},{id:"mimo-v2-flash",name:"MiMo V2 Flash"}],hyperbolic:[{id:"Qwen/QwQ-32B",name:"QwQ 32B"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3"},{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B"},{id:"meta-llama/Llama-3.2-3B-Instruct",name:"Llama 3.2 3B"},{id:"Qwen/Qwen2.5-72B-Instruct",name:"Qwen 2.5 72B"},{id:"Qwen/Qwen2.5-Coder-32B-Instruct",name:"Qwen 2.5 Coder 32B"},{id:"NousResearch/Hermes-3-Llama-3.1-70B",name:"Hermes 3 70B"}],ollama:[{id:"gpt-oss:120b",name:"GPT OSS 120B"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"minimax-m2.5",name:"MiniMax M2.5"},{id:"glm-4.7-flash",name:"GLM 4.7 Flash"},{id:"qwen3.5",name:"Qwen3.5"}],vertex:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"}],"vertex-partner":[{id:"deepseek-ai/deepseek-v3.2-maas",name:"DeepSeek V3.2 (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-thinking-maas",name:"Qwen3 Next 80B Thinking (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-instruct-maas",name:"Qwen3 Next 80B Instruct (Vertex)"},{id:"zai-org/glm-5-maas",name:"GLM-5 (Vertex)"}],"grok-web":[{id:"grok-3",name:"Grok 3"},{id:"grok-3-mini",name:"Grok 3 Mini (Thinking)"},{id:"grok-3-thinking",name:"Grok 3 Thinking"},{id:"grok-4",name:"Grok 4"},{id:"grok-4-mini",name:"Grok 4 Mini (Thinking)"},{id:"grok-4-thinking",name:"Grok 4 Thinking"},{id:"grok-4-heavy",name:"Grok 4 Heavy (SuperGrok)"},{id:"grok-4.1-mini",name:"Grok 4.1 Mini (Thinking)"},{id:"grok-4.1-fast",name:"Grok 4.1 Fast"},{id:"grok-4.1-expert",name:"Grok 4.1 Expert"},{id:"grok-4.1-thinking",name:"Grok 4.1 Thinking"},{id:"grok-4.2",name:"Grok 4.2 (4.20 Beta)"}],"perplexity-web":[{id:"pplx-auto",name:"Perplexity Auto (Free)"},{id:"pplx-sonar",name:"Perplexity Sonar"},{id:"pplx-gpt",name:"GPT-5.4 (via Perplexity)"},{id:"pplx-gemini",name:"Gemini 3.1 Pro (via Perplexity)"},{id:"pplx-sonnet",name:"Claude Sonnet 4.6 (via Perplexity)"},{id:"pplx-opus",name:"Claude Opus 4.6 (via Perplexity)"},{id:"pplx-nemotron",name:"Nemotron 3 Super (via Perplexity)"}],...(0,a(36698).pp)(),nanobanana:[{id:"nanobanana-flash",name:"NanoBanana Flash",type:"image",params:["n","size"]},{id:"nanobanana-pro",name:"NanoBanana Pro",type:"image",params:["n","size"]}],sdwebui:[{id:"stable-diffusion-v1-5",name:"Stable Diffusion v1.5",type:"image",params:["n","size"]},{id:"sdxl-base-1.0",name:"SDXL Base 1.0",type:"image",params:["n","size"]}],comfyui:[{id:"flux-dev",name:"FLUX Dev",type:"image",params:["n","size"]},{id:"sdxl",name:"SDXL",type:"image",params:["n","size"]}],huggingface:[{id:"black-forest-labs/FLUX.1-schnell",name:"FLUX.1 Schnell",type:"image",params:[]},{id:"stabilityai/stable-diffusion-xl-base-1.0",name:"SDXL Base 1.0",type:"image",params:[]}]},d={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu","kimi-coding":"kmc",kilocode:"kc",cline:"cl",opencode:"oc",vertex:"vertex","vertex-partner":"vertex-partner"},l=Object.fromEntries(Object.keys(r).map(e=>[e,d[e]||e]));function c(e){return m[l[e]||e]||[]}},98814:(e,i,a)=>{a.d(i,{ThemeProvider:()=>s});var t=a(73365),n=a(1521),o=a(83789);function s({children:e}){let{initTheme:i}=(0,o.A)();return(0,n.useEffect)(()=>{i()},[i]),(0,t.jsx)(t.Fragment,{children:e})}}}]);