9router 0.3.87 → 0.3.90

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 (572) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +9 -8
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +6 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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/mitm/page.js +2 -2
  20. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  22. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  24. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  26. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  28. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  30. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  32. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  36. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  38. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/_global-error/page.js +3 -3
  40. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/_global-error.html +1 -1
  42. package/app/.next/server/app/_global-error.rsc +1 -1
  43. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  44. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  45. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  46. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  47. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  48. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  49. package/app/.next/server/app/_not-found/page.js +2 -2
  50. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/_not-found.html +1 -1
  52. package/app/.next/server/app/_not-found.rsc +3 -3
  53. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  54. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  55. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  56. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  57. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  58. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  59. package/app/.next/server/app/api/auth/login/route.js +1 -1
  60. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  61. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  62. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -2
  63. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  64. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +3 -3
  65. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  66. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  67. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  68. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  69. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  70. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  71. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  72. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  73. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  74. package/app/.next/server/app/api/combos/route.js +1 -1
  75. package/app/.next/server/app/api/health/route.js +1 -1
  76. package/app/.next/server/app/api/init/route.js +1 -1
  77. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  78. package/app/.next/server/app/api/keys/route.js +1 -1
  79. package/app/.next/server/app/api/locale/route.js +1 -1
  80. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  81. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  82. package/app/.next/server/app/api/models/alias/route.js +1 -1
  83. package/app/.next/server/app/api/models/availability/route.js +1 -1
  84. package/app/.next/server/app/api/models/route.js +1 -1
  85. package/app/.next/server/app/api/models/test/route.js +1 -1
  86. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  87. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  88. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  89. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  90. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  91. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  92. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  93. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  94. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  95. package/app/.next/server/app/api/pricing/route.js +1 -1
  96. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  97. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  98. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  99. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  100. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  101. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  102. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  103. package/app/.next/server/app/api/providers/client/route.js +1 -1
  104. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  105. package/app/.next/server/app/api/providers/route.js +1 -1
  106. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  107. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  108. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  109. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  110. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  111. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  112. package/app/.next/server/app/api/settings/database/route.js +1 -1
  113. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  114. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  115. package/app/.next/server/app/api/settings/route.js +1 -1
  116. package/app/.next/server/app/api/shutdown/route.js +1 -1
  117. package/app/.next/server/app/api/tags/route.js +1 -1
  118. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  119. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  120. package/app/.next/server/app/api/translator/load/route.js +1 -1
  121. package/app/.next/server/app/api/translator/save/route.js +1 -1
  122. package/app/.next/server/app/api/translator/send/route.js +1 -1
  123. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  124. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  125. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  126. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  127. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +2 -2
  128. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  129. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  130. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +3 -3
  131. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +2 -2
  132. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
  133. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  134. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  135. package/app/.next/server/app/api/usage/history/route.js +1 -1
  136. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  137. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  138. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  139. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  140. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  141. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  142. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  143. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  144. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  145. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  146. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  147. package/app/.next/server/app/api/v1/models/route.js +1 -1
  148. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -0
  149. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -0
  150. package/app/.next/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -0
  151. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  152. package/app/.next/server/app/api/v1/route.js +1 -1
  153. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  154. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  155. package/app/.next/server/app/api/version/route.js +1 -1
  156. package/app/.next/server/app/callback/page.js +2 -2
  157. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  158. package/app/.next/server/app/callback.html +1 -1
  159. package/app/.next/server/app/callback.rsc +3 -3
  160. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  161. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  162. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  163. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  164. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  165. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  166. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  167. package/app/.next/server/app/dashboard/basic-chat.rsc +5 -5
  168. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  169. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  170. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  171. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  172. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  173. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  174. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  175. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  176. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  177. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  178. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  179. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  180. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  181. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  182. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  183. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  184. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  185. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  186. package/app/.next/server/app/dashboard/combos.html +1 -1
  187. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  188. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  189. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  190. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  191. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  192. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  193. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  195. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  196. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  197. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  198. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  199. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  200. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  201. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  202. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  203. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  204. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  205. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  206. package/app/.next/server/app/dashboard/mitm.html +1 -1
  207. package/app/.next/server/app/dashboard/mitm.rsc +5 -5
  208. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  209. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  210. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  211. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  212. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  213. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  214. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  215. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  216. package/app/.next/server/app/dashboard/profile.html +1 -1
  217. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  218. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  219. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  220. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  221. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  222. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  223. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  224. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  225. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  226. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  227. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  228. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  229. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  230. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  231. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  232. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  233. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  234. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  235. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  236. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  237. package/app/.next/server/app/dashboard/providers.html +1 -1
  238. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  239. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  240. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  241. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  242. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  243. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  244. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  246. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  247. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  248. package/app/.next/server/app/dashboard/proxy-pools.rsc +5 -5
  249. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  250. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  251. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  252. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  253. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  254. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  255. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  256. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  257. package/app/.next/server/app/dashboard/quota.html +2 -2
  258. package/app/.next/server/app/dashboard/quota.rsc +6 -6
  259. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  260. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  261. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  262. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  263. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  264. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  265. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  266. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  267. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  268. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  269. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  270. package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
  271. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  272. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  273. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  274. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  275. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  276. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  277. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  278. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  279. package/app/.next/server/app/dashboard/translator.html +1 -1
  280. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  281. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  282. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  283. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  284. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  285. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  286. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  287. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  288. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  289. package/app/.next/server/app/dashboard/usage.html +1 -1
  290. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  291. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  292. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  293. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  294. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  295. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  296. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  297. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  298. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  299. package/app/.next/server/app/dashboard.html +1 -1
  300. package/app/.next/server/app/dashboard.rsc +5 -5
  301. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  302. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  303. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  304. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  305. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  306. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  307. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  308. package/app/.next/server/app/favicon.ico/route.js +1 -1
  309. package/app/.next/server/app/index.html +1 -1
  310. package/app/.next/server/app/index.rsc +3 -3
  311. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  312. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  313. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  314. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  315. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  316. package/app/.next/server/app/landing/page.js +2 -2
  317. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  318. package/app/.next/server/app/landing.html +1 -1
  319. package/app/.next/server/app/landing.rsc +3 -3
  320. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  321. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  322. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  323. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  324. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  325. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  326. package/app/.next/server/app/login/page.js +2 -2
  327. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  328. package/app/.next/server/app/login.html +1 -1
  329. package/app/.next/server/app/login.rsc +4 -4
  330. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  331. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  332. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  333. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  334. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  335. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  336. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  337. package/app/.next/server/app/page.js +2 -2
  338. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  339. package/app/.next/server/app-paths-manifest.json +9 -8
  340. package/app/.next/server/chunks/1574.js +1 -1
  341. package/app/.next/server/chunks/1578.js +1 -1
  342. package/app/.next/server/chunks/2049.js +1 -1
  343. package/app/.next/server/chunks/242.js +1 -1
  344. package/app/.next/server/chunks/3774.js +3 -3
  345. package/app/.next/server/chunks/450.js +1 -1
  346. package/app/.next/server/chunks/514.js +2 -2
  347. package/app/.next/server/chunks/586.js +1 -0
  348. package/app/.next/server/chunks/6379.js +1 -1
  349. package/app/.next/server/chunks/6502.js +1 -1
  350. package/app/.next/server/chunks/6560.js +1 -1
  351. package/app/.next/server/chunks/7243.js +1 -0
  352. package/app/.next/server/chunks/8202.js +3 -3
  353. package/app/.next/server/chunks/8480.js +1 -1
  354. package/app/.next/server/chunks/8838.js +1 -1
  355. package/app/.next/server/chunks/9489.js +1 -1
  356. package/app/.next/server/middleware-build-manifest.js +1 -1
  357. package/app/.next/server/middleware.js +4 -4
  358. package/app/.next/server/pages/404.html +1 -1
  359. package/app/.next/server/pages/500.html +1 -1
  360. package/app/.next/server/server-reference-manifest.js +1 -1
  361. package/app/.next/server/server-reference-manifest.json +1 -1
  362. package/app/.next/static/Seqmp6275x677iq3fTzPt/_buildManifest.js +1 -0
  363. package/app/.next/static/chunks/{1237-ad8b85796830b483.js → 1237-06ab8ceb0847165d.js} +1 -1
  364. package/app/.next/static/chunks/{4156-79259ee78f702b12.js → 4156-d2436f4645532dc5.js} +1 -1
  365. package/app/.next/static/chunks/{505-534835b087aaa3a0.js → 505-e8dec61412d86c58.js} +1 -1
  366. package/app/.next/static/chunks/8035-0bbf141cee7024b0.js +3 -0
  367. package/app/.next/static/chunks/app/_global-error/{page-ceb851f470785140.js → page-4ed867ac6edb2a89.js} +1 -1
  368. package/app/.next/static/chunks/app/api/auth/login/{route-ceb851f470785140.js → route-4ed867ac6edb2a89.js} +1 -1
  369. package/app/.next/static/chunks/app/api/auth/logout/{route-ceb851f470785140.js → route-4ed867ac6edb2a89.js} +1 -1
  370. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/{route-ceb851f470785140.js → route-4ed867ac6edb2a89.js} +1 -1
  371. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ed867ac6edb2a89.js +1 -0
  372. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-4ed867ac6edb2a89.js +1 -0
  373. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-4ed867ac6edb2a89.js +1 -0
  374. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-4ed867ac6edb2a89.js +1 -0
  375. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-4ed867ac6edb2a89.js +1 -0
  376. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-4ed867ac6edb2a89.js +1 -0
  377. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-4ed867ac6edb2a89.js +1 -0
  378. package/app/.next/static/chunks/app/api/cloud/auth/route-4ed867ac6edb2a89.js +1 -0
  379. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-4ed867ac6edb2a89.js +1 -0
  380. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-4ed867ac6edb2a89.js +1 -0
  381. package/app/.next/static/chunks/app/api/cloud/models/alias/route-4ed867ac6edb2a89.js +1 -0
  382. package/app/.next/static/chunks/app/api/combos/[id]/route-4ed867ac6edb2a89.js +1 -0
  383. package/app/.next/static/chunks/app/api/combos/route-4ed867ac6edb2a89.js +1 -0
  384. package/app/.next/static/chunks/app/api/health/route-4ed867ac6edb2a89.js +1 -0
  385. package/app/.next/static/chunks/app/api/init/route-4ed867ac6edb2a89.js +1 -0
  386. package/app/.next/static/chunks/app/api/keys/[id]/route-4ed867ac6edb2a89.js +1 -0
  387. package/app/.next/static/chunks/app/api/keys/route-4ed867ac6edb2a89.js +1 -0
  388. package/app/.next/static/chunks/app/api/locale/route-4ed867ac6edb2a89.js +1 -0
  389. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ed867ac6edb2a89.js +1 -0
  390. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-4ed867ac6edb2a89.js +1 -0
  391. package/app/.next/static/chunks/app/api/models/alias/route-4ed867ac6edb2a89.js +1 -0
  392. package/app/.next/static/chunks/app/api/models/availability/route-4ed867ac6edb2a89.js +1 -0
  393. package/app/.next/static/chunks/app/api/models/route-4ed867ac6edb2a89.js +1 -0
  394. package/app/.next/static/chunks/app/api/models/test/route-4ed867ac6edb2a89.js +1 -0
  395. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-4ed867ac6edb2a89.js +1 -0
  396. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-4ed867ac6edb2a89.js +1 -0
  397. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-4ed867ac6edb2a89.js +1 -0
  398. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-4ed867ac6edb2a89.js +1 -0
  399. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-4ed867ac6edb2a89.js +1 -0
  400. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-4ed867ac6edb2a89.js +1 -0
  401. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-4ed867ac6edb2a89.js +1 -0
  402. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-4ed867ac6edb2a89.js +1 -0
  403. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-4ed867ac6edb2a89.js +1 -0
  404. package/app/.next/static/chunks/app/api/pricing/route-4ed867ac6edb2a89.js +1 -0
  405. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-4ed867ac6edb2a89.js +1 -0
  406. package/app/.next/static/chunks/app/api/provider-nodes/route-4ed867ac6edb2a89.js +1 -0
  407. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-4ed867ac6edb2a89.js +1 -0
  408. package/app/.next/static/chunks/app/api/providers/[id]/models/route-4ed867ac6edb2a89.js +1 -0
  409. package/app/.next/static/chunks/app/api/providers/[id]/route-4ed867ac6edb2a89.js +1 -0
  410. package/app/.next/static/chunks/app/api/providers/[id]/test/route-4ed867ac6edb2a89.js +1 -0
  411. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-4ed867ac6edb2a89.js +1 -0
  412. package/app/.next/static/chunks/app/api/providers/client/route-4ed867ac6edb2a89.js +1 -0
  413. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-4ed867ac6edb2a89.js +1 -0
  414. package/app/.next/static/chunks/app/api/providers/route-4ed867ac6edb2a89.js +1 -0
  415. package/app/.next/static/chunks/app/api/providers/test-batch/route-4ed867ac6edb2a89.js +1 -0
  416. package/app/.next/static/chunks/app/api/providers/validate/route-4ed867ac6edb2a89.js +1 -0
  417. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-4ed867ac6edb2a89.js +1 -0
  418. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-4ed867ac6edb2a89.js +1 -0
  419. package/app/.next/static/chunks/app/api/proxy-pools/route-4ed867ac6edb2a89.js +1 -0
  420. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-4ed867ac6edb2a89.js +1 -0
  421. package/app/.next/static/chunks/app/api/settings/database/route-4ed867ac6edb2a89.js +1 -0
  422. package/app/.next/static/chunks/app/api/settings/proxy-test/route-4ed867ac6edb2a89.js +1 -0
  423. package/app/.next/static/chunks/app/api/settings/require-login/route-4ed867ac6edb2a89.js +1 -0
  424. package/app/.next/static/chunks/app/api/settings/route-4ed867ac6edb2a89.js +1 -0
  425. package/app/.next/static/chunks/app/api/shutdown/route-4ed867ac6edb2a89.js +1 -0
  426. package/app/.next/static/chunks/app/api/tags/route-4ed867ac6edb2a89.js +1 -0
  427. package/app/.next/static/chunks/app/api/translator/console-logs/route-4ed867ac6edb2a89.js +1 -0
  428. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-4ed867ac6edb2a89.js +1 -0
  429. package/app/.next/static/chunks/app/api/translator/load/route-4ed867ac6edb2a89.js +1 -0
  430. package/app/.next/static/chunks/app/api/translator/save/route-4ed867ac6edb2a89.js +1 -0
  431. package/app/.next/static/chunks/app/api/translator/send/route-4ed867ac6edb2a89.js +1 -0
  432. package/app/.next/static/chunks/app/api/translator/translate/route-4ed867ac6edb2a89.js +1 -0
  433. package/app/.next/static/chunks/app/api/tunnel/disable/route-4ed867ac6edb2a89.js +1 -0
  434. package/app/.next/static/chunks/app/api/tunnel/enable/route-4ed867ac6edb2a89.js +1 -0
  435. package/app/.next/static/chunks/app/api/tunnel/status/route-4ed867ac6edb2a89.js +1 -0
  436. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-4ed867ac6edb2a89.js +1 -0
  437. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-4ed867ac6edb2a89.js +1 -0
  438. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-4ed867ac6edb2a89.js +1 -0
  439. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-4ed867ac6edb2a89.js +1 -0
  440. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-4ed867ac6edb2a89.js +1 -0
  441. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-4ed867ac6edb2a89.js +1 -0
  442. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-4ed867ac6edb2a89.js +1 -0
  443. package/app/.next/static/chunks/app/api/usage/chart/route-4ed867ac6edb2a89.js +1 -0
  444. package/app/.next/static/chunks/app/api/usage/history/route-4ed867ac6edb2a89.js +1 -0
  445. package/app/.next/static/chunks/app/api/usage/providers/route-4ed867ac6edb2a89.js +1 -0
  446. package/app/.next/static/chunks/app/api/usage/request-details/route-4ed867ac6edb2a89.js +1 -0
  447. package/app/.next/static/chunks/app/api/usage/request-logs/route-4ed867ac6edb2a89.js +1 -0
  448. package/app/.next/static/chunks/app/api/usage/stats/route-4ed867ac6edb2a89.js +1 -0
  449. package/app/.next/static/chunks/app/api/usage/stream/route-4ed867ac6edb2a89.js +1 -0
  450. package/app/.next/static/chunks/app/api/v1/api/chat/route-4ed867ac6edb2a89.js +1 -0
  451. package/app/.next/static/chunks/app/api/v1/audio/speech/route-4ed867ac6edb2a89.js +1 -0
  452. package/app/.next/static/chunks/app/api/v1/chat/completions/route-4ed867ac6edb2a89.js +1 -0
  453. package/app/.next/static/chunks/app/api/v1/embeddings/route-4ed867ac6edb2a89.js +1 -0
  454. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-4ed867ac6edb2a89.js +1 -0
  455. package/app/.next/static/chunks/app/api/v1/messages/route-4ed867ac6edb2a89.js +1 -0
  456. package/app/.next/static/chunks/app/api/v1/models/route-4ed867ac6edb2a89.js +1 -0
  457. package/app/.next/static/chunks/app/api/v1/responses/compact/route-4ed867ac6edb2a89.js +1 -0
  458. package/app/.next/static/chunks/app/api/v1/responses/route-4ed867ac6edb2a89.js +1 -0
  459. package/app/.next/static/chunks/app/api/v1/route-4ed867ac6edb2a89.js +1 -0
  460. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-4ed867ac6edb2a89.js +1 -0
  461. package/app/.next/static/chunks/app/api/v1beta/models/route-4ed867ac6edb2a89.js +1 -0
  462. package/app/.next/static/chunks/app/api/version/route-4ed867ac6edb2a89.js +1 -0
  463. package/app/.next/static/chunks/app/manifest.webmanifest/route-4ed867ac6edb2a89.js +1 -0
  464. package/app/.next/static/chunks/app/page-4ed867ac6edb2a89.js +1 -0
  465. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-4ed867ac6edb2a89.js +1 -0
  466. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-4ed867ac6edb2a89.js +1 -0
  467. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-4ed867ac6edb2a89.js +1 -0
  468. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4ed867ac6edb2a89.js +1 -0
  469. package/app/package.json +1 -1
  470. package/app/src/mitm/server.js +6 -1
  471. package/cli.js +62 -36
  472. package/package.json +1 -1
  473. package/app/.next/static/ISW3Q3vhKNz3nIX0Um5qA/_buildManifest.js +0 -1
  474. package/app/.next/static/chunks/8035-f895fe0642100959.js +0 -3
  475. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-ceb851f470785140.js +0 -1
  476. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-ceb851f470785140.js +0 -1
  477. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-ceb851f470785140.js +0 -1
  478. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-ceb851f470785140.js +0 -1
  479. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-ceb851f470785140.js +0 -1
  480. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-ceb851f470785140.js +0 -1
  481. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-ceb851f470785140.js +0 -1
  482. package/app/.next/static/chunks/app/api/cloud/auth/route-ceb851f470785140.js +0 -1
  483. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-ceb851f470785140.js +0 -1
  484. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-ceb851f470785140.js +0 -1
  485. package/app/.next/static/chunks/app/api/cloud/models/alias/route-ceb851f470785140.js +0 -1
  486. package/app/.next/static/chunks/app/api/combos/[id]/route-ceb851f470785140.js +0 -1
  487. package/app/.next/static/chunks/app/api/combos/route-ceb851f470785140.js +0 -1
  488. package/app/.next/static/chunks/app/api/health/route-ceb851f470785140.js +0 -1
  489. package/app/.next/static/chunks/app/api/init/route-ceb851f470785140.js +0 -1
  490. package/app/.next/static/chunks/app/api/keys/[id]/route-ceb851f470785140.js +0 -1
  491. package/app/.next/static/chunks/app/api/keys/route-ceb851f470785140.js +0 -1
  492. package/app/.next/static/chunks/app/api/locale/route-ceb851f470785140.js +0 -1
  493. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ceb851f470785140.js +0 -1
  494. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-ceb851f470785140.js +0 -1
  495. package/app/.next/static/chunks/app/api/models/alias/route-ceb851f470785140.js +0 -1
  496. package/app/.next/static/chunks/app/api/models/availability/route-ceb851f470785140.js +0 -1
  497. package/app/.next/static/chunks/app/api/models/route-ceb851f470785140.js +0 -1
  498. package/app/.next/static/chunks/app/api/models/test/route-ceb851f470785140.js +0 -1
  499. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-ceb851f470785140.js +0 -1
  500. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-ceb851f470785140.js +0 -1
  501. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-ceb851f470785140.js +0 -1
  502. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-ceb851f470785140.js +0 -1
  503. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-ceb851f470785140.js +0 -1
  504. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-ceb851f470785140.js +0 -1
  505. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-ceb851f470785140.js +0 -1
  506. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-ceb851f470785140.js +0 -1
  507. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-ceb851f470785140.js +0 -1
  508. package/app/.next/static/chunks/app/api/pricing/route-ceb851f470785140.js +0 -1
  509. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-ceb851f470785140.js +0 -1
  510. package/app/.next/static/chunks/app/api/provider-nodes/route-ceb851f470785140.js +0 -1
  511. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-ceb851f470785140.js +0 -1
  512. package/app/.next/static/chunks/app/api/providers/[id]/models/route-ceb851f470785140.js +0 -1
  513. package/app/.next/static/chunks/app/api/providers/[id]/route-ceb851f470785140.js +0 -1
  514. package/app/.next/static/chunks/app/api/providers/[id]/test/route-ceb851f470785140.js +0 -1
  515. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-ceb851f470785140.js +0 -1
  516. package/app/.next/static/chunks/app/api/providers/client/route-ceb851f470785140.js +0 -1
  517. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-ceb851f470785140.js +0 -1
  518. package/app/.next/static/chunks/app/api/providers/route-ceb851f470785140.js +0 -1
  519. package/app/.next/static/chunks/app/api/providers/test-batch/route-ceb851f470785140.js +0 -1
  520. package/app/.next/static/chunks/app/api/providers/validate/route-ceb851f470785140.js +0 -1
  521. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-ceb851f470785140.js +0 -1
  522. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-ceb851f470785140.js +0 -1
  523. package/app/.next/static/chunks/app/api/proxy-pools/route-ceb851f470785140.js +0 -1
  524. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-ceb851f470785140.js +0 -1
  525. package/app/.next/static/chunks/app/api/settings/database/route-ceb851f470785140.js +0 -1
  526. package/app/.next/static/chunks/app/api/settings/proxy-test/route-ceb851f470785140.js +0 -1
  527. package/app/.next/static/chunks/app/api/settings/require-login/route-ceb851f470785140.js +0 -1
  528. package/app/.next/static/chunks/app/api/settings/route-ceb851f470785140.js +0 -1
  529. package/app/.next/static/chunks/app/api/shutdown/route-ceb851f470785140.js +0 -1
  530. package/app/.next/static/chunks/app/api/tags/route-ceb851f470785140.js +0 -1
  531. package/app/.next/static/chunks/app/api/translator/console-logs/route-ceb851f470785140.js +0 -1
  532. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-ceb851f470785140.js +0 -1
  533. package/app/.next/static/chunks/app/api/translator/load/route-ceb851f470785140.js +0 -1
  534. package/app/.next/static/chunks/app/api/translator/save/route-ceb851f470785140.js +0 -1
  535. package/app/.next/static/chunks/app/api/translator/send/route-ceb851f470785140.js +0 -1
  536. package/app/.next/static/chunks/app/api/translator/translate/route-ceb851f470785140.js +0 -1
  537. package/app/.next/static/chunks/app/api/tunnel/disable/route-ceb851f470785140.js +0 -1
  538. package/app/.next/static/chunks/app/api/tunnel/enable/route-ceb851f470785140.js +0 -1
  539. package/app/.next/static/chunks/app/api/tunnel/status/route-ceb851f470785140.js +0 -1
  540. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-ceb851f470785140.js +0 -1
  541. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-ceb851f470785140.js +0 -1
  542. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-ceb851f470785140.js +0 -1
  543. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-ceb851f470785140.js +0 -1
  544. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-ceb851f470785140.js +0 -1
  545. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-ceb851f470785140.js +0 -1
  546. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-ceb851f470785140.js +0 -1
  547. package/app/.next/static/chunks/app/api/usage/chart/route-ceb851f470785140.js +0 -1
  548. package/app/.next/static/chunks/app/api/usage/history/route-ceb851f470785140.js +0 -1
  549. package/app/.next/static/chunks/app/api/usage/providers/route-ceb851f470785140.js +0 -1
  550. package/app/.next/static/chunks/app/api/usage/request-details/route-ceb851f470785140.js +0 -1
  551. package/app/.next/static/chunks/app/api/usage/request-logs/route-ceb851f470785140.js +0 -1
  552. package/app/.next/static/chunks/app/api/usage/stats/route-ceb851f470785140.js +0 -1
  553. package/app/.next/static/chunks/app/api/usage/stream/route-ceb851f470785140.js +0 -1
  554. package/app/.next/static/chunks/app/api/v1/api/chat/route-ceb851f470785140.js +0 -1
  555. package/app/.next/static/chunks/app/api/v1/audio/speech/route-ceb851f470785140.js +0 -1
  556. package/app/.next/static/chunks/app/api/v1/chat/completions/route-ceb851f470785140.js +0 -1
  557. package/app/.next/static/chunks/app/api/v1/embeddings/route-ceb851f470785140.js +0 -1
  558. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-ceb851f470785140.js +0 -1
  559. package/app/.next/static/chunks/app/api/v1/messages/route-ceb851f470785140.js +0 -1
  560. package/app/.next/static/chunks/app/api/v1/models/route-ceb851f470785140.js +0 -1
  561. package/app/.next/static/chunks/app/api/v1/responses/route-ceb851f470785140.js +0 -1
  562. package/app/.next/static/chunks/app/api/v1/route-ceb851f470785140.js +0 -1
  563. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-ceb851f470785140.js +0 -1
  564. package/app/.next/static/chunks/app/api/v1beta/models/route-ceb851f470785140.js +0 -1
  565. package/app/.next/static/chunks/app/api/version/route-ceb851f470785140.js +0 -1
  566. package/app/.next/static/chunks/app/manifest.webmanifest/route-ceb851f470785140.js +0 -1
  567. package/app/.next/static/chunks/app/page-ceb851f470785140.js +0 -1
  568. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-ceb851f470785140.js +0 -1
  569. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-ceb851f470785140.js +0 -1
  570. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-ceb851f470785140.js +0 -1
  571. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ceb851f470785140.js +0 -1
  572. /package/app/.next/static/{ISW3Q3vhKNz3nIX0Um5qA → Seqmp6275x677iq3fTzPt}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:i,action:n,padding:o="md",hover:d=!1,className:c,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",d&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],c),...m,children:[(t||n)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,r.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),n]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:i="md",className:n}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-lg","bg-black/5 dark:bg-white/5",n),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("px-4 rounded-md font-medium transition-all",o[i],t===e.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:i,oauthMeta:c}){let[m,x]=(0,a.useState)("waiting"),[u,p]=(0,a.useState)(null),[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(null),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),C=(0,a.useRef)(null),S=(0,a.useRef)(!1),{copied:T,copy:$}=(0,o.C)(),[R,M]=(0,a.useState)(!1),[O,I]=(0,a.useState)("/callback?code=..."),P=(0,a.useRef)(!1);(0,a.useEffect)(()=>{M("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),I(`${window.location.origin}/callback?code=...`)},[]);let L=(0,a.useCallback)(async(e,s)=>{if(u)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:u.redirectUri,codeVerifier:u.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);x("success"),l?.()}catch(e){g(e.message),x("error")}},[u,t,l]),E=(0,a.useCallback)(async(e,s,r,a)=>{S.current=!1,w(!0);for(let i=0;i<60;i++){if(S.current){console.log("[OAuthModal] Polling aborted"),w(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),S.current){console.log("[OAuthModal] Polling aborted after sleep"),w(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),n=await i.json();if(n.success){S.current=!0,x("success"),w(!1),l?.();return}if("expired_token"===n.error||"access_denied"===n.error)throw Error(n.errorDescription||n.error);"slow_down"===n.error&&(r=Math.min(r+5,30))}catch(e){g(e.message),x("error"),w(!1);return}}g("Authorization timeout"),x("error"),w(!1)},[t,l]),A=(0,a.useCallback)(async()=>{if(t)try{let e;if(g(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){y(!0),x("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);N(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank");let a="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret}:null;E(s.device_code,s.codeVerifier,s.interval||5,a);return}if("codex"===t)e="http://localhost:1455/auth/callback";else{let t=window.location.port||("https:"===window.location.protocol?"443":"80");e=`http://localhost:${t}/callback`}let s=new URL(`/api/oauth/${t}/authorize`,window.location.origin);s.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&s.searchParams.set(e,t)});let r=await fetch(s.toString()),a=await r.json();if(!r.ok)throw Error(a.error);p({...a,redirectUri:e}),"codex"!==t&&R?(x("waiting"),C.current=window.open(a.authUrl,"oauth_popup","width=600,height=700"),C.current||x("input")):(x("input"),window.open(a.authUrl,"_blank"))}catch(e){g(e.message),x("error")}},[t,R,E]);(0,a.useEffect)(()=>{e&&t?(p(null),f(""),g(null),y(!1),N(null),w(!1),S.current=!1,A()):e||(S.current=!0)},[e,t,A]),(0,a.useEffect)(()=>{let e;if(!u)return;P.current=!1;let t=async e=>{if(P.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){P.current=!0,g(a||r),x("error");return}t&&(P.current=!0,await L(t,s))},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&t(s),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[u,L]);let _=async()=>{try{g(null);let e=new URL(h),t=e.searchParams.get("code"),s=e.searchParams.get("state"),r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!t)throw Error("No authorization code found in URL");await L(t,s)}catch(e){g(e.message),x("error")}},z=(0,a.useCallback)(()=>{i()},[i]);return t&&s?(0,r.jsx)(n.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:z,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===m&&!j&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Waiting for Authorization"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Complete the authorization in the popup window."}),(0,r.jsx)(n.$n,{variant:"ghost",onClick:()=>x("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===m&&j&&v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the URL below and enter the code:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Verification URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:v.verification_uri}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"verify_url"===T?"check":"content_copy",onClick:()=>$(v.verification_uri,"verify_url")})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:v.user_code}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"user_code"===T?"check":"content_copy",onClick:()=>$(v.user_code,"user_code")})]})]})]}),k&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"input"===m&&!j&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.pd,{value:u?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(n.$n,{variant:"secondary",icon:"auth_url"===T?"check":"content_copy",onClick:()=>$(u?.authUrl,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser."}),(0,r.jsx)(n.pd,{value:h,onChange:e=>f(e.target.value),placeholder:O,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:_,fullWidth:!0,disabled:!h,children:"Connect"}),(0,r.jsx)(n.$n,{onClick:z,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(n.$n,{onClick:z,fullWidth:!0,children:"Done"})]}),"error"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:b}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:A,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(n.$n,{onClick:z,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}d.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object}},3412:(e,t,s)=>{s.d(t,{default:()=>B});var r=s(73365),a=s(1521),l=s(29717),i=s(82495),n=s(35045),o=s(292),d=s(86447),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"text-2xl font-bold",children:m(e.totalRequests)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function b({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:i,sortOrder:n,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&j(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let y=(0,a.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+v.length;return(0,r.jsxs)(o.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:i,currentOrder:n})]},e.field)),v.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:i,currentOrder:n})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>y(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(b,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(b,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},b.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(70842),y=s(36629);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:i,active:n}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:n?s:"var(--color-border)",boxShadow:n?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:i}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:n?s:"var(--color-text)"},children:t}),n&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function N({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(97621),v.propTypes={data:c().object.isRequired},N.propTypes={data:c().object.isRequired};let k={provider:v,router:N};function w({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),x=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),{nodes:u,edges:p}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,x;let u,p,h=(m=e.provider,i.Q2[m]||{color:"#6b7280",name:m}),f=t.has(e.provider?.toLowerCase()),b=!f&&s.has(e.provider?.toLowerCase()),g=!f&&r.has(e.provider?.toLowerCase()),j=`provider-${e.provider}`,y={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(x=e.provider,`/providers/${x}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},v=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(v),k=n*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),o.push({id:j,type:"provider",position:{x:N-90,y:k-15},data:y,draggable:!1}),d.push({id:`e-${j}`,source:"router",sourceHandle:u,target:j,targetHandle:p,animated:f,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,c,m,x),[e,n,o,d]),h=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),f=(0,a.useRef)(null),b=(0,a.useCallback)(e=>{f.current=e,setTimeout(()=>e.fitView({padding:.3}),50)},[]);return(0,r.jsx)("div",{className:"w-full rounded-lg border border-border bg-bg-subtle/30",style:{height:480},children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(j.Gc,{nodes:u,edges:p,nodeTypes:k,fitView:!0,fitViewOptions:{padding:.3},onInit:b,proOptions:{hideAttribution:!0},panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1},h)})}w.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var C=s(71220),S=s(51142),T=s(35692),$=s(39719),R=s(94580),M=s(38147),O=s(80900);let I=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),P=e=>`$${(e||0).toFixed(4)}`;function L({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,i]=(0,a.useState)(!0),[n,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"p-4 flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:200,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)($.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)(R.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===n?I:P,width:50}),(0,r.jsx)(M.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[I(e),"Tokens"]:[P(e),"Cost"]}),"tokens"===n?(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function E({timestamp:e}){let t,[,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function A({requests:e=[]}){return(0,r.jsxs)(o.default,{className:"flex flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs border-collapse",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(E,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function _(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,i=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:i,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function z(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}L.propTypes={period:c().string};let q=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],U=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],D=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],W=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],K=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function B(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",o=t.get("sortOrder")||"asc",[d,c]=(0,a.useState)(null),[m,p]=(0,a.useState)(!0),[f,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)("model"),[v,N]=(0,a.useState)("costs"),[k,C]=(0,a.useState)([]),[S,T]=(0,a.useState)("7d");(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=new Set;C([...(e?.connections||[]).filter(e=>!t.has(e.provider)&&(t.add(e.provider),!0)),...Object.values(i.IS).filter(e=>e.noAuth&&!t.has(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{d?b(!0):p(!0),fetch(`/api/usage/stats?period=${S}`).then(e=>e.ok?e.json():null).then(e=>{e&&c(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{p(!1),b(!1)})},[S]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);c(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),p(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>p(!1),()=>e.close()},[]);let $=(0,a.useCallback)((s,r)=>{let a=new URLSearchParams(t.toString());a.get("sortBy")===r?a.set("sortOrder","asc"===a.get("sortOrder")?"desc":"asc"):(a.set("sortBy",r),a.set("sortOrder","asc")),e.replace(`?${a.toString()}`,{scroll:!1})},[t,e]),R=(0,a.useMemo)(()=>{if(!d)return null;switch(j){case"model":{let e=d.pending?.byModel||{};return{columns:q,groupedData:z(_(d.byModel,e,s,o),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return d?.pending?.byAccount&&Object.entries(d.byAccount||{}).forEach(([t,s])=>{let r=d.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:F,groupedData:z(_(d.byAccount,e,s,o),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:U,groupedData:z(_(d.byApiKey,{},s,o),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:D,groupedData:z(_(d.byEndpoint,{},s,o),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[d,j,s,o]);if(!d&&!m)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let M=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 self-end",children:[(0,r.jsx)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:K.map(e=>(0,r.jsx)("button",{onClick:()=>T(e.value),disabled:f,className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${S===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.value))}),f&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),m?M:(0,r.jsx)(x,{stats:d}),m?M:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(w,{providers:k,activeRequests:d.activeRequests||[],lastProvider:d.recentRequests?.[0]?.provider||"",errorProvider:d.errorProvider||""}),(0,r.jsx)(A,{requests:d.recentRequests||[]})]}),m?M:(0,r.jsx)(L,{period:S}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("select",{value:j,onChange:e=>y(e.target.value),className:"px-3 py-1.5 rounded-lg border border-border bg-bg-subtle text-sm font-medium text-text focus:outline-none focus:ring-2 focus:ring-primary/50",children:W.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:[(0,r.jsx)("button",{onClick:()=>N("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>N("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),m?M:R&&(0,r.jsx)(g,{title:"",columns:R.columns,groupedData:R.groupedData,tableType:j,sortBy:s,sortOrder:o,onToggleSort:$,viewMode:v,storageKey:R.storageKey,renderSummaryCells:R.renderSummaryCells,renderDetailCells:R.renderDetailCells,emptyMessage:R.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(1521),l=s(66911),i=s(38230);function n({isOpen:e,onClose:t,title:s="Manual Configuration",configs:o=[]}){let[d,c]=(0,a.useState)(null),m=async(e,t)=>{try{await navigator.clipboard.writeText(e),c(t),setTimeout(()=>c(null),2e3)}catch(e){console.log("Failed to copy:",e)}};return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:o.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(i.default,{variant:"ghost",size:"sm",onClick:()=>m(e.content,t),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:d===t?"check":"content_copy"}),d===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),i=s(55348),n=s(84502);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e=""}){let[t,s]=(0,a.useState)("en"),[c,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(!1),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{s(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}if(x)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let h=async e=>{if(e!==t&&!c){m(!0),u(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,n.wn)(),s(e)}catch(e){console.error("Failed to set locale:",e)}finally{m(!1)}}};return(0,r.jsxs)("div",{className:e,children:[(0,r.jsxs)("button",{onClick:()=>u(!x),disabled:c,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"text-xl",children:o(t).flag}),(0,r.jsx)("span",{className:"text-xs font-medium uppercase",children:t.split("-")[0]})]}),x&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>u(!1)}),(0,r.jsxs)("div",{ref:p,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>u(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:i.YZ.map(e=>{let s=t===e,a=o(e);return(0,r.jsxs)("button",{onClick:()=>h(e),disabled:c,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${s?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${c?"opacity-70 cursor-wait":""}`,title:a.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:a.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:a.name}),s&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),i=s(14793),n=s(56550),o=s(51123);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,i.i)(e=>e.notifications),x=(0,i.i)(e=>e.removeNotification);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,r.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,r.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,r.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(n.default,{})}),(0,r.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,r.jsx)(n.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300",children:[(0,r.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,r.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,r.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);function a({text:e,children:t,position:s="top"}){return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug bg-gray-900 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,children:e})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:i,disabled:n=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",n&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:n,onClick:()=>{!n&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-1 focus:ring-primary/30",e?"bg-primary":"bg-black/10 dark:bg-white/20",c[o].track,n&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(s||i)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),i&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},24372:(e,t,s)=>{s.d(t,{default:()=>x});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(66911),o=s(69633),d=s(82495);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function x({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:i=[],title:u="Select Model",modelAliases:p={}}){let[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)([]),[j,y]=(0,a.useState)([]),v=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();g(t.combos||[])}catch(e){console.error("Error fetching combos:",e),g([])}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();y(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),y([])}};(0,a.useEffect)(()=>{e&&N()},[e]);let k=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),w=(0,a.useMemo)(()=>{let e={};return[...new Set([...i.map(e=>e.provider),...m])].sort((e,t)=>{let s=c.indexOf(e),r=c.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(t=>{let s=o.Xg[t]||t,r=k[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(p).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=j.find(e=>e.id===t),i=l?.name||r.name;e[t]={name:i,alias:s,color:r.color,models:a}}}else if(a){let s=i.find(e=>e.provider===t),a=j.find(e=>e.id===t),l=s?.name||a?.name||r.name,n=s?.providerSpecificData?.prefix||a?.prefix||t,o=Object.entries(p).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:`${n}/${s.replace(`${t}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${t}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[t]={name:l,alias:n,color:r.color,models:d,isCustom:!0,hasModels:o.length>0}}else{let a=(0,o.KC)(t),l=new Set(a.map(e=>e.id)),i=a.length>0,n=Object.entries(p).filter(([e,t])=>t.startsWith(`${s}/`)&&(!i||e===t.replace(`${s}/`,""))&&!l.has(t.replace(`${s}/`,""))).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t,isCustom:!0})),d=[...a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`})),...n];d.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:d})}}),e},[i,p,k,j]),C=(0,a.useMemo)(()=>{if(!h.trim())return b;let e=h.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,h]),S=(0,a.useMemo)(()=>{if(!h.trim())return w;let e=h.toLowerCase(),t={};return Object.entries(w).forEach(([s,r])=>{let a=r.models.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)),l=r.name.toLowerCase().includes(e);(a.length>0||l)&&(t[s]={...r,models:a})}),t},[w,h]),T=e=>{s(e),t(),f("")};return(0,r.jsxs)(n.default,{isOpen:e,onClose:()=>{t(),f("")},title:u,size:"md",className:"p-4!",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:h,onChange:e=>f(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[C.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",C.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>T({id:e.name,name:e.name,value:e.name}),className:`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:i,action:n,padding:o="md",hover:d=!1,className:c,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",d&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],c),...m,children:[(t||n)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,r.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),n]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:i="md",className:n}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-lg","bg-black/5 dark:bg-white/5",n),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("px-4 rounded-md font-medium transition-all",o[i],t===e.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:i,oauthMeta:c}){let[m,x]=(0,a.useState)("waiting"),[u,p]=(0,a.useState)(null),[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(null),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),C=(0,a.useRef)(null),S=(0,a.useRef)(!1),{copied:T,copy:$}=(0,o.C)(),[R,M]=(0,a.useState)(!1),[O,I]=(0,a.useState)("/callback?code=..."),P=(0,a.useRef)(!1);(0,a.useEffect)(()=>{M("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),I(`${window.location.origin}/callback?code=...`)},[]);let L=(0,a.useCallback)(async(e,s)=>{if(u)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:u.redirectUri,codeVerifier:u.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);x("success"),l?.()}catch(e){g(e.message),x("error")}},[u,t,l]),E=(0,a.useCallback)(async(e,s,r,a)=>{S.current=!1,w(!0);for(let i=0;i<60;i++){if(S.current){console.log("[OAuthModal] Polling aborted"),w(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),S.current){console.log("[OAuthModal] Polling aborted after sleep"),w(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),n=await i.json();if(n.success){S.current=!0,x("success"),w(!1),l?.();return}if("expired_token"===n.error||"access_denied"===n.error)throw Error(n.errorDescription||n.error);"slow_down"===n.error&&(r=Math.min(r+5,30))}catch(e){g(e.message),x("error"),w(!1);return}}g("Authorization timeout"),x("error"),w(!1)},[t,l]),A=(0,a.useCallback)(async()=>{if(t)try{let e;if(g(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){y(!0),x("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);N(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank");let a="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret}:null;E(s.device_code,s.codeVerifier,s.interval||5,a);return}let s=window.location.port||("https:"===window.location.protocol?"443":"80"),r=!1;if("codex"===t){try{let e=await fetch(`/api/oauth/codex/start-proxy?app_port=${s}`);r=(await e.json()).success}catch{r=!1}e="http://localhost:1455/auth/callback"}else e=`http://localhost:${s}/callback`;let a=new URL(`/api/oauth/${t}/authorize`,window.location.origin);a.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&a.searchParams.set(e,t)});let l=await fetch(a.toString()),i=await l.json();if(!l.ok)throw Error(i.error);p({...i,redirectUri:e}),"codex"===t&&r||R&&"codex"!==t?(x("waiting"),C.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),C.current||x("input")):(x("input"),window.open(i.authUrl,"_blank"))}catch(e){g(e.message),x("error")}},[t,R,E]);(0,a.useEffect)(()=>{e&&t?(p(null),f(""),g(null),y(!1),N(null),w(!1),S.current=!1,A()):e||(S.current=!0,"codex"===t&&fetch("/api/oauth/codex/stop-proxy").catch(()=>{}))},[e,t,A]),(0,a.useEffect)(()=>{let e;if(!u)return;P.current=!1;let t=async e=>{if(P.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){P.current=!0,g(a||r),x("error");return}t&&(P.current=!0,await L(t,s))},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&t(s),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[u,L]);let _=async()=>{try{g(null);let e=new URL(h),t=e.searchParams.get("code"),s=e.searchParams.get("state"),r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!t)throw Error("No authorization code found in URL");await L(t,s)}catch(e){g(e.message),x("error")}},z=(0,a.useCallback)(()=>{"codex"===t&&fetch("/api/oauth/codex/stop-proxy").catch(()=>{}),i()},[i,t]);return t&&s?(0,r.jsx)(n.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:z,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===m&&!j&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Waiting for Authorization"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Complete the authorization in the popup window."}),(0,r.jsx)(n.$n,{variant:"ghost",onClick:()=>x("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===m&&j&&v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the URL below and enter the code:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Verification URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:v.verification_uri}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"verify_url"===T?"check":"content_copy",onClick:()=>$(v.verification_uri,"verify_url")})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:v.user_code}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"user_code"===T?"check":"content_copy",onClick:()=>$(v.user_code,"user_code")})]})]})]}),k&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"input"===m&&!j&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.pd,{value:u?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(n.$n,{variant:"secondary",icon:"auth_url"===T?"check":"content_copy",onClick:()=>$(u?.authUrl,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser."}),(0,r.jsx)(n.pd,{value:h,onChange:e=>f(e.target.value),placeholder:O,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:_,fullWidth:!0,disabled:!h,children:"Connect"}),(0,r.jsx)(n.$n,{onClick:z,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(n.$n,{onClick:z,fullWidth:!0,children:"Done"})]}),"error"===m&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:b}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:A,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(n.$n,{onClick:z,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}d.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object}},3412:(e,t,s)=>{s.d(t,{default:()=>B});var r=s(73365),a=s(1521),l=s(29717),i=s(82495),n=s(35045),o=s(292),d=s(86447),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"text-2xl font-bold",children:m(e.totalRequests)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function b({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:i,sortOrder:n,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&j(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let y=(0,a.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+v.length;return(0,r.jsxs)(o.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:i,currentOrder:n})]},e.field)),v.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:i,currentOrder:n})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>y(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(b,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(b,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},b.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(70842),y=s(36629);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:i,active:n}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:n?s:"var(--color-border)",boxShadow:n?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:i}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:n?s:"var(--color-text)"},children:t}),n&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function N({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(97621),v.propTypes={data:c().object.isRequired},N.propTypes={data:c().object.isRequired};let k={provider:v,router:N};function w({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),x=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),{nodes:u,edges:p}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,x;let u,p,h=(m=e.provider,i.Q2[m]||{color:"#6b7280",name:m}),f=t.has(e.provider?.toLowerCase()),b=!f&&s.has(e.provider?.toLowerCase()),g=!f&&r.has(e.provider?.toLowerCase()),j=`provider-${e.provider}`,y={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(x=e.provider,`/providers/${x}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},v=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(v),k=n*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),o.push({id:j,type:"provider",position:{x:N-90,y:k-15},data:y,draggable:!1}),d.push({id:`e-${j}`,source:"router",sourceHandle:u,target:j,targetHandle:p,animated:f,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,c,m,x),[e,n,o,d]),h=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),f=(0,a.useRef)(null),b=(0,a.useCallback)(e=>{f.current=e,setTimeout(()=>e.fitView({padding:.3}),50)},[]);return(0,r.jsx)("div",{className:"w-full rounded-lg border border-border bg-bg-subtle/30",style:{height:480},children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(j.Gc,{nodes:u,edges:p,nodeTypes:k,fitView:!0,fitViewOptions:{padding:.3},onInit:b,proOptions:{hideAttribution:!0},panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1},h)})}w.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var C=s(71220),S=s(51142),T=s(35692),$=s(39719),R=s(94580),M=s(38147),O=s(80900);let I=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),P=e=>`$${(e||0).toFixed(4)}`;function L({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,i]=(0,a.useState)(!0),[n,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"p-4 flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:200,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)($.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)(R.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===n?I:P,width:50}),(0,r.jsx)(M.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[I(e),"Tokens"]:[P(e),"Cost"]}),"tokens"===n?(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function E({timestamp:e}){let t,[,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function A({requests:e=[]}){return(0,r.jsxs)(o.default,{className:"flex flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs border-collapse",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(E,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function _(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,i=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:i,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function z(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}L.propTypes={period:c().string};let q=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],U=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],D=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],W=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],K=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function B(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",o=t.get("sortOrder")||"asc",[d,c]=(0,a.useState)(null),[m,p]=(0,a.useState)(!0),[f,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)("model"),[v,N]=(0,a.useState)("costs"),[k,C]=(0,a.useState)([]),[S,T]=(0,a.useState)("7d");(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=new Set;C([...(e?.connections||[]).filter(e=>!t.has(e.provider)&&(t.add(e.provider),!0)),...Object.values(i.IS).filter(e=>e.noAuth&&!t.has(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{d?b(!0):p(!0),fetch(`/api/usage/stats?period=${S}`).then(e=>e.ok?e.json():null).then(e=>{e&&c(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{p(!1),b(!1)})},[S]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);c(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),p(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>p(!1),()=>e.close()},[]);let $=(0,a.useCallback)((s,r)=>{let a=new URLSearchParams(t.toString());a.get("sortBy")===r?a.set("sortOrder","asc"===a.get("sortOrder")?"desc":"asc"):(a.set("sortBy",r),a.set("sortOrder","asc")),e.replace(`?${a.toString()}`,{scroll:!1})},[t,e]),R=(0,a.useMemo)(()=>{if(!d)return null;switch(j){case"model":{let e=d.pending?.byModel||{};return{columns:q,groupedData:z(_(d.byModel,e,s,o),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return d?.pending?.byAccount&&Object.entries(d.byAccount||{}).forEach(([t,s])=>{let r=d.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:F,groupedData:z(_(d.byAccount,e,s,o),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:U,groupedData:z(_(d.byApiKey,{},s,o),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:D,groupedData:z(_(d.byEndpoint,{},s,o),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[d,j,s,o]);if(!d&&!m)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let M=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 self-end",children:[(0,r.jsx)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:K.map(e=>(0,r.jsx)("button",{onClick:()=>T(e.value),disabled:f,className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${S===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.value))}),f&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),m?M:(0,r.jsx)(x,{stats:d}),m?M:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(w,{providers:k,activeRequests:d.activeRequests||[],lastProvider:d.recentRequests?.[0]?.provider||"",errorProvider:d.errorProvider||""}),(0,r.jsx)(A,{requests:d.recentRequests||[]})]}),m?M:(0,r.jsx)(L,{period:S}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("select",{value:j,onChange:e=>y(e.target.value),className:"px-3 py-1.5 rounded-lg border border-border bg-bg-subtle text-sm font-medium text-text focus:outline-none focus:ring-2 focus:ring-primary/50",children:W.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:[(0,r.jsx)("button",{onClick:()=>N("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>N("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),m?M:R&&(0,r.jsx)(g,{title:"",columns:R.columns,groupedData:R.groupedData,tableType:j,sortBy:s,sortOrder:o,onToggleSort:$,viewMode:v,storageKey:R.storageKey,renderSummaryCells:R.renderSummaryCells,renderDetailCells:R.renderDetailCells,emptyMessage:R.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(1521),l=s(66911),i=s(38230);function n({isOpen:e,onClose:t,title:s="Manual Configuration",configs:o=[]}){let[d,c]=(0,a.useState)(null),m=async(e,t)=>{try{await navigator.clipboard.writeText(e),c(t),setTimeout(()=>c(null),2e3)}catch(e){console.log("Failed to copy:",e)}};return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:o.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(i.default,{variant:"ghost",size:"sm",onClick:()=>m(e.content,t),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:d===t?"check":"content_copy"}),d===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),i=s(55348),n=s(84502);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e=""}){let[t,s]=(0,a.useState)("en"),[c,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(!1),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{s(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}if(x)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let h=async e=>{if(e!==t&&!c){m(!0),u(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,n.wn)(),s(e)}catch(e){console.error("Failed to set locale:",e)}finally{m(!1)}}};return(0,r.jsxs)("div",{className:e,children:[(0,r.jsxs)("button",{onClick:()=>u(!x),disabled:c,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"text-xl",children:o(t).flag}),(0,r.jsx)("span",{className:"text-xs font-medium uppercase",children:t.split("-")[0]})]}),x&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>u(!1)}),(0,r.jsxs)("div",{ref:p,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>u(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:i.YZ.map(e=>{let s=t===e,a=o(e);return(0,r.jsxs)("button",{onClick:()=>h(e),disabled:c,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${s?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${c?"opacity-70 cursor-wait":""}`,title:a.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:a.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:a.name}),s&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),i=s(14793),n=s(56550),o=s(51123);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,i.i)(e=>e.notifications),x=(0,i.i)(e=>e.removeNotification);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,r.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,r.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,r.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(n.default,{})}),(0,r.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,r.jsx)(n.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300",children:[(0,r.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,r.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,r.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);function a({text:e,children:t,position:s="top"}){return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug bg-gray-900 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,children:e})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:i,disabled:n=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",n&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:n,onClick:()=>{!n&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-1 focus:ring-primary/30",e?"bg-primary":"bg-black/10 dark:bg-white/20",c[o].track,n&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(s||i)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),i&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},24372:(e,t,s)=>{s.d(t,{default:()=>x});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(66911),o=s(69633),d=s(82495);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function x({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:i=[],title:u="Select Model",modelAliases:p={}}){let[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)([]),[j,y]=(0,a.useState)([]),v=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();g(t.combos||[])}catch(e){console.error("Error fetching combos:",e),g([])}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();y(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),y([])}};(0,a.useEffect)(()=>{e&&N()},[e]);let k=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),w=(0,a.useMemo)(()=>{let e={};return[...new Set([...i.map(e=>e.provider),...m])].sort((e,t)=>{let s=c.indexOf(e),r=c.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(t=>{let s=o.Xg[t]||t,r=k[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(p).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=j.find(e=>e.id===t),i=l?.name||r.name;e[t]={name:i,alias:s,color:r.color,models:a}}}else if(a){let s=i.find(e=>e.provider===t),a=j.find(e=>e.id===t),l=s?.name||a?.name||r.name,n=s?.providerSpecificData?.prefix||a?.prefix||t,o=Object.entries(p).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:`${n}/${s.replace(`${t}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${t}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[t]={name:l,alias:n,color:r.color,models:d,isCustom:!0,hasModels:o.length>0}}else{let a=(0,o.KC)(t),l=new Set(a.map(e=>e.id)),i=a.length>0,n=Object.entries(p).filter(([e,t])=>t.startsWith(`${s}/`)&&(!i||e===t.replace(`${s}/`,""))&&!l.has(t.replace(`${s}/`,""))).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t,isCustom:!0})),d=[...a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`})),...n];d.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:d})}}),e},[i,p,k,j]),C=(0,a.useMemo)(()=>{if(!h.trim())return b;let e=h.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,h]),S=(0,a.useMemo)(()=>{if(!h.trim())return w;let e=h.toLowerCase(),t={};return Object.entries(w).forEach(([s,r])=>{let a=r.models.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)),l=r.name.toLowerCase().includes(e);(a.length>0||l)&&(t[s]={...r,models:a})}),t},[w,h]),T=e=>{s(e),t(),f("")};return(0,r.jsxs)(n.default,{isOpen:e,onClose:()=>{t(),f("")},title:u,size:"md",className:"p-4!",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:h,onChange:e=>f(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[C.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",C.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>T({id:e.name,name:e.name,value:e.name}),className:`
2
2
  px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
3
3
  ${t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
4
  `,children:e.name},e.id)})})]}),Object.entries(S).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t.color}}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=l===e.value,s=e.isPlaceholder;return(0,r.jsx)("button",{onClick:()=>T(e),title:s?"Select to pre-fill, then edit model ID in the input":void 0,className:`
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{43202:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>n,MA:()=>t.MA,UY:()=>s,zN:()=>t.zN,B2:()=>o});var t=a(82495);a(69633);let n={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.3.87"},o={storageKey:"theme",defaultTheme:"system"},s={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(94281);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:()=>l,IS:()=>t,JH:()=>r,MA:()=>u,Q2:()=>h,fg:()=>d,gb:()=>p,mq:()=>c,nJ:()=>n,o5:()=>f,rj:()=>m,s9:()=>o,wG:()=>b,wb:()=>v,zN:()=>s,zt:()=>g});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"},"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",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0}},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"]},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"}},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",serviceKinds:["llm","embedding"]}},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},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},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"}},d={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",serviceKinds:["llm","embedding","tts"],thinkingConfig:o.effort},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",serviceKinds:["llm"]},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",serviceKinds:["stt"]},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",serviceKinds:["stt"]},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai",serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",serviceKinds:["tts"]},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",serviceKinds:["tts"],hidden:!0},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",serviceKinds:["tts"],hidden:!0},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",serviceKinds:["tts"],noAuth:!0},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",serviceKinds:["tts"],noAuth:!0},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",serviceKinds:["tts"],noAuth:!0},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",serviceKinds:["image","tts"],hiddenKinds:["tts"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai"},"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"}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Image",icon:"image",endpoint:{method:"POST",path:"/v1/images/generations"}},{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:"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"}}],r="openai-compatible-",l="anthropic-compatible-";function c(e){return"string"==typeof e&&e.startsWith(r)}function p(e){return"string"==typeof e&&e.startsWith(l)}let h={...t,...n,...s,...d},u={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function g(e){for(let i of Object.values(h))if(i.alias===e||i.id===e)return i;return null}function b(e){let i=h[e];return i?.alias||e}function f(e){return Object.values(h).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e)))}Object.values(h).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(h).reduce((e,i)=>(e[i.id]=i.alias,e),{});let v=["claude","antigravity","kiro","github","codex","kimi-coding"]},83789:(e,i,a)=>{a.d(i,{A:()=>d});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 d=(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:()=>r,wn:()=>h});var t=a(55348);let n={},o=t.Xn,s=[];function d(){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 r(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=r(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=d(),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=d(),await m(o),s.forEach(e=>e()),c(document.body)}},94281:(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",d={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",clientSecret:"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",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:{}},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"}}},m={cc:[{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.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"}],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",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{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:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{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:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"}],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:"deepseek-3.1",name:"DeepSeek 3.1",strip:["image","audio"]},{id:"qwen3-coder-next",name:"Qwen3 Coder Next",strip:["image","audio"]}],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"}],oc:[{id:"nemotron-3-super-free",name:"Nemotron 3 Super"},{id:"minimax-m2.5-free",name:"MiniMax M2.5",targetFormat:"claude"}],cl:[{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"}],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.1-flash-image-preview",name:"Gemini 3.1 Flash Image 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"}],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"}],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"}],"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"}],deepseek:[{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"}],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"}],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"}],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:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"}],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"}],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)"}],"local-device":[{id:"default",name:"System Default Voice",type:"tts"}],"google-tts":[{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"}],"openai-tts-voices":[{id:"alloy",name:"Alloy",type:"tts"},{id:"ash",name:"Ash",type:"tts"},{id:"ballad",name:"Ballad",type:"tts"},{id:"cedar",name:"Cedar",type:"tts"},{id:"coral",name:"Coral",type:"tts"},{id:"echo",name:"Echo",type:"tts"},{id:"fable",name:"Fable",type:"tts"},{id:"marin",name:"Marin",type:"tts"},{id:"nova",name:"Nova",type:"tts"},{id:"onyx",name:"Onyx",type:"tts"},{id:"sage",name:"Sage",type:"tts"},{id:"shimmer",name:"Shimmer",type:"tts"},{id:"verse",name:"Verse",type:"tts"}],"openai-tts-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"}],"elevenlabs-tts-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":[{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"}]},r={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(d).map(e=>[e,r[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})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{43202:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>n,MA:()=>t.MA,UY:()=>s,zN:()=>t.zN,B2:()=>o});var t=a(82495);a(69633);let n={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.3.90"},o={storageKey:"theme",defaultTheme:"system"},s={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(94281);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:()=>l,IS:()=>t,JH:()=>r,MA:()=>u,Q2:()=>h,fg:()=>d,gb:()=>p,mq:()=>c,nJ:()=>n,o5:()=>f,rj:()=>m,s9:()=>o,wG:()=>b,wb:()=>v,zN:()=>s,zt:()=>g});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"},"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",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0}},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"]},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"}},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",serviceKinds:["llm","embedding"]}},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},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},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"}},d={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",serviceKinds:["llm","embedding","tts"],thinkingConfig:o.effort},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",serviceKinds:["llm"]},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",serviceKinds:["stt"]},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",serviceKinds:["stt"]},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai",serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",serviceKinds:["tts"]},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",serviceKinds:["tts"],hidden:!0},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",serviceKinds:["tts"],hidden:!0},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",serviceKinds:["tts"],noAuth:!0},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",serviceKinds:["tts"],noAuth:!0},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",serviceKinds:["tts"],noAuth:!0},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",serviceKinds:["image","tts"],hiddenKinds:["tts"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai"},"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"}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Image",icon:"image",endpoint:{method:"POST",path:"/v1/images/generations"}},{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:"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"}}],r="openai-compatible-",l="anthropic-compatible-";function c(e){return"string"==typeof e&&e.startsWith(r)}function p(e){return"string"==typeof e&&e.startsWith(l)}let h={...t,...n,...s,...d},u={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function g(e){for(let i of Object.values(h))if(i.alias===e||i.id===e)return i;return null}function b(e){let i=h[e];return i?.alias||e}function f(e){return Object.values(h).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e)))}Object.values(h).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(h).reduce((e,i)=>(e[i.id]=i.alias,e),{});let v=["claude","antigravity","kiro","github","codex","kimi-coding"]},83789:(e,i,a)=>{a.d(i,{A:()=>d});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 d=(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:()=>r,wn:()=>h});var t=a(55348);let n={},o=t.Xn,s=[];function d(){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 r(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=r(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=d(),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=d(),await m(o),s.forEach(e=>e()),c(document.body)}},94281:(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",d={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",clientSecret:"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",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:{}},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}},m={cc:[{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.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"}],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",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{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:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{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:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"}],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:"deepseek-3.1",name:"DeepSeek 3.1",strip:["image","audio"]},{id:"qwen3-coder-next",name:"Qwen3 Coder Next",strip:["image","audio"]}],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"}],oc:[{id:"nemotron-3-super-free",name:"Nemotron 3 Super"},{id:"minimax-m2.5-free",name:"MiniMax M2.5",targetFormat:"claude"}],cl:[{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"}],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.1-flash-image-preview",name:"Gemini 3.1 Flash Image 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"}],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"}],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"}],"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"}],deepseek:[{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"}],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"}],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"}],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:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"}],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"}],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)"}],"local-device":[{id:"default",name:"System Default Voice",type:"tts"}],"google-tts":[{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"}],"openai-tts-voices":[{id:"alloy",name:"Alloy",type:"tts"},{id:"ash",name:"Ash",type:"tts"},{id:"ballad",name:"Ballad",type:"tts"},{id:"cedar",name:"Cedar",type:"tts"},{id:"coral",name:"Coral",type:"tts"},{id:"echo",name:"Echo",type:"tts"},{id:"fable",name:"Fable",type:"tts"},{id:"marin",name:"Marin",type:"tts"},{id:"nova",name:"Nova",type:"tts"},{id:"onyx",name:"Onyx",type:"tts"},{id:"sage",name:"Sage",type:"tts"},{id:"shimmer",name:"Shimmer",type:"tts"},{id:"verse",name:"Verse",type:"tts"}],"openai-tts-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"}],"elevenlabs-tts-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":[{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"}]},r={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(d).map(e=>[e,r[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})}}}]);