@jheavenknows/bluerouter 5.3.48 → 5.3.49

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 (1051) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -7
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +59 -31
  5. package/app/.next-cli-build/routes-manifest.json +18 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +5 -0
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -0
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -0
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
  86. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  96. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  97. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  98. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  99. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js +18 -0
  100. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -0
  101. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route_client-reference-manifest.js +1 -0
  102. package/app/.next-cli-build/server/app/api/audit-proxy/route.js +38 -0
  103. package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -0
  104. package/app/.next-cli-build/server/app/api/audit-proxy/route_client-reference-manifest.js +1 -0
  105. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  219. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  332. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  338. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +2 -2
  344. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +2 -2
  346. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  355. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  360. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  379. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  442. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/callback.html +1 -1
  444. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  445. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  446. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +10 -10
  455. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +10 -10
  456. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +10 -10
  457. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/audit-proxy.html +1 -0
  459. package/app/.next-cli-build/server/app/dashboard/audit-proxy.meta +36 -0
  460. package/app/.next-cli-build/server/app/dashboard/audit-proxy.rsc +25 -0
  461. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/!KGRhc2hib2FyZCk/dashboard/audit-proxy/__PAGE__.segment.rsc +32 -0
  462. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_full.segment.rsc +25 -0
  463. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_tree.segment.rsc +4 -0
  464. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  466. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  467. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +8 -8
  471. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  486. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  487. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  493. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +7 -7
  498. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  501. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  502. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  503. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  506. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  507. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  508. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  511. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  513. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  521. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  526. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  527. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  528. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  531. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  532. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  533. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  536. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  537. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  541. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  542. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  543. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +7 -7
  546. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +7 -7
  547. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +7 -7
  548. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/routing-topology.html +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/routing-topology.rsc +7 -7
  551. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/!KGRhc2hib2FyZCk/dashboard/routing-topology/__PAGE__.segment.rsc +7 -7
  552. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_full.segment.rsc +7 -7
  553. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_tree.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  556. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +7 -7
  557. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  558. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  561. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  562. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  563. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  564. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  566. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  567. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  568. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  571. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  572. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  573. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  576. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  577. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  578. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  580. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  581. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  582. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  583. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  584. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  585. package/app/.next-cli-build/server/app/index.html +1 -1
  586. package/app/.next-cli-build/server/app/index.rsc +6 -6
  587. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  588. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  589. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  591. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  592. package/app/.next-cli-build/server/app/landing.html +1 -1
  593. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  594. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  595. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  596. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  597. package/app/.next-cli-build/server/app/login/page.js +1 -1
  598. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  599. package/app/.next-cli-build/server/app/login.html +1 -1
  600. package/app/.next-cli-build/server/app/login.rsc +7 -7
  601. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  602. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  604. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  605. package/app/.next-cli-build/server/app/page.js +1 -1
  606. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  607. package/app/.next-cli-build/server/app-paths-manifest.json +10 -7
  608. package/app/.next-cli-build/server/chunks/2566.js +2 -2
  609. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  610. package/app/.next-cli-build/server/chunks/5210.js +3 -3
  611. package/app/.next-cli-build/server/chunks/6108.js +1 -1
  612. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  613. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  614. package/app/.next-cli-build/server/chunks/6992.js +1 -1
  615. package/app/.next-cli-build/server/chunks/7639.js +1 -1
  616. package/app/.next-cli-build/server/chunks/8352.js +2 -2
  617. package/app/.next-cli-build/server/chunks/8946.js +2 -2
  618. package/app/.next-cli-build/server/functions-config-manifest.json +2 -0
  619. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  620. package/app/.next-cli-build/server/middleware.js +1 -1
  621. package/app/.next-cli-build/server/pages/404.html +1 -1
  622. package/app/.next-cli-build/server/pages/500.html +1 -1
  623. package/app/.next-cli-build/server/prefetch-hints.json +24 -0
  624. package/app/.next-cli-build/static/L_h01kCNsdvHq-NfbF9cq/_buildManifest.js +1 -0
  625. package/app/.next-cli-build/static/chunks/{5263-f47fd0ac870aa682.js → 5263-4d0783ef24c50911.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/7050-a706e6827db952b3.js +1 -0
  627. package/app/.next-cli-build/static/chunks/8500-01a63dafd809e317.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-653c30e1cfc826ad.js → page-a979b53a0e095564.js} +1 -1
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-3f3d666087630a55.js +5 -0
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-756885e39ef00c20.js → page-65c05edc9521c8fc.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-1b504e40c85200fe.js → page-0193441bced46de6.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/model-profiles/{page-08c194e770f52b58.js → page-7844bf2031454b1c.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-5ee83aae55928333.js → page-fd337e41209f4b90.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-4639baaf9071ffff.js → page-7f613428dc68ec6e.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-c06fac9001a0ff2b.js → page-cc31ec395c8b0116.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-7e360930d0ecbe91.js → page-fb3cdf0c2e7742b6.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-5016b3d6e5295239.js → page-12700e16781ed896.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-82071dc65929d1a2.js → page-f1b6603d564d76e3.js} +1 -1
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-db01b84cc209b4f9.js → page-50c464dc6ec10d2f.js} +1 -1
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-700b671f2e833c31.js → page-82923ad2695bf65f.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-054e65328f040baf.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-7e360930d0ecbe91.js → page-fb3cdf0c2e7742b6.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{layout-83fbe505bfd1d46f.js → layout-b6944f78d9c0e80c.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-2e31214e45dd5dd7.js → page-89759854090658c5.js} +1 -1
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovidermonitor/{page-8e723a2203914aed.js → page-ae4159241f66d5fa.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-007560f58f9ba8fd.js → page-6c370ee99bad6882.js} +1 -1
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-8619c99c9e76cc49.js → page-951afd9955093a68.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-c4bf38103d1317a3.js → page-b264785b8e695d7a.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-97e8bd5381f6b48c.js → page-983bcf0c76f9029e.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-44cf1f0d3d57fab2.js → page-fafe439299f350bf.js} +1 -1
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-23ecefa1f8d06ab3.js → page-a05ac739ed8f8677.js} +1 -1
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a96f92cdf7ccaa92.js → page-59d8a02c13292a77.js} +1 -1
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-dc2a0d576213c24f.js → page-9eaf4a3d688f4243.js} +1 -1
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-e814d95a2e7f4fe2.js → page-b4ab0d22383a8303.js} +1 -1
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-bb6fdba0137a6272.js → layout-43b9cc22f69b564c.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/_global-error/page-f5efd20f46cedab1.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-f5efd20f46cedab1.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-f5efd20f46cedab1.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-f5efd20f46cedab1.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-f5efd20f46cedab1.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f5efd20f46cedab1.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f5efd20f46cedab1.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f5efd20f46cedab1.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f5efd20f46cedab1.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f5efd20f46cedab1.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f5efd20f46cedab1.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-f5efd20f46cedab1.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-f5efd20f46cedab1.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/branding/route-f5efd20f46cedab1.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-f5efd20f46cedab1.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-f5efd20f46cedab1.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-f5efd20f46cedab1.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f5efd20f46cedab1.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f5efd20f46cedab1.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-f5efd20f46cedab1.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-f5efd20f46cedab1.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-f5efd20f46cedab1.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f5efd20f46cedab1.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f5efd20f46cedab1.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f5efd20f46cedab1.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f5efd20f46cedab1.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f5efd20f46cedab1.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f5efd20f46cedab1.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f5efd20f46cedab1.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f5efd20f46cedab1.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f5efd20f46cedab1.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f5efd20f46cedab1.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f5efd20f46cedab1.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f5efd20f46cedab1.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f5efd20f46cedab1.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f5efd20f46cedab1.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f5efd20f46cedab1.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-f5efd20f46cedab1.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-f5efd20f46cedab1.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-f5efd20f46cedab1.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-f5efd20f46cedab1.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-f5efd20f46cedab1.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-f5efd20f46cedab1.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-f5efd20f46cedab1.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-f5efd20f46cedab1.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-f5efd20f46cedab1.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f5efd20f46cedab1.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/combos/route-f5efd20f46cedab1.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-f5efd20f46cedab1.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-f5efd20f46cedab1.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-f5efd20f46cedab1.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-f5efd20f46cedab1.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-f5efd20f46cedab1.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-f5efd20f46cedab1.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-f5efd20f46cedab1.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-f5efd20f46cedab1.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-f5efd20f46cedab1.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-f5efd20f46cedab1.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-f5efd20f46cedab1.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-f5efd20f46cedab1.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-f5efd20f46cedab1.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-f5efd20f46cedab1.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/health/route-f5efd20f46cedab1.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/init/route-f5efd20f46cedab1.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-f5efd20f46cedab1.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-f5efd20f46cedab1.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f5efd20f46cedab1.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/keys/route-f5efd20f46cedab1.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/locale/route-f5efd20f46cedab1.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f5efd20f46cedab1.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f5efd20f46cedab1.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f5efd20f46cedab1.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f5efd20f46cedab1.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f5efd20f46cedab1.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f5efd20f46cedab1.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f5efd20f46cedab1.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f5efd20f46cedab1.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f5efd20f46cedab1.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f5efd20f46cedab1.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f5efd20f46cedab1.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/models/route-f5efd20f46cedab1.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f5efd20f46cedab1.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f5efd20f46cedab1.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f5efd20f46cedab1.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f5efd20f46cedab1.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f5efd20f46cedab1.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f5efd20f46cedab1.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-f5efd20f46cedab1.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-f5efd20f46cedab1.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f5efd20f46cedab1.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f5efd20f46cedab1.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f5efd20f46cedab1.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f5efd20f46cedab1.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f5efd20f46cedab1.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-f5efd20f46cedab1.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-f5efd20f46cedab1.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-f5efd20f46cedab1.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-f5efd20f46cedab1.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-f5efd20f46cedab1.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-f5efd20f46cedab1.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-f5efd20f46cedab1.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-f5efd20f46cedab1.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-f5efd20f46cedab1.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-f5efd20f46cedab1.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-f5efd20f46cedab1.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-f5efd20f46cedab1.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-f5efd20f46cedab1.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-f5efd20f46cedab1.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-f5efd20f46cedab1.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f5efd20f46cedab1.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-f5efd20f46cedab1.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f5efd20f46cedab1.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-f5efd20f46cedab1.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f5efd20f46cedab1.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f5efd20f46cedab1.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f5efd20f46cedab1.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f5efd20f46cedab1.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f5efd20f46cedab1.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f5efd20f46cedab1.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f5efd20f46cedab1.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f5efd20f46cedab1.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/providers/route-f5efd20f46cedab1.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f5efd20f46cedab1.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f5efd20f46cedab1.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f5efd20f46cedab1.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f5efd20f46cedab1.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f5efd20f46cedab1.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f5efd20f46cedab1.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f5efd20f46cedab1.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f5efd20f46cedab1.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f5efd20f46cedab1.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-f5efd20f46cedab1.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-f5efd20f46cedab1.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-f5efd20f46cedab1.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-f5efd20f46cedab1.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-f5efd20f46cedab1.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f5efd20f46cedab1.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f5efd20f46cedab1.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f5efd20f46cedab1.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/settings/route-f5efd20f46cedab1.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f5efd20f46cedab1.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/tags/route-f5efd20f46cedab1.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f5efd20f46cedab1.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f5efd20f46cedab1.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f5efd20f46cedab1.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f5efd20f46cedab1.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f5efd20f46cedab1.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f5efd20f46cedab1.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f5efd20f46cedab1.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f5efd20f46cedab1.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f5efd20f46cedab1.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f5efd20f46cedab1.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f5efd20f46cedab1.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f5efd20f46cedab1.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f5efd20f46cedab1.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-f5efd20f46cedab1.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-f5efd20f46cedab1.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f5efd20f46cedab1.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f5efd20f46cedab1.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f5efd20f46cedab1.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f5efd20f46cedab1.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f5efd20f46cedab1.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f5efd20f46cedab1.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f5efd20f46cedab1.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f5efd20f46cedab1.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f5efd20f46cedab1.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f5efd20f46cedab1.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f5efd20f46cedab1.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f5efd20f46cedab1.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f5efd20f46cedab1.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f5efd20f46cedab1.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f5efd20f46cedab1.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f5efd20f46cedab1.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f5efd20f46cedab1.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f5efd20f46cedab1.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f5efd20f46cedab1.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f5efd20f46cedab1.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f5efd20f46cedab1.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f5efd20f46cedab1.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/route-f5efd20f46cedab1.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f5efd20f46cedab1.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f5efd20f46cedab1.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f5efd20f46cedab1.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f5efd20f46cedab1.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-f5efd20f46cedab1.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/version/route-f5efd20f46cedab1.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f5efd20f46cedab1.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f5efd20f46cedab1.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f5efd20f46cedab1.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/page-f5efd20f46cedab1.js +1 -0
  846. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f5efd20f46cedab1.js +1 -0
  847. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f5efd20f46cedab1.js +1 -0
  848. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f5efd20f46cedab1.js +1 -0
  849. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f5efd20f46cedab1.js +1 -0
  850. package/app/.next-cli-build/static/css/150584b47405f066.css +1 -0
  851. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.41-to-5.3.43-5.3.43-20260822-131146 → upgrade-5.3.46-to-5.3.47-5.3.47-20260822-172255}/data.sqlite +0 -0
  852. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  853. package/app/package.json +1 -1
  854. package/package.json +1 -1
  855. package/app/.next-cli-build/static/MPowTRWuD2XApM5Ao4-yp/_buildManifest.js +0 -1
  856. package/app/.next-cli-build/static/chunks/1997-ec155690a9441b82.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-df910327664404cc.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/_global-error/page-1ae9897b4a00731e.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-1ae9897b4a00731e.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-1ae9897b4a00731e.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-1ae9897b4a00731e.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-1ae9897b4a00731e.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-1ae9897b4a00731e.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1ae9897b4a00731e.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1ae9897b4a00731e.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1ae9897b4a00731e.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-1ae9897b4a00731e.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-1ae9897b4a00731e.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/branding/route-1ae9897b4a00731e.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-1ae9897b4a00731e.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-1ae9897b4a00731e.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-1ae9897b4a00731e.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1ae9897b4a00731e.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1ae9897b4a00731e.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-1ae9897b4a00731e.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-1ae9897b4a00731e.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-1ae9897b4a00731e.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1ae9897b4a00731e.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1ae9897b4a00731e.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1ae9897b4a00731e.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1ae9897b4a00731e.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1ae9897b4a00731e.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1ae9897b4a00731e.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1ae9897b4a00731e.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1ae9897b4a00731e.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1ae9897b4a00731e.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1ae9897b4a00731e.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1ae9897b4a00731e.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1ae9897b4a00731e.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1ae9897b4a00731e.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1ae9897b4a00731e.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1ae9897b4a00731e.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-1ae9897b4a00731e.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-1ae9897b4a00731e.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-1ae9897b4a00731e.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-1ae9897b4a00731e.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-1ae9897b4a00731e.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-1ae9897b4a00731e.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-1ae9897b4a00731e.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-1ae9897b4a00731e.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-1ae9897b4a00731e.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1ae9897b4a00731e.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/combos/route-1ae9897b4a00731e.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-1ae9897b4a00731e.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-1ae9897b4a00731e.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-1ae9897b4a00731e.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-1ae9897b4a00731e.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-1ae9897b4a00731e.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-1ae9897b4a00731e.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-1ae9897b4a00731e.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-1ae9897b4a00731e.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-1ae9897b4a00731e.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-1ae9897b4a00731e.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-1ae9897b4a00731e.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-1ae9897b4a00731e.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-1ae9897b4a00731e.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-1ae9897b4a00731e.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/health/route-1ae9897b4a00731e.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/init/route-1ae9897b4a00731e.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-1ae9897b4a00731e.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-1ae9897b4a00731e.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1ae9897b4a00731e.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/keys/route-1ae9897b4a00731e.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/locale/route-1ae9897b4a00731e.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1ae9897b4a00731e.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1ae9897b4a00731e.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1ae9897b4a00731e.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1ae9897b4a00731e.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1ae9897b4a00731e.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1ae9897b4a00731e.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1ae9897b4a00731e.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1ae9897b4a00731e.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1ae9897b4a00731e.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1ae9897b4a00731e.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1ae9897b4a00731e.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/route-1ae9897b4a00731e.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1ae9897b4a00731e.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1ae9897b4a00731e.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1ae9897b4a00731e.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1ae9897b4a00731e.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1ae9897b4a00731e.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1ae9897b4a00731e.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-1ae9897b4a00731e.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-1ae9897b4a00731e.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1ae9897b4a00731e.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1ae9897b4a00731e.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1ae9897b4a00731e.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1ae9897b4a00731e.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1ae9897b4a00731e.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-1ae9897b4a00731e.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-1ae9897b4a00731e.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-1ae9897b4a00731e.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-1ae9897b4a00731e.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-1ae9897b4a00731e.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-1ae9897b4a00731e.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-1ae9897b4a00731e.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-1ae9897b4a00731e.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-1ae9897b4a00731e.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-1ae9897b4a00731e.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-1ae9897b4a00731e.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-1ae9897b4a00731e.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-1ae9897b4a00731e.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-1ae9897b4a00731e.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-1ae9897b4a00731e.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1ae9897b4a00731e.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-1ae9897b4a00731e.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1ae9897b4a00731e.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-1ae9897b4a00731e.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1ae9897b4a00731e.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1ae9897b4a00731e.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1ae9897b4a00731e.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1ae9897b4a00731e.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1ae9897b4a00731e.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1ae9897b4a00731e.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1ae9897b4a00731e.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1ae9897b4a00731e.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/providers/route-1ae9897b4a00731e.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1ae9897b4a00731e.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1ae9897b4a00731e.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1ae9897b4a00731e.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1ae9897b4a00731e.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1ae9897b4a00731e.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1ae9897b4a00731e.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1ae9897b4a00731e.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1ae9897b4a00731e.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1ae9897b4a00731e.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-1ae9897b4a00731e.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-1ae9897b4a00731e.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-1ae9897b4a00731e.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-1ae9897b4a00731e.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-1ae9897b4a00731e.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1ae9897b4a00731e.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1ae9897b4a00731e.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1ae9897b4a00731e.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/settings/route-1ae9897b4a00731e.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1ae9897b4a00731e.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/tags/route-1ae9897b4a00731e.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1ae9897b4a00731e.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1ae9897b4a00731e.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1ae9897b4a00731e.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1ae9897b4a00731e.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1ae9897b4a00731e.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1ae9897b4a00731e.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1ae9897b4a00731e.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1ae9897b4a00731e.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1ae9897b4a00731e.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1ae9897b4a00731e.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1ae9897b4a00731e.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1ae9897b4a00731e.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1ae9897b4a00731e.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-1ae9897b4a00731e.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1ae9897b4a00731e.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1ae9897b4a00731e.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1ae9897b4a00731e.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1ae9897b4a00731e.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1ae9897b4a00731e.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1ae9897b4a00731e.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1ae9897b4a00731e.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1ae9897b4a00731e.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1ae9897b4a00731e.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1ae9897b4a00731e.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1ae9897b4a00731e.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1ae9897b4a00731e.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1ae9897b4a00731e.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1ae9897b4a00731e.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1ae9897b4a00731e.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1ae9897b4a00731e.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1ae9897b4a00731e.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1ae9897b4a00731e.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1ae9897b4a00731e.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1ae9897b4a00731e.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1ae9897b4a00731e.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1ae9897b4a00731e.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1ae9897b4a00731e.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/v1/route-1ae9897b4a00731e.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1ae9897b4a00731e.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1ae9897b4a00731e.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1ae9897b4a00731e.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1ae9897b4a00731e.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-1ae9897b4a00731e.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/version/route-1ae9897b4a00731e.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1ae9897b4a00731e.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1ae9897b4a00731e.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1ae9897b4a00731e.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/page-1ae9897b4a00731e.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1ae9897b4a00731e.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1ae9897b4a00731e.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1ae9897b4a00731e.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1ae9897b4a00731e.js +0 -1
  1050. package/app/.next-cli-build/static/css/b5abfe9c2085ba8e.css +0 -1
  1051. /package/app/.next-cli-build/static/{MPowTRWuD2XApM5Ao4-yp → L_h01kCNsdvHq-NfbF9cq}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{7759:(e,t,s)=>{"use strict";s.d(t,{A:()=>y});var a=s(95155),i=s(12115),l=s(52679),r=s(90620),n=s(12494);let o=[{value:1,label:"Mon"},{value:2,label:"Tue"},{value:3,label:"Wed"},{value:4,label:"Thu"},{value:5,label:"Fri"},{value:6,label:"Sat"},{value:0,label:"Sun"}],d=[0,1,2,3,4,5,6],c={enabled:!0,weekdays:d,fromTime:"00:00",toTime:"23:59"},m={enabled:!1,intervalSec:60,failureThreshold:3,timeoutMs:15e3,prompt:"Say hi",disableThinking:!0,model:""};function p(e,t){let s=String(e||"").trim();return/^([01]\d|2[0-3]):([0-5]\d)$/.test(s)?s:t}function x(e={}){let t=e&&"object"==typeof e?e:{},s=Array.isArray(t.weekdays)?t.weekdays.map(Number).filter(e=>e>=0&&e<=6):d;return{enabled:!1!==t.enabled,weekdays:[...new Set(s)].sort((e,t)=>e-t),fromTime:p(t.fromTime||t.from,"00:00"),toTime:p(t.toTime||t.to,"23:59")}}function h(e={}){return{overrideConnections:!0===e.overrideConnections,schedule:x(e.schedule||c)}}function u(e={}){var t;let s=e&&"object"==typeof e?e:{};return{enabled:!0===s.enabled,intervalSec:Math.max(10,Number.parseInt(s.intervalSec||m.intervalSec,10)||m.intervalSec),failureThreshold:Math.max(1,Number.parseInt(s.failureThreshold||m.failureThreshold,10)||m.failureThreshold),timeoutMs:Math.max(1e3,Number.parseInt(s.timeoutMs||m.timeoutMs,10)||m.timeoutMs),prompt:"string"==typeof s.prompt&&s.prompt.trim()?s.prompt.trim():m.prompt,disableThinking:!1!==s.disableThinking,model:"string"==typeof(t=s.model||s.healthModel||s.testModel)?t.trim():""}}function g(e={}){return{overrideConnections:!0===e.overrideConnections,healthCheck:u(e.healthCheck||e||m)}}function b(){return"text-xs font-medium text-text-muted"}function f(){return"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}function y({providerId:e,onSaved:t}){let[s,c]=(0,i.useState)(h()),[m,p]=(0,i.useState)(g()),[v,j]=(0,i.useState)([]),[k,N]=(0,i.useState)(!1),[w,C]=(0,i.useState)(""),[S,A]=(0,i.useState)(!0),[T,$]=(0,i.useState)(!1),[I,R]=(0,i.useState)(!1),O=(0,l.mq)(e),P=function(e=""){if((0,l.gb)(e))return"anthropic";if((0,l.mq)(e)||"cloudflare-ai"===e)return"openai";if("gemini"===e)return"gemini";if("github"===e)return"openai";let t=r.X3?.[e]||"";return t.includes("/messages")?"anthropic":t.includes("/chat/completions")||t.includes("/responses")?"openai":null}(e),E=!!P,D="anthropic"===P,M=(0,n.wB)(v,m.healthCheck.model);(0,i.useEffect)(()=>{let t=!1;return async function(){try{let s=await fetch("/api/settings",{cache:"no-store"}),a=s.ok?await s.json():{};t||(c(h((a.providerSchedules||{})[e]||{})),p(g((a.providerHealthChecks||{})[e]||{})))}finally{t||A(!1)}}(),()=>{t=!0}},[e]),(0,i.useEffect)(()=>{let t=!1;return async function(){N(!0),C("");try{let s=await fetch(`/api/providers?provider=${encodeURIComponent(e)}&summary=1`,{cache:"no-store"}),a=((s.ok?await s.json():{}).connections||[]).filter(t=>t.provider===e),i=await (0,n.ns)({providerId:e,connections:a,currentModel:m.healthCheck.model});t||(j(i.models),C(i.warning||""))}catch(e){t||(j([]),C(e.message||"Failed to load local Available Models list"))}finally{t||N(!1)}}(),()=>{t=!0}},[e,m.healthCheck.model]);let U=e=>{c(t=>({...t,schedule:x({...t.schedule,...e})})),R(!1)},_=e=>{p(t=>({...t,healthCheck:u({...t.healthCheck,...e})})),R(!1)},F=async()=>{$(!0),R(!1);try{let a=await fetch("/api/settings",{cache:"no-store"}),i=a.ok?await a.json():{},l=h(s),r=g(m);O&&(l.overrideConnections=!0,r.overrideConnections=!0);let n={...i.providerSchedules||{},[e]:l},o={...i.providerHealthChecks||{},[e]:r};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSchedules:n,providerHealthChecks:o})})).ok&&(R(!0),"function"==typeof t&&await t())}finally{$(!1)}};return S?null:(0,a.jsxs)("div",{className:"rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:O?"Availability Schedule":"Provider Scheduler Override"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:O?"Controls when this endpoint is available for routing.":"When enabled, every account in this provider uses this provider-level schedule and account schedulers are locked."})]}),!O&&(0,a.jsxs)("label",{className:"mb-4 flex items-center gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:s.overrideConnections,onChange:e=>{c(t=>({...t,overrideConnections:e.target.checked})),R(!1)}}),"Override all accounts"]}),(0,a.jsxs)("div",{className:"mb-5 space-y-3",children:[(0,a.jsx)("p",{className:b(),children:"Weekdays"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("label",{className:"flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1.5 text-xs text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:s.schedule.weekdays.includes(e.value),onChange:()=>{var t;return t=e.value,void(c(e=>{let s=new Set(Array.isArray(e.schedule.weekdays)?e.schedule.weekdays:d);return s.has(t)?s.delete(t):s.add(t),{...e,schedule:{...e.schedule,weekdays:[...s].sort((e,t)=>e-t)}}}),R(!1))}}),e.label]},e.value))}),!1!==s.schedule.enabled&&0===s.schedule.weekdays.length&&(0,a.jsx)("p",{className:"text-xs text-yellow-500",children:O?"No weekdays selected. This endpoint will be unavailable until at least one weekday is selected.":"No weekdays selected. This provider schedule will make accounts unavailable until at least one weekday is selected."})]}),(0,a.jsxs)("div",{className:"mb-6 grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("label",{className:b(),children:["From time",(0,a.jsx)("input",{type:"time",value:s.schedule.fromTime,onChange:e=>U({fromTime:e.target.value}),className:f()})]}),(0,a.jsxs)("label",{className:b(),children:["To time",(0,a.jsx)("input",{type:"time",value:s.schedule.toTime,onChange:e=>U({toTime:e.target.value}),className:f()})]})]}),(0,a.jsxs)("div",{className:"mb-5 border-t border-border pt-5",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:O?"Periodic Health Check":"Provider Health Check Override"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:O?"Periodically checks this endpoint so routing can avoid it when unhealthy.":"When enabled, every account in this provider uses the same periodic ping policy and account health settings are locked."})]}),(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-5",children:[!O&&(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.overrideConnections,onChange:e=>{p(t=>({...t,overrideConnections:e.target.checked})),R(!1)}}),"Override all accounts"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.healthCheck.enabled,onChange:e=>_({enabled:e.target.checked})}),"Enable periodic ping healthcheck"]})]}),m.healthCheck.enabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:b(),children:["Healthcheck model",(0,a.jsxs)("select",{value:m.healthCheck.model||"",onChange:e=>_({model:e.target.value}),className:f(),disabled:k,children:[(0,a.jsx)("option",{value:"",children:"Connection/base URL only — no chat ping"}),M.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))]})]}),(0,a.jsxs)("label",{className:`${b()} mt-3 block`,children:["Manual healthcheck model",(0,a.jsx)("input",{value:m.healthCheck.model||"",onChange:e=>_({model:e.target.value}),placeholder:D?"claude/model name from this endpoint":"gemini"===P?"gemini model, e.g. gemini-2.5-flash":"model name from Available Models",className:f(),disabled:k})]}),k&&(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Loading local Available Models..."}),w&&(0,a.jsxs)("p",{className:"mt-2 text-xs text-yellow-500",children:["Model list note: ",w]}),!k&&!w&&(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Model list is loaded from local Available Models / DB, not from the provider /models API."}),D&&(0,a.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Anthropic-compatible healthcheck sends ",(0,a.jsx)("code",{children:"Say hi"})," to ",(0,a.jsx)("code",{children:"/v1/messages"})," only when a model is selected."]}),"gemini"===P&&(0,a.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Gemini healthcheck sends ",(0,a.jsx)("code",{children:"Say hi"})," with the native ",(0,a.jsx)("code",{children:"generateContent"})," API only when a model is selected."]}),"cloudflare-ai"===e&&(0,a.jsxs)("p",{className:"mt-2 text-xs text-text-muted",children:["Cloudflare healthcheck sends ",(0,a.jsx)("code",{children:"Say hi"})," to the Workers AI OpenAI-style chat endpoint only when a model is selected."]}),!E&&(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"This provider can still show local Available Models. Auto healthcheck will keep using the original connection/token/account probe until a direct chat endpoint is available."})]}),m.healthCheck.enabled&&(!E||!m.healthCheck.model)&&(0,a.jsx)("p",{className:"mt-4 rounded-lg border border-border bg-sidebar/40 px-3 py-2 text-xs text-text-muted",children:"No direct chat healthcheck model/endpoint is active. Auto healthcheck will test connection/base URL/key/token/account and will not send the Say hi chat ping."}),(0,a.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-3",children:[(0,a.jsxs)("label",{className:b(),children:["Interval seconds",(0,a.jsx)("input",{type:"number",min:"10",value:m.healthCheck.intervalSec,onChange:e=>_({intervalSec:Math.max(10,Number.parseInt(e.target.value,10)||60)}),className:f()})]}),(0,a.jsxs)("label",{className:b(),children:["Fail threshold",(0,a.jsx)("input",{type:"number",min:"1",value:m.healthCheck.failureThreshold,onChange:e=>_({failureThreshold:Math.max(1,Number.parseInt(e.target.value,10)||3)}),className:f()})]}),(0,a.jsxs)("label",{className:b(),children:["Timeout ms",(0,a.jsx)("input",{type:"number",min:"1000",value:m.healthCheck.timeoutMs,onChange:e=>_({timeoutMs:Math.max(1e3,Number.parseInt(e.target.value,10)||15e3)}),className:f()})]})]}),(0,a.jsxs)("label",{className:`${b()} mt-3 block`,children:["Prompt",(0,a.jsx)("input",{value:m.healthCheck.prompt,onChange:e=>_({prompt:e.target.value}),className:f()})]}),(0,a.jsxs)("label",{className:"mt-3 flex items-center gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.healthCheck.disableThinking,onChange:e=>_({disableThinking:e.target.checked})}),"Force lightweight test payload / disable thinking when provider supports it"]}),(0,a.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,a.jsx)("button",{type:"button",onClick:F,disabled:T,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:T?"Saving...":O?"Save Schedule & Health":"Save Provider Policy"}),I&&(0,a.jsx)("span",{className:"text-xs font-medium text-green-500",children:"Saved"})]})]})}},37369:(e,t,s)=>{"use strict";s.d(t,{default:()=>b});var a=s(95155),i=s(12115),l=s(98500),r=s.n(l),n=s(5772),o=s(73321),d=s(14051),c=s.n(d),m=s(35497),p=s(11059),x=s(68619),h=s(40652),u=s(86600),g=s(7759);function b({providerId:e}){let t,s=(0,o.useRouter)(),[l,d]=(0,i.useState)(!0),[c,f]=(0,i.useState)(null),[y,v]=(0,i.useState)([]),[j,k]=(0,i.useState)({}),[N,w]=(0,i.useState)(!1),[C,S]=(0,i.useState)(!1),[A,T]=(0,i.useState)(!1),[$,I]=(0,i.useState)(null),[R,O]=(0,i.useState)(!1),{copied:P,copy:E}=(0,p.C)(),D=(0,i.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch(`/api/provider-nodes?id=${encodeURIComponent(e)}`,{cache:"no-store"}),fetch(`/api/providers?provider=${encodeURIComponent(e)}&summary=1`,{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]),i=await t.json().catch(()=>({})),l=await s.json().catch(()=>({})),r=await a.json().catch(()=>({}));t.ok&&f((i.nodes||[]).find(t=>t.id===e)||null),s.ok&&v((l.connections||[]).filter(t=>t.provider===e)),a.ok&&k(r.aliases||{})}finally{d(!1)}},[e]);(0,i.useEffect)(()=>{D()},[D]);let M=[...(t=y.filter(e=>!1!==e.isActive)).length?t:y].sort((e,t)=>Number(e.priority||999999)-Number(t.priority||999999))[0]||null,U=async()=>{if(M?.id&&!A){T(!0),I(null);try{let e=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:M.id})}),t=await e.json().catch(()=>({})),s=t.results?.find(e=>e.connectionId===M.id);I({ok:e.ok&&!!s?.ok,error:s?.error||t.error||null}),await D()}catch(e){I({ok:!1,error:e.message||"Health check failed"})}finally{T(!1)}}},_=async(t,s)=>{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`,alias:s})})).ok&&await D()},F=async e=>{!e||(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await D()};if(l)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(m.Qv,{}),(0,a.jsx)(m.Qv,{})]});if(!c)return(0,a.jsxs)("div",{className:"py-20 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(r(),{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let z=c.prefix||e,q=Object.values(j).filter(t=>String(t||"").startsWith(`${e}/`)).length;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(r(),{href:"/dashboard/providers",className:"mb-4 inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg bg-emerald-500/10",children:R?(0,a.jsx)("span",{className:"text-sm font-bold text-emerald-600",children:"OC"}):(0,a.jsx)(n.default,{src:"responses"===c.apiType?"/providers/oai-r.png":"/providers/oai-cc.png",alt:c.name||"OpenAI Compatible",width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>O(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:c.name||"OpenAI Compatible"}),(0,a.jsxs)("p",{className:"text-text-muted",children:[q," model",1===q?"":"s"," \xb7 ",M?"Configured":"Not configured"]})]})]})]}),(0,a.jsxs)(m.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"OpenAI Compatible Details"}),(0,a.jsx)(m.Ex,{variant:M?"success":"default",children:M?"Ready":"Needs setup"})]}),(0,a.jsxs)("p",{className:"mt-1 break-all text-sm text-text-muted",children:["responses"===c.apiType?"Responses API":"Chat Completions"," \xb7 ",(c.baseUrl||"").replace(/\/$/,""),"/","responses"===c.apiType?"responses":"chat/completions"]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Prefix: ",(0,a.jsx)("code",{children:c.prefix})]}),(0,a.jsxs)("span",{children:["Server: ",c.openAICompatibleRuntime||"openai"]}),(0,a.jsxs)("span",{children:["Deployment: ",c.deploymentType||"auto"]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex",children:[(0,a.jsx)(m.$n,{size:"sm",variant:"secondary",icon:"health_and_safety",onClick:U,disabled:!M||A,children:A?"Checking...":"Run Health Check"}),(0,a.jsx)(m.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>w(!0),children:"Edit"}),(0,a.jsx)(m.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>S(!0),children:"Delete"})]})]}),$&&(0,a.jsx)("div",{className:`mt-4 rounded-lg border px-3 py-2 text-xs ${$.ok?"border-emerald-500/30 bg-emerald-500/5 text-emerald-600":"border-red-500/30 bg-red-500/5 text-red-500"}`,children:$.ok?"Health check passed.":`Health check failed${$.error?`: ${$.error}`:"."}`})]}),(0,a.jsx)(u.A,{providerStorageAlias:e,providerDisplayAlias:z,modelAliases:j}),(0,a.jsxs)(m.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Models selected from this endpoint. Use the test icon on a model to verify inference through BlueRouter."})]}),(0,a.jsx)(h.A,{providerStorageAlias:e,providerDisplayAlias:z,modelAliases:j,copied:P,onCopy:E,onSetAlias:_,onDeleteAlias:F,connections:y,isAnthropic:!1,managed:!0})]}),(0,a.jsxs)(m.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Health & Schedule"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Provider-level healthcheck and schedule policy. The managed connection remains internal."})]}),(0,a.jsx)(g.A,{providerId:e,onSaved:D})]}),(0,a.jsx)(x.A,{isOpen:N,node:c,onSaved:D,onClose:()=>w(!1)}),(0,a.jsx)(m.uo,{isOpen:C,onClose:()=>S(!1),onConfirm:async()=>{S(!1),(await fetch(`/api/provider-nodes/${e}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")},title:"Delete OpenAI Compatible Provider",message:`Delete ${c.name||"this provider"} and its managed connection?`,variant:"danger"})]})}b.propTypes={providerId:c().string.isRequired}},40652:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var a=s(95155),i=s(12115),l=s(14051),r=s.n(l),n=s(35497);function o({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:d,managed:c=!1}){let m=`model_support:${e}`,p="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:p?{color:p}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:d,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:d?{animation:"spin 1s linear infinite"}:void 0,children:d?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:d?"Testing...":"Test"})]})]}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"LAN tag:"}),(0,a.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:m}),(0,a.jsx)("button",{type:"button",onClick:()=>i(m,`tag-${e}`),className:"rounded px-1 py-0.5 text-[10px] text-text-muted hover:bg-sidebar hover:text-primary",title:"Copy model_support tag",children:s===`tag-${e}`?"Copied":"Copy tag"})]})]}),!c&&(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function d({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:c,onDeleteAlias:m,connections:p,isAnthropic:x,managed:h=!1}){let[u,g]=(0,i.useState)(""),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),[j,k]=(0,i.useState)(null),[N,w]=(0,i.useState)({}),C=async t=>{if(!j){k(t);try{let s,a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`,connectionId:(s=p.find(e=>!1!==e.isActive),s?.id||p[0]?.id||null)})}),i=await a.json();w(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{k(null)}}},S=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),A=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},T=async()=>{if(!u.trim()||b)return;let t=u.trim(),s=A(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");f(!0);try{await c(t,s,e),g("")}catch(e){console.log("Error adding model:",e)}finally{f(!1)}},$=async()=>{if(y)return;let t=p.find(e=>!1!==e.isActive);if(t){v(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=A(s);a&&(await c(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},I=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint. Each model also shows a ",(0,a.jsx)("code",{className:"rounded bg-sidebar px-1 py-0.5 font-mono text-xs",children:"model_support:*"})," tag you can paste into an Ollama endpoint label for Combo tag routing."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>g(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:T,disabled:!u.trim()||b,children:b?"Adding...":"Add"}),(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!I||y,children:y?"Importing...":"Import from /models"})]}),!I&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."})]}),h&&0===S.length&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No models selected. Use Edit to check the endpoint and choose models."}),S.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:S.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(o,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>m(i),onTest:p.length>0?()=>C(e):void 0,testStatus:N[e],isTesting:j===e,managed:h},s))})]})}o.propTypes={modelId:r().string.isRequired,fullModel:r().string.isRequired,copied:r().string,onCopy:r().func.isRequired,onDeleteAlias:r().func,onTest:r().func,testStatus:r().string,isTesting:r().bool,managed:r().bool},d.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool,managed:r().bool}},86600:(e,t,s)=>{"use strict";s.d(t,{A:()=>p});var a=s(95155),i=s(12115),l=s(14051),r=s.n(l),n=s(35497),o=s(65921);let d=[{key:"cached",label:"Cached input",hint:"Per 1M tokens"},{key:"reasoning",label:"Reasoning",hint:"Per 1M tokens"},{key:"cache_creation",label:"Cache creation",hint:"Per 1M tokens"}];function c(e){if(null==e||""===e)return"";let t=Number(e);return Number.isFinite(t)?String(t):""}function m(e,t,s){let a=t||s||{};return{modelId:e,isOverride:!!t,defaults:s||null,input:c(a.input),output:c(a.output),cached:c(a.cached),reasoning:c(a.reasoning),cache_creation:c(a.cache_creation)}}function p({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s}){let l=(0,o.i)(),[r,c]=(0,i.useState)({}),[h,u]=(0,i.useState)(!0),[g,b]=(0,i.useState)(null),[f,y]=(0,i.useState)({}),[v,j]=(0,i.useState)({}),[k,N]=(0,i.useState)(()=>new Set),[w,C]=(0,i.useState)({}),[S,A]=(0,i.useState)(null),[T,$]=(0,i.useState)(!1),I=(0,i.useMemo)(()=>{let t=`${e}/`,a=[];for(let e of Object.values(s||{})){if(!e.startsWith(t))continue;let s=e.slice(t.length);s&&!a.includes(s)&&a.push(s)}return a.sort((e,t)=>e.localeCompare(t))},[s,e]),R=async()=>{try{let t=await fetch("/api/pricing",{cache:"no-store"});if(!t.ok)return;let s=await t.json(),a=s?.[e]||{};c(a)}catch(e){console.log("Error fetching pricing:",e)}finally{u(!1)}};(0,i.useEffect)(()=>{u(!0),R()},[e]),(0,i.useEffect)(()=>{j(e=>{let t={};for(let s of I){if(k.has(s)&&e[s]){t[s]=e[s];continue}t[s]=m(s,r[s],null)}return t})},[I.join("|"),JSON.stringify(r)]);let O=(e,t,s)=>{j(a=>({...a,[e]:{...a[e],[t]:s}})),N(t=>{if(t.has(e))return t;let s=new Set(t);return s.add(e),s}),w[e]&&C(t=>{let s={...t};return delete s[e],s})},P=async t=>{let s,a=v[t];if(a){try{s=function(e){let t={};for(let s of["input","output","cached","reasoning","cache_creation"]){if(""===e[s]||null===e[s]||void 0===e[s])continue;let a=Number(e[s]);if(!Number.isFinite(a)||a<0)throw Error(`Invalid ${s}: must be ≥ 0`);t[s]=a}if(void 0===t.input&&void 0===t.output)throw Error("Set at least input and output");return t}(a)}catch(e){C(s=>({...s,[t]:e.message}));return}b(t);try{let a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:{[t]:s}})}),i=await a.json();if(!a.ok)return void C(e=>({...e,[t]:i?.error||"Failed to save"}));c(i?.[e]||{}),N(e=>{if(!e.has(t))return e;let s=new Set(e);return s.delete(t),s}),C(e=>{let s={...e};return delete s[t],s}),l?.success?.(`Pricing saved for ${t}`)}catch(e){C(s=>({...s,[t]:e?.message||"Network error"}))}finally{b(null)}}},E=async t=>{b(t);try{let s=`/api/pricing?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,a=await fetch(s,{method:"DELETE"}),i=await a.json();if(!a.ok)return void C(e=>({...e,[t]:i?.error||"Failed to reset"}));c(i?.[e]||{}),N(e=>{if(!e.has(t))return e;let s=new Set(e);return s.delete(t),s}),l?.info?.(`Pricing reset for ${t}`)}catch(e){C(s=>({...s,[t]:e?.message||"Network error"}))}finally{b(null)}},D=async()=>{if(S){$(!0);try{let e=await fetch("/api/pricing/recalculate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S.payload||{})}),t=await e.json();if(!e.ok)return void l?.error?.(t?.error||"Recalculate failed");let s=t.skippedNoPricing?` \xb7 skipped ${t.skippedNoPricing} (no pricing)`:"";l?.success?.(`Recalculated ${t.rowsUpdated} row${1===t.rowsUpdated?"":"s"} across ${t.groupsUpdated} model${1===t.groupsUpdated?"":"s"}${s}`)}catch(e){l?.error?.(e?.message||"Network error")}finally{$(!1),A(null)}}};return(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:"payments"}),(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Model Pricing"}),(0,a.jsx)(n.Ex,{variant:"secondary",size:"sm",children:"Per 1M tokens"})]}),(0,a.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:["Set custom input/output rates used by the Usage dashboard to estimate cost for"," ",(0,a.jsx)("code",{className:"rounded bg-sidebar px-1.5 py-0.5 font-mono text-[11px]",children:t}),". Overrides apply only to this custom endpoint; falls back to built-in pricing tables when unset. New rates take effect on the next request — use"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Recalc cost"})," to rewrite past rows."]})]}),I.length>0&&(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>{A({scope:"provider",label:`all models on ${t}`,payload:{provider:e}})},disabled:T,className:"shrink-0",children:"Recalc all"})]}),h?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading pricing..."}):0===I.length?(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center text-sm text-text-muted",children:"Add models in the section below first — pricing can then be set per model here."}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:I.map(s=>{let i=v[s]||m(s,r[s],null),l=!!r[s],o=!!f[s],c=(e=>{let t=v[e];if(!t)return!1;let s=r[e];if(!s)return!!(t.input||t.output||t.cached||t.reasoning||t.cache_creation);for(let e of["input","output","cached","reasoning","cache_creation"])if(((""===t[e]?null:Number(t[e]))??null)!==((void 0===s[e]?null:Number(s[e]))??null))return!0;return!1})(s),p=w[s],h=g===s;return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface-2/40 p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"smart_toy"}),(0,a.jsx)("code",{className:"truncate font-mono text-sm font-semibold text-text-main",children:s}),l?(0,a.jsx)(n.Ex,{variant:"success",size:"sm",children:"Override"}):(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:"Default"})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:(0,a.jsxs)("button",{type:"button",onClick:()=>{y(e=>({...e,[s]:!e[s]}))},className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o?"expand_less":"tune"}),o?"Hide advanced":"Advanced"]})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,a.jsx)(x,{label:"Input",hint:"$ per 1M input tokens",value:i.input,onChange:e=>O(s,"input",e),disabled:h}),(0,a.jsx)(x,{label:"Output",hint:"$ per 1M output tokens",value:i.output,onChange:e=>O(s,"output",e),disabled:h})]}),o&&(0,a.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:d.map(e=>(0,a.jsx)(x,{label:e.label,hint:e.hint,value:i[e.key],onChange:t=>O(s,e.key,t),disabled:h},e.key))}),p&&(0,a.jsxs)("p",{className:"mt-2 flex items-center gap-1 text-xs text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),p]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"calculate",onClick:()=>{A({scope:"model",label:`${t}/${s}`,payload:{provider:e,model:s}})},disabled:h||T,title:"Rewrite past usage rows for this model with current pricing",children:"Recalc cost"}),l&&(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"restart_alt",onClick:()=>E(s),disabled:h,children:"Reset to default"}),(0,a.jsx)(n.$n,{size:"sm",icon:"save",onClick:()=>P(s),disabled:h||!c,children:h?"Saving...":c?"Save":"Saved"})]})]},s)})}),(0,a.jsx)(n.uo,{isOpen:!!S,onClose:()=>!T&&A(null),onConfirm:D,title:"Recalculate cost",message:S?`Rewrite the cost column on past usage rows for ${S.label} using the current pricing? This overwrites whatever cost was stored at request time.`:"",confirmText:T?"Recalculating...":"Recalculate",cancelText:"Cancel"})]})}function x({label:e,hint:t,value:s,onChange:i,disabled:l}){return(0,a.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-sm text-text-muted",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.0001",min:0,value:s,onChange:e=>i(e.target.value),disabled:l,placeholder:"0.00",className:"w-full rounded-[10px] border border-transparent bg-surface-2 py-2.5 pl-7 pr-3 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 ease-out focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm"})]}),t&&(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:t})]})}x.propTypes={label:r().string.isRequired,hint:r().string,value:r().string.isRequired,onChange:r().func.isRequired,disabled:r().bool},p.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired}},96357:(e,t,s)=>{Promise.resolve().then(s.bind(s,97444)),Promise.resolve().then(s.bind(s,37369))},97444:(e,t,s)=>{"use strict";s.d(t,{default:()=>I});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),m=s(28777),p=s(11059);let x=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var u=s(14051),g=s.n(u);function b({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:p}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):p?(0,a.jsx)("button",{onClick:p,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}b.propTypes={model:g().shape({id:g().string.isRequired}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func},g().string.isRequired,g().string.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func,g().oneOf(["ok","error"]),g().bool,g().string.isRequired,g().object.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func.isRequired;var f=s(40652);function y({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function v(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function j(e={}){let t=e&&"object"==typeof e?e:{};return{enabled:!0===t.enabled,intervalSec:Math.max(10,Number.parseInt(t.intervalSec||60,10)||60),failureThreshold:Math.max(1,Number.parseInt(t.failureThreshold||3,10)||3),timeoutMs:Math.max(1e3,Number.parseInt(t.timeoutMs||15e3,10)||15e3),prompt:t.prompt||"Say hi",disableThinking:!1!==t.disableThinking}}function k({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:h=null,providerHealthConfig:u=null,healthCheckRunning:g=!1,onRunHealthCheck:b=null}){let[f,N]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),S=(0,i.useRef)(null),A=new Map((t||[]).map(e=>[e.id,e])),T=e.providerSpecificData?.proxyPoolId||null,$=T?A.get(T):null,I=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,R=!!T||I,O=$?`Pool: ${$.name}`:T?`Pool: ${T} (inactive/missing)`:I?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",P="";if($?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=$?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let E=$?.noProxy||e.providerSpecificData?.connectionNoProxy||"",D=function(e={}){let t=e.tags||e.labels||e.providerSpecificData?.routingTags||e.providerSpecificData?.tags||e.providerSpecificData?.labels||[];return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):"string"==typeof t?t.split(/[\n,;\s]+/).map(e=>e.trim()).filter(Boolean):t&&"object"==typeof t?Object.entries(t).filter(([,e])=>!1!==e&&null!=e).map(([e,t])=>!0===t?e:`${e}:${t}`):[]}(e),M=e.providerSpecificData?.maxInFlight||e.maxInFlight||null,U="default";$?.isActive===!0?U="success":(T||I)&&(U="error"),(0,i.useEffect)(()=>{if(!f)return;let e=e=>{S.current&&!S.current.contains(e.target)&&N(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let _=async e=>{C(!0);try{await m("__none__"===e?null:e)}finally{C(!1),N(!1)}},F=e.authType||(s?"oauth":"apikey"),z="oauth"===F,q="cookie"===F,L=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),H=z?L(e.email)?e.email:L(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[K,J]=(0,i.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{J(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=W?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[W]);let B="unavailable"!==e.testStatus||K?e.testStatus:"active",G=()=>h?"queued"===h.state?"queued":"testing"===h.state?"testing":"success"===h.state?"success":"failed"===h.state?h.error?`failed: ${h.error}`:"failed":null:null,V=function(e={},t=null){let s=t&&"object"==typeof t?t:{};return!0===s.overrideConnections?{healthCheck:j(s.healthCheck||s),source:"provider",override:!0}:{healthCheck:j(e.healthCheck||{}),source:"account",override:!1}}(e,u),Q=V.healthCheck,Z=!0===Q.enabled,X=e.healthStatus||"unknown",Y=Number(e.healthConsecutiveFailures||0),ee=Number(Q.failureThreshold||3),et=Z?"degraded"===X?`Health: Degraded ${Y}/${ee}`:"dead"===X?"Health: Dead":"alive"===X?"Health: Alive":"Health: Unknown":"Health: off";return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:q?"cookie":z?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:H}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===B||"success"===B?"success":"error"===B||"expired"===B||"unavailable"===B?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":B||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:z?"OAuth":q?"Cookie":"API Key"}),R&&(0,a.jsx)(d.Ex,{variant:U,size:"sm",children:"Proxy"}),M&&(0,a.jsxs)(d.Ex,{variant:"default",size:"sm",children:["max ",M," in-flight"]}),D.slice(0,3).map(e=>(0,a.jsx)(d.Ex,{variant:"primary",size:"sm",children:e},e)),D.length>3&&(0,a.jsxs)(d.Ex,{variant:"default",size:"sm",children:["+",D.length-3," tags"]}),K&&!1!==e.isActive&&(0,a.jsx)(y,{until:W}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),G()&&(0,a.jsx)(d.Ex,{variant:h?"success"===h.state?"success":"failed"===h.state?"error":"testing"===h.state?"primary":"default":"default",size:"sm",children:G()})]}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:[" ",(0,a.jsx)(d.Ex,{variant:"alive"===X?"success":"dead"===X?"error":"default",children:et})," ",(0,a.jsx)("span",{children:V.override?"provider policy":"account policy"})," ",(0,a.jsxs)("span",{children:["last check: ",v(e.healthLastCheckedAt)]})," ",null!=e.healthLastLatencyMs&&(0,a.jsxs)("span",{children:[e.healthLastLatencyMs,"ms"]})," ",e.healthLastRecoveredAt&&(0,a.jsxs)("span",{children:["recovered: ",v(e.healthLastRecoveredAt)]})," ",e.healthLastError&&(0,a.jsx)("span",{className:"text-red-500",children:e.healthLastError})," ",(0,a.jsx)("button",{type:"button",onClick:b||void 0,disabled:!b||g,className:"rounded border border-border px-2 py-1 text-xs text-text-main transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-50",children:g?"Checking...":"Run health check now"})," "]})," ",D.length>0&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 flex-wrap",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:"routing tags:"}),D.map(e=>(0,a.jsx)("code",{className:"rounded bg-primary/10 px-1 py-0.5 font-mono text-[10px] text-primary",children:e},e))]}),R&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:O,children:O}),P&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:P}),E&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:S,children:[(0,a.jsxs)("button",{onClick:()=>N(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${R?"text-primary":"text-text-muted hover:text-primary"}`,disabled:w,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:w?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>_("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!T?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>_(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${T===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}y.propTypes={until:g().string.isRequired},k.propTypes={connection:g().shape({id:g().string,name:g().string,email:g().string,displayName:g().string,modelLockUntil:g().string,testStatus:g().string,isActive:g().bool,lastError:g().string,priority:g().number,globalPriority:g().number,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),labels:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number]),healthCheck:g().object,healthStatus:g().string,healthConsecutiveFailures:g().number,healthLastCheckedAt:g().string,healthLastOkAt:g().string,healthLastRecoveredAt:g().string,healthLastLatencyMs:g().number,healthLastError:g().string}).isRequired,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string,proxyUrl:g().string,noProxy:g().string,isActive:g().bool})),isOAuth:g().bool.isRequired,isFirst:g().bool.isRequired,isLast:g().bool.isRequired,onMoveUp:g().func.isRequired,onMoveDown:g().func.isRequired,onToggleActive:g().func.isRequired,onUpdateProxy:g().func,onEdit:g().func.isRequired,onDelete:g().func.isRequired,oneByOneStatus:g().shape({state:g().string,error:g().string}),providerHealthConfig:g().object,healthCheckRunning:g().bool,onRunHealthCheck:g().func};var N=s(7759);let w=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function C({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:h,onBulkDone:u,onClose:g}){let b="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,A=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[T,$]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[I,R]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[O,P]=(0,i.useState)({accountId:""}),[E,D]=(0,i.useState)(A),[M,U]=(0,i.useState)(!1),[_,F]=(0,i.useState)(null),[z,q]=(0,i.useState)(!1),[L,H]=(0,i.useState)("single"),[K,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&T.ollamaHostUrl.trim()?{baseUrl:T.ollamaHostUrl.trim()}:k?{azureEndpoint:I.azureEndpoint,apiVersion:I.apiVersion,deployment:I.deployment,organization:I.organization}:N?{accountId:O.accountId}:S&&E?{region:E}:void 0,V=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:G()})}),s=await e.json();F(s.valid?"success":"failed")}catch{F("failed")}finally{U(!1)}},Q=async()=>{if(t&&(f||T.apiKey)&&(f||T.name)&&(!l||T.defaultModel.trim())){q(!0);try{let e=!1;try{U(!0),F(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:G()})});e=!!(await s.json()).valid,F(e?"success":"failed")}catch{F("failed")}finally{U(!1)}await h({name:T.name||(f?"Ollama Local":""),apiKey:T.apiKey,defaultModel:l?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===b?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{q(!1)}}},Z=async()=>{let e=K.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;q(!0),B(null);let s=0,a=0,i=new Set;try{let e=await fetch(`/api/providers?provider=${encodeURIComponent(t)}&summary=1`,{cache:"no-store"});if(!e.ok)throw Error(`Unable to load existing keys (${e.status})`);for(let t of(await e.json()).connections||[])t?.name&&i.add(String(t.name).trim().toLowerCase())}catch{q(!1),B({success:0,failed:e.length});return}for(let l=0;l<e.length;l++){let r=e[l].split("|"),n=r.length>=2?r.slice(1).join("|").trim():r[0].trim(),o=function(e,t){let s=String(e||"Key").trim()||"Key",a=RegExp(`^${String(s).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s+(\\d+)$`,"i"),i=new Set;for(let e of t){let t=String(e||"").trim().match(a);t&&i.add(Number(t[1]))}let l=1;for(;i.has(l);)l+=1;let r=`${s} ${l}`;return t.add(r.toLowerCase()),r}(r.length>=2?r[0].trim():"Key",i);try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:n,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}q(!1),B({success:s,failed:a}),s>0&&u&&u()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:g,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{H("single"),B(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{H("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:K,onChange:e=>J(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!K.trim(),children:z?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:T.name,onChange:e=>$({...T,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>$({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:M||z,variant:"secondary",children:M?"Checking...":"Check"})})]}),!f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:T.apiKey,onChange:e=>$({...T,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:!T.apiKey||M||z,variant:"secondary",children:M?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:E,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>$({...T,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),_&&(0,a.jsx)(d.Ex,{variant:"success"===_?"success":"error",children:"success"===_?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:O.accountId,onChange:e=>P({...O,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:e=>R({...I,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:I.deployment,onChange:e=>R({...I,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:I.apiVersion,onChange:e=>R({...I,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:I.organization,onChange:e=>R({...I,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>$({...T,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>$({...T,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!T.name||!T.apiKey)||l&&!T.defaultModel.trim()||k&&(!I.azureEndpoint||!I.deployment||!I.organization)||N&&!O.accountId,children:z?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}C.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired};var S=s(70673);function A({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",deploymentType:"cloud",openAICompatibleRuntime:c.hb,routingTags:"",maxInFlight:""}),[m,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(""),[u,g]=(0,i.useState)(""),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(t){let e=t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1");o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:e,deploymentType:(0,S.t9)(t.deploymentType,"")||(0,S.tW)(e),openAICompatibleRuntime:t.openAICompatibleRuntime||t.providerSpecificData?.openAICompatibleRuntime||c.hb,routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})}},[t,r]);let j=S.HE.map(({value:e,label:t})=>({value:e,label:t})),k=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),a=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(a)&&a>0?i.maxInFlight=a:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,deploymentType:n.deploymentType,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType,l.openAICompatibleRuntime=n.openAICompatibleRuntime),await s(l)}finally{p(!1)}}},N=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),!r&&(0,a.jsx)(d.l6,{label:"Server Type",options:c._8,value:n.openAICompatibleRuntime,onChange:e=>o({...n,openAICompatibleRuntime:e.target.value}),hint:c._8.find(e=>e.value===n.openAICompatibleRuntime)?.description||"Controls how BlueRouter maps thinking/reasoning params for this endpoint."}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsx)(d.l6,{label:"Deployment",options:j,value:n.deploymentType,onChange:e=>o({...n,deploymentType:e.target.value}),hint:"Controls Local vs Cloud usage/analytics classification. Compatible describes the API protocol, not where the model runs."}),(0,a.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,a.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>h(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:N,disabled:!x||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>g(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:k,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||m,children:m?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function T({isOpen:e,providerAlias:t,providerDisplayAlias:s,connectionId:l,onSave:r,onClose:n}){let[o,c]=(0,i.useState)(""),[m,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(""),[u,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(c(""),p(null),h(""))},[e]);let b=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},f=async()=>{let e=b(o.trim());if(e){p("testing"),h("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`,connectionId:l})}),a=await s.json();p(a.ok?"ok":"error"),h(a.error||"")}catch(e){p("error"),h(e.message)}}},y=async()=>{let e=b(o.trim());if(e&&!u){g(!0);try{await r(e)}finally{g(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>{c(e.target.value),p(null),h("")},onKeyDown:e=>{"Enter"===e.key&&f()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:f,disabled:!o.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:b(o.trim())||"model-id"})]})]}),"ok"===m&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:x||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!o.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}A.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,openAICompatibleRuntime:g().string,baseUrl:g().string,deploymentType:g().string,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number])}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},T.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,connectionId:g().string,onSave:g().func.isRequired,onClose:g().func.isRequired};var $=s(86600);function I(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,u]=(0,i.useState)([]),[g,y]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[w,S]=(0,i.useState)([]),[I,R]=(0,i.useState)(!1),[O,P]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[M,U]=(0,i.useState)(""),[_,F]=(0,i.useState)(!1),[z,q]=(0,i.useState)(!1),[L,H]=(0,i.useState)(!1),[K,J]=(0,i.useState)(null),[W,B]=(0,i.useState)({}),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)({}),[X,Y]=(0,i.useState)(""),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(!1),[ei,el]=(0,i.useState)([]),[er,en]=(0,i.useState)("__none__"),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(null),[ep,ex]=(0,i.useState)({}),[eh,eu]=(0,i.useState)(null),[eg,eb]=(0,i.useState)(""),[ef,ey]=(0,i.useState)("global"),[ev,ej]=(0,i.useState)("120"),[ek,eN]=(0,i.useState)(!0),[ew,eC]=(0,i.useState)(!0),[eS,eA]=(0,i.useState)("3"),[eT,e$]=(0,i.useState)("auto"),[eI,eR]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eE,eD]=(0,i.useState)([]),[eM,eU]=(0,i.useState)(null),[e_,eF]=(0,i.useState)(!1),[ez,eq]=(0,i.useState)(!1),[eL,eH]=(0,i.useState)(!1),[eK,eJ]=(0,i.useState)(null),[eW,eB]=(0,i.useState)({}),[eG,eV]=(0,i.useState)(null),eQ=(0,i.useRef)(!1),{copied:eZ,copy:eX}=(0,p.C)(),eY="ag_risk_confirmed",e0=()=>{R(!0)},e1=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eY)?eF(!0):e6?e0():(U(""),D(!0))},e2=()=>{U(""),D(!0)},e5=()=>{e6?e1():e2()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e4=e3?.authModes||[],e6=!!c.zN[r]||!!c.IS[r]||e4.includes("oauth"),e9=!!c.fg[r]||e4.includes("apikey"),e7=!!c.IS[r]?.noAuth,e8=(0,m.KC)(r),te=(0,c.wG)(r),tt=(0,c.mq)(r),ts=(0,c.gb)(r),ta=tt||ts,ti=!ta&&e6&&e9,tl="xai"===r?"Grok Build OAuth":"OAuth",tr="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tn=ta?r:te,to=ta?v?.prefix||r:te,td=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tn]),tc=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:[e]})})).ok&&await td()}catch(e){console.log("Error disabling model:",e)}},tm=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling model:",e)}},tp=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:e})})).ok&&await td()}catch(e){console.log("Error disabling all models:",e)}}})},tx=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling all models:",e)}},th=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let tu=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);u(e)}s.ok&&S(n.proxyPools||[]),em((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eu(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ey(d.stickyScope||"global"),ej(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),eN(!1!==d.stickyFallbackToClientIp),eC(!1!==d.stickyRebindOnFailure),eA(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(e$(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ta)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,ta]),tg=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(j(s.node),await tu(),q(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,s={})=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),i=(a.ok?await a.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eg||1)||1,l.stickyScope=s.stickyScope??ef??"global",l.stickyTtlMinutes=Number(s.stickyTtlMinutes??ev??120)||120,l.stickyFallbackToClientIp=void 0!==s.stickyFallbackToClientIp?!!s.stickyFallbackToClientIp:!1!==ek,l.stickyRebindOnFailure=void 0!==s.stickyRebindOnFailure?!!s.stickyRebindOnFailure:!1!==ew,l.stickyRebindFailureThreshold=Number(s.stickyRebindFailureThreshold??eS??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tu(),th(),td()},[tu,th,td]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eR)},[r]);let tf=async(e,t,s=te)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await th();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ty=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error deleting alias:",e)}},tv=async()=>{if(ez||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eQ.current=!1,eq(!0),eH(!1),eJ(null),eB(e),eV({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eQ.current){eV({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eJ(a.id),eB(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eB(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eB(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eJ(null),eq(!1),eH(!1),eQ.current=!1}},tj=async e=>{ex(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),s=await t.json().catch(()=>({}));t.ok||alert(s.error||"Health check failed"),await tu()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ex(t=>({...t,[e]:!1}))}},tk=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&u(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tN=()=>{tu(),R(!1)},tw=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tu(),D(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tC=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tu(),F(!1))}catch(e){console.log("Error updating connection:",e)}},tS=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&u(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tA=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],u(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tu()}},tT=x.filter(e=>ei.includes(e.id));x.length>0&&(ei.length,x.length),(0,i.useEffect)(()=>{el(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=w.find(e=>e.id===t);return s?.name}})();let t$=()=>{eo||H(!1)},tI=async e=>{ed(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tu(),H(!1)}finally{ed(!1)}},tR=e=>tI(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(k,{connection:e,proxyPools:w,isOAuth:e6,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tA(t,t-1),onMoveDown:()=>tA(t,t+1),onToggleActive:t=>tS(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&u(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{J(e),F(!0)},onDelete:()=>tk(e.id),oneByOneStatus:eW[e.id]||null,providerHealthConfig:ec,healthCheckRunning:!!ep[e.id],onRunHealthCheck:()=>tj(e.id)})})},e.id))}),tP=w.filter(e=>!0===e.isActive),tE=(0,a.jsx)(d.aF,{isOpen:L,onClose:t$,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=w.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tI(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eo||0===tP.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tR(null),disabled:eo,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),w.map(e=>(0,a.jsxs)("button",{onClick:()=>tR(e.id),disabled:eo||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eo&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:t$,variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})}),tD=()=>{let e=x.find(e=>!1!==e.isActive);return e?.id||x[0]?.id||null},tM=async e=>{if(!ee){et(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tn}/${e}`,connectionId:tD()})}),s=await t.json();Z(t=>({...t,[e]:s.ok?"ok":"error"})),Y(s.ok?"":s.error||"Model not reachable")}catch{Z(t=>({...t,[e]:"error"})),Y("Network error")}finally{et(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e3?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:G?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tt&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ts?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,a.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e3.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),ta&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ts?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ts?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",ts?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{U(""),D(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>q(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ts?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ta&&v&&(0,a.jsx)($.A,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:W}),e7?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===eh&&(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&w.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>H(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tv,disabled:ez,children:ez?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ez&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ez&&(eQ.current=!0,eH(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eh,onChange:e=>{let t=e?"round-robin":null,s=e?eg||"1":eg;e&&!eg&&eb("1"),eu(t),tb(t,s)}}),"round-robin"===eh&&(0,a.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eg,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===eh&&(0,a.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,a.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,a.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,a.jsxs)("select",{value:ef,onChange:e=>{var t;ey(t=e.target.value),tb("round-robin",eg||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,a.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,a.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,a.jsx)("input",{type:"number",min:1,max:10080,value:ev,onChange:e=>{var t;ej(t=e.target.value),tb("round-robin",eg||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,a.jsx)("input",{type:"number",min:1,max:50,value:eS,onChange:e=>{var t;eA(t=e.target.value),tb("round-robin",eg||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!ew,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,a.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,a.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:ek,onChange:e=>{var t;eN(t=e.target.checked),tb("round-robin",eg||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:ew,onChange:e=>{var t;eC(t=e.target.checked),tb("round-robin",eg||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,a.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,a.jsx)(N.A,{providerId:r,onSaved:tu})," ",0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e6?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ti&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tl," or ",tr,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:ti?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,children:tl}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,children:tr})]}):(0,a.jsxs)(a.Fragment,{children:[!ta&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,children:ta?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eG&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eG.total]}),(0,a.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ez&&eK&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eK)?.name||eK]})]})}),tO,!ta&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ti?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,className:"w-full sm:w-auto",children:tl}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,className:"w-full sm:w-auto",children:tr})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ta&&(e=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eE.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eE.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tx,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tp(e),children:"Disable All"})]}))]}),!!X&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:X}),(()=>{let e,t,s;if(ta)return(0,a.jsx)(f.A,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:W,copied:eZ,onCopy:eX,onSetAlias:tf,onDeleteAlias:ty,connections:x,isAnthropic:ts});let i=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eE),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(W).filter(([e,t])=>{let s=`${tn}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return e3.passthroughModels?!e8.some(e=>e.id===a):!e8.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tn}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(b,{model:{id:e.id},fullModel:`${to}/${e.id}`,alias:e.alias,copied:eZ,onCopy:eX,onSetAlias:()=>{},onDeleteAlias:()=>ty(e.alias),testStatus:Q[e.id],onTest:x.length>0||e7?()=>tM(e.id):void 0,isTesting:ee===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tn}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(W).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(b,{model:e,fullModel:`${to}/${e.id}`,alias:i,copied:eZ,onCopy:eX,onSetAlias:t=>tf(e.id,t,tn),onDeleteAlias:()=>ty(i),testStatus:Q[e.id],onTest:x.length>0||e7?()=>tM(e.id):void 0,isTesting:ee===e.id,isFree:e.isFree,onDisable:()=>tc(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ea(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eI.length>0&&(e=new Set(Object.values(W)),t=new Set(e8.map(e=>e.id)),0===(s=eI.filter(s=>!e.has(`${tn}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tf(e.id,t,tn)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tm(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tE,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:I,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:I,onSuccess:tN,onClose:()=>R(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:I,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}):(0,a.jsx)(d.LF,{isOpen:I,provider:r,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:O,onSuccess:()=>{tu(),P(!1)},onClose:()=>P(!1)}),(0,a.jsx)(C,{isOpen:E,provider:r,providerName:e3.name,isCompatible:ta,isAnthropic:ts,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:w,error:M,onSave:tw,onBulkDone:tu,onClose:()=>{U(""),D(!1)}}),(0,a.jsx)(d.wI,{isOpen:_,connection:K,proxyPools:w,onSave:tC,onClose:()=>F(!1)}),ta&&(0,a.jsx)(A,{isOpen:z,node:v,onSave:tg,onClose:()=>q(!1),isAnthropic:ts}),!ta&&(0,a.jsx)(T,{isOpen:es,providerAlias:tn,providerDisplayAlias:to,connectionId:tD(),onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tf(e,t,tn),ea(!1)},onClose:()=>ea(!1)}),(0,a.jsx)(d.uo,{isOpen:e_,onClose:()=>eF(!1),onConfirm:()=>{(window.localStorage.setItem(eY,"true"),eF(!1),e6)?e0():e2()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eM,onClose:()=>eU(null),onConfirm:eM?.onConfirm,title:eM?.title||"Confirm",message:eM?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}}},e=>{e.O(0,[8991,3862,9893,9959,1997,5772,5564,5263,7033,5497,8619,8441,3794,7358],()=>e(e.s=96357)),_N_E=e.O()}]);
3
+ sk-key-only-auto-named`;function C({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:h,onBulkDone:u,onClose:g}){let b="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,A=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[T,$]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[I,R]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[O,P]=(0,i.useState)({accountId:""}),[E,D]=(0,i.useState)(A),[M,U]=(0,i.useState)(!1),[_,F]=(0,i.useState)(null),[z,q]=(0,i.useState)(!1),[L,H]=(0,i.useState)("single"),[K,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&T.ollamaHostUrl.trim()?{baseUrl:T.ollamaHostUrl.trim()}:k?{azureEndpoint:I.azureEndpoint,apiVersion:I.apiVersion,deployment:I.deployment,organization:I.organization}:N?{accountId:O.accountId}:S&&E?{region:E}:void 0,V=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:G()})}),s=await e.json();F(s.valid?"success":"failed")}catch{F("failed")}finally{U(!1)}},Q=async()=>{if(t&&(f||T.apiKey)&&(f||T.name)&&(!l||T.defaultModel.trim())){q(!0);try{let e=!1;try{U(!0),F(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:G()})});e=!!(await s.json()).valid,F(e?"success":"failed")}catch{F("failed")}finally{U(!1)}await h({name:T.name||(f?"Ollama Local":""),apiKey:T.apiKey,defaultModel:l?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===b?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{q(!1)}}},Z=async()=>{let e=K.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;q(!0),B(null);let s=0,a=0,i=new Set;try{let e=await fetch(`/api/providers?provider=${encodeURIComponent(t)}&summary=1`,{cache:"no-store"});if(!e.ok)throw Error(`Unable to load existing keys (${e.status})`);for(let t of(await e.json()).connections||[])t?.name&&i.add(String(t.name).trim().toLowerCase())}catch{q(!1),B({success:0,failed:e.length});return}for(let l=0;l<e.length;l++){let r=e[l].split("|"),n=r.length>=2?r.slice(1).join("|").trim():r[0].trim(),o=function(e,t){let s=String(e||"Key").trim()||"Key",a=RegExp(`^${String(s).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s+(\\d+)$`,"i"),i=new Set;for(let e of t){let t=String(e||"").trim().match(a);t&&i.add(Number(t[1]))}let l=1;for(;i.has(l);)l+=1;let r=`${s} ${l}`;return t.add(r.toLowerCase()),r}(r.length>=2?r[0].trim():"Key",i);try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:n,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}q(!1),B({success:s,failed:a}),s>0&&u&&u()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:g,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{H("single"),B(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{H("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:K,onChange:e=>J(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!K.trim(),children:z?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:T.name,onChange:e=>$({...T,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>$({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:M||z,variant:"secondary",children:M?"Checking...":"Check"})})]}),!f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:T.apiKey,onChange:e=>$({...T,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:!T.apiKey||M||z,variant:"secondary",children:M?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:E,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>$({...T,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),_&&(0,a.jsx)(d.Ex,{variant:"success"===_?"success":"error",children:"success"===_?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:O.accountId,onChange:e=>P({...O,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:e=>R({...I,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:I.deployment,onChange:e=>R({...I,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:I.apiVersion,onChange:e=>R({...I,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:I.organization,onChange:e=>R({...I,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>$({...T,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>$({...T,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!T.name||!T.apiKey)||l&&!T.defaultModel.trim()||k&&(!I.azureEndpoint||!I.deployment||!I.organization)||N&&!O.accountId,children:z?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}C.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired};var S=s(70673);function A({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",deploymentType:"cloud",openAICompatibleRuntime:c.hb,routingTags:"",maxInFlight:""}),[m,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(""),[u,g]=(0,i.useState)(""),[b,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(t){let e=t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1");o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:e,deploymentType:(0,S.t9)(t.deploymentType,"")||(0,S.tW)(e),openAICompatibleRuntime:t.openAICompatibleRuntime||t.providerSpecificData?.openAICompatibleRuntime||c.hb,routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})}},[t,r]);let j=S.HE.map(({value:e,label:t})=>({value:e,label:t})),k=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),a=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(a)&&a>0?i.maxInFlight=a:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,deploymentType:n.deploymentType,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType,l.openAICompatibleRuntime=n.openAICompatibleRuntime),await s(l)}finally{p(!1)}}},N=async()=>{f(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{f(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),!r&&(0,a.jsx)(d.l6,{label:"Server Type",options:c._8,value:n.openAICompatibleRuntime,onChange:e=>o({...n,openAICompatibleRuntime:e.target.value}),hint:c._8.find(e=>e.value===n.openAICompatibleRuntime)?.description||"Controls how BlueRouter maps thinking/reasoning params for this endpoint."}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsx)(d.l6,{label:"Deployment",options:j,value:n.deploymentType,onChange:e=>o({...n,deploymentType:e.target.value}),hint:"Controls Local vs Cloud usage/analytics classification. Compatible describes the API protocol, not where the model runs."}),(0,a.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,a.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>h(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:N,disabled:!x||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>g(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:k,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||m,children:m?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function T({isOpen:e,providerAlias:t,providerDisplayAlias:s,connectionId:l,onSave:r,onClose:n}){let[o,c]=(0,i.useState)(""),[m,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(""),[u,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(c(""),p(null),h(""))},[e]);let b=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},f=async()=>{let e=b(o.trim());if(e){p("testing"),h("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`,connectionId:l})}),a=await s.json();p(a.ok?"ok":"error"),h(a.error||"")}catch(e){p("error"),h(e.message)}}},y=async()=>{let e=b(o.trim());if(e&&!u){g(!0);try{await r(e)}finally{g(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>{c(e.target.value),p(null),h("")},onKeyDown:e=>{"Enter"===e.key&&f()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:f,disabled:!o.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:b(o.trim())||"model-id"})]})]}),"ok"===m&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:x||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!o.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}A.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,openAICompatibleRuntime:g().string,baseUrl:g().string,deploymentType:g().string,providerSpecificData:g().object,tags:g().oneOfType([g().string,g().array]),maxInFlight:g().oneOfType([g().string,g().number])}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},T.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,connectionId:g().string,onSave:g().func.isRequired,onClose:g().func.isRequired};var $=s(86600);function I(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,u]=(0,i.useState)([]),[g,y]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[w,S]=(0,i.useState)([]),[I,R]=(0,i.useState)(!1),[O,P]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[M,U]=(0,i.useState)(""),[_,F]=(0,i.useState)(!1),[z,q]=(0,i.useState)(!1),[L,H]=(0,i.useState)(!1),[K,J]=(0,i.useState)(null),[W,B]=(0,i.useState)({}),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)({}),[X,Y]=(0,i.useState)(""),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(!1),[ei,el]=(0,i.useState)([]),[er,en]=(0,i.useState)("__none__"),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(null),[ep,ex]=(0,i.useState)({}),[eh,eu]=(0,i.useState)(null),[eg,eb]=(0,i.useState)(""),[ef,ey]=(0,i.useState)("global"),[ev,ej]=(0,i.useState)("120"),[ek,eN]=(0,i.useState)(!0),[ew,eC]=(0,i.useState)(!0),[eS,eA]=(0,i.useState)("3"),[eT,e$]=(0,i.useState)("auto"),[eI,eR]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eE,eD]=(0,i.useState)([]),[eM,eU]=(0,i.useState)(null),[e_,eF]=(0,i.useState)(!1),[ez,eq]=(0,i.useState)(!1),[eL,eH]=(0,i.useState)(!1),[eK,eJ]=(0,i.useState)(null),[eW,eB]=(0,i.useState)({}),[eG,eV]=(0,i.useState)(null),eQ=(0,i.useRef)(!1),{copied:eZ,copy:eX}=(0,p.C)(),eY="ag_risk_confirmed",e0=()=>{R(!0)},e1=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eY)?eF(!0):e6?e0():(U(""),D(!0))},e2=()=>{U(""),D(!0)},e5=()=>{e6?e1():e2()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e4=e3?.authModes||[],e6=!!c.zN[r]||!!c.IS[r]||e4.includes("oauth"),e9=!!c.fg[r]||e4.includes("apikey"),e7=!!c.IS[r]?.noAuth,e8=(0,m.KC)(r),te=(0,c.wG)(r),tt=(0,c.mq)(r),ts=(0,c.gb)(r),ta=tt||ts,ti=!ta&&e6&&e9,tl="xai"===r?"Grok Build OAuth":"OAuth",tr="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tn=ta?r:te,to=ta?v?.prefix||r:te,td=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tn]),tc=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:[e]})})).ok&&await td()}catch(e){console.log("Error disabling model:",e)}},tm=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling model:",e)}},tp=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tn,ids:e})})).ok&&await td()}catch(e){console.log("Error disabling all models:",e)}}})},tx=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tn)}`,{method:"DELETE"})).ok&&await td()}catch(e){console.log("Error enabling all models:",e)}},th=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let tu=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);u(e)}s.ok&&S(n.proxyPools||[]),em((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eu(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ey(d.stickyScope||"global"),ej(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),eN(!1!==d.stickyFallbackToClientIp),eC(!1!==d.stickyRebindOnFailure),eA(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(e$(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ta)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,ta]),tg=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(j(s.node),await tu(),q(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,s={})=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),i=(a.ok?await a.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eg||1)||1,l.stickyScope=s.stickyScope??ef??"global",l.stickyTtlMinutes=Number(s.stickyTtlMinutes??ev??120)||120,l.stickyFallbackToClientIp=void 0!==s.stickyFallbackToClientIp?!!s.stickyFallbackToClientIp:!1!==ek,l.stickyRebindOnFailure=void 0!==s.stickyRebindOnFailure?!!s.stickyRebindOnFailure:!1!==ew,l.stickyRebindFailureThreshold=Number(s.stickyRebindFailureThreshold??eS??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tu(),th(),td()},[tu,th,td]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eR)},[r]);let tf=async(e,t,s=te)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await th();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ty=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await th()}catch(e){console.log("Error deleting alias:",e)}},tv=async()=>{if(ez||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eQ.current=!1,eq(!0),eH(!1),eJ(null),eB(e),eV({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eQ.current){eV({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eJ(a.id),eB(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eB(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eB(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eJ(null),eq(!1),eH(!1),eQ.current=!1}},tj=async e=>{ex(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),s=await t.json().catch(()=>({}));t.ok||alert(s.error||"Health check failed"),await tu()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ex(t=>({...t,[e]:!1}))}},tk=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&u(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tN=()=>{tu(),R(!1)},tw=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tu(),D(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tC=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tu(),F(!1))}catch(e){console.log("Error updating connection:",e)}},tS=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&u(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tA=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],u(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tu()}},tT=x.filter(e=>ei.includes(e.id));x.length>0&&(ei.length,x.length),(0,i.useEffect)(()=>{el(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=w.find(e=>e.id===t);return s?.name}})();let t$=()=>{eo||H(!1)},tI=async e=>{ed(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tu(),H(!1)}finally{ed(!1)}},tR=e=>tI(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(k,{connection:e,proxyPools:w,isOAuth:e6,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tA(t,t-1),onMoveDown:()=>tA(t,t+1),onToggleActive:t=>tS(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&u(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{J(e),F(!0)},onDelete:()=>tk(e.id),oneByOneStatus:eW[e.id]||null,providerHealthConfig:ec,healthCheckRunning:!!ep[e.id],onRunHealthCheck:()=>tj(e.id)})})},e.id))}),tP=w.filter(e=>!0===e.isActive),tE=(0,a.jsx)(d.aF,{isOpen:L,onClose:t$,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=w.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tI(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eo||0===tP.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tR(null),disabled:eo,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),w.map(e=>(0,a.jsxs)("button",{onClick:()=>tR(e.id),disabled:eo||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eo&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:t$,variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})}),tD=()=>{let e=x.find(e=>!1!==e.isActive);return e?.id||x[0]?.id||null},tM=async e=>{if(!ee){et(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tn}/${e}`,connectionId:tD()})}),s=await t.json();Z(t=>({...t,[e]:s.ok?"ok":"error"})),Y(s.ok?"":s.error||"Model not reachable")}catch{Z(t=>({...t,[e]:"error"})),Y("Network error")}finally{et(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e3?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:G?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tt&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ts?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,a.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e3.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),ta&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ts?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ts?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",ts?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{U(""),D(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>q(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ts?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ta&&v&&(0,a.jsx)($.A,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:W}),e7?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===eh&&(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&w.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>H(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tv,disabled:ez,children:ez?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ez&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ez&&(eQ.current=!0,eH(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eh,onChange:e=>{let t=e?"round-robin":null,s=e?eg||"1":eg;e&&!eg&&eb("1"),eu(t),tb(t,s)}}),"round-robin"===eh&&(0,a.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eg,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===eh&&(0,a.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,a.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,a.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,a.jsxs)("select",{value:ef,onChange:e=>{var t;ey(t=e.target.value),tb("round-robin",eg||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,a.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,a.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,a.jsx)("input",{type:"number",min:1,max:10080,value:ev,onChange:e=>{var t;ej(t=e.target.value),tb("round-robin",eg||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,a.jsx)("input",{type:"number",min:1,max:50,value:eS,onChange:e=>{var t;eA(t=e.target.value),tb("round-robin",eg||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!ew,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,a.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,a.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:ek,onChange:e=>{var t;eN(t=e.target.checked),tb("round-robin",eg||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:ew,onChange:e=>{var t;eC(t=e.target.checked),tb("round-robin",eg||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,a.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,a.jsx)(N.A,{providerId:r,onSaved:tu})," ",0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e6?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ti&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tl," or ",tr,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:ti?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,children:tl}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,children:tr})]}):(0,a.jsxs)(a.Fragment,{children:[!ta&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,children:ta?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eG&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eG.total]}),(0,a.jsxs)("span",{children:["Completed: ",eG.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eG.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eG.failed]}),eG.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ez&&eK&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eK)?.name||eK]})]})}),tO,!ta&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ti?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e1,className:"w-full sm:w-auto",children:tl}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e2,className:"w-full sm:w-auto",children:tr})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e5,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ta&&(e=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eE.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eE.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tx,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tp(e),children:"Disable All"})]}))]}),!!X&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:X}),(()=>{let e,t,s;if(ta)return(0,a.jsx)(f.A,{providerStorageAlias:tn,providerDisplayAlias:to,modelAliases:W,copied:eZ,onCopy:eX,onSetAlias:tf,onDeleteAlias:ty,connections:x,isAnthropic:ts});let i=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eE),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(W).filter(([e,t])=>{let s=`${tn}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return e3.passthroughModels?!e8.some(e=>e.id===a):!e8.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tn}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(b,{model:{id:e.id},fullModel:`${to}/${e.id}`,alias:e.alias,copied:eZ,onCopy:eX,onSetAlias:()=>{},onDeleteAlias:()=>ty(e.alias),testStatus:Q[e.id],onTest:x.length>0||e7?()=>tM(e.id):void 0,isTesting:ee===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tn}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(W).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(b,{model:e,fullModel:`${to}/${e.id}`,alias:i,copied:eZ,onCopy:eX,onSetAlias:t=>tf(e.id,t,tn),onDeleteAlias:()=>ty(i),testStatus:Q[e.id],onTest:x.length>0||e7?()=>tM(e.id):void 0,isTesting:ee===e.id,isFree:e.isFree,onDisable:()=>tc(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ea(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eI.length>0&&(e=new Set(Object.values(W)),t=new Set(e8.map(e=>e.id)),0===(s=eI.filter(s=>!e.has(`${tn}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tf(e.id,t,tn)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tm(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tE,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:I,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:I,onSuccess:tN,onClose:()=>R(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:I,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}):(0,a.jsx)(d.LF,{isOpen:I,provider:r,providerInfo:e3,onSuccess:tN,onClose:()=>R(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:O,onSuccess:()=>{tu(),P(!1)},onClose:()=>P(!1)}),(0,a.jsx)(C,{isOpen:E,provider:r,providerName:e3.name,isCompatible:ta,isAnthropic:ts,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:w,error:M,onSave:tw,onBulkDone:tu,onClose:()=>{U(""),D(!1)}}),(0,a.jsx)(d.wI,{isOpen:_,connection:K,proxyPools:w,onSave:tC,onClose:()=>F(!1)}),ta&&(0,a.jsx)(A,{isOpen:z,node:v,onSave:tg,onClose:()=>q(!1),isAnthropic:ts}),!ta&&(0,a.jsx)(T,{isOpen:es,providerAlias:tn,providerDisplayAlias:to,connectionId:tD(),onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tf(e,t,tn),ea(!1)},onClose:()=>ea(!1)}),(0,a.jsx)(d.uo,{isOpen:e_,onClose:()=>eF(!1),onConfirm:()=>{(window.localStorage.setItem(eY,"true"),eF(!1),e6)?e0():e2()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eM,onClose:()=>eU(null),onConfirm:eM?.onConfirm,title:eM?.title||"Confirm",message:eM?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}}},e=>{e.O(0,[8991,3862,9893,9959,8500,7050,5772,5564,5263,7033,5497,8619,8441,3794,7358],()=>e(e.s=96357)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},20302:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[8991,3862,9893,9959,1997,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=20302)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},20302:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[8991,3862,9893,9959,8500,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=20302)),_N_E=e.O()}]);