nggrouter 0.1.21 → 0.1.23
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.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +14 -12
- package/app/.next-cli-build/build-manifest.json +4 -4
- package/app/.next-cli-build/prerender-manifest.json +49 -21
- package/app/.next-cli-build/react-loadable-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +12 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/addons/list/route.js +1 -1
- package/app/.next-cli-build/server/app/api/addons/list/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/addons/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/addons/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/checkin/route.js +1 -0
- package/app/.next-cli-build/server/app/api/checkin/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/checkin/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +22 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/bulk-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/bulk-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/system/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/system/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/arena.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/!KGRhc2hib2FyZCk/dashboard/arena/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/checkin.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.meta +44 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.rsc +45 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/!KGRhc2hib2FyZCk/dashboard/checkin/__PAGE__.segment.rsc +47 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/_full.segment.rsc +45 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/_tree.segment.rsc +11 -0
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/system-status.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/system-status.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/!KGRhc2hib2FyZCk/dashboard/system-status/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +14 -12
- package/app/.next-cli-build/server/chunks/1132.js +1 -1
- package/app/.next-cli-build/server/chunks/1306.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +22 -2
- package/app/.next-cli-build/server/chunks/1782.js +51 -0
- package/app/.next-cli-build/server/chunks/2236.js +1 -0
- package/app/.next-cli-build/server/chunks/238.js +1 -1
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2559.js +1 -1
- package/app/.next-cli-build/server/chunks/2925.js +1 -1
- package/app/.next-cli-build/server/chunks/2970.js +2 -2
- package/app/.next-cli-build/server/chunks/3192.js +3 -3
- package/app/.next-cli-build/server/chunks/{1851.js → 3360.js} +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4334.js +1 -0
- package/app/.next-cli-build/server/chunks/4386.js +1 -1
- package/app/.next-cli-build/server/chunks/444.js +1 -0
- package/app/.next-cli-build/server/chunks/4732.js +2 -0
- package/app/.next-cli-build/server/chunks/4775.js +1 -1
- package/app/.next-cli-build/server/chunks/4803.js +9 -0
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/{3277.js → 5274.js} +1 -1
- package/app/.next-cli-build/server/chunks/5299.js +11 -4
- package/app/.next-cli-build/server/chunks/5330.js +11 -7
- package/app/.next-cli-build/server/chunks/5360.js +2 -0
- package/app/.next-cli-build/server/chunks/539.js +1 -0
- package/app/.next-cli-build/server/chunks/5390.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5800.js +9 -0
- package/app/.next-cli-build/server/chunks/6103.js +1 -0
- package/app/.next-cli-build/server/chunks/6252.js +9 -0
- package/app/.next-cli-build/server/chunks/6267.js +1 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6877.js +1 -1
- package/app/.next-cli-build/server/chunks/6922.js +1 -1
- package/app/.next-cli-build/server/chunks/7121.js +1 -1
- package/app/.next-cli-build/server/chunks/7141.js +1 -0
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7373.js +2 -2
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +13 -13
- package/app/.next-cli-build/server/chunks/7828.js +1 -1
- package/app/.next-cli-build/server/chunks/7911.js +1 -1
- package/app/.next-cli-build/server/chunks/7965.js +2 -2
- package/app/.next-cli-build/server/chunks/8062.js +9 -0
- package/app/.next-cli-build/server/chunks/8228.js +9 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8432.js +1 -0
- package/app/.next-cli-build/server/chunks/8469.js +9 -0
- package/app/.next-cli-build/server/chunks/8499.js +4 -54
- package/app/.next-cli-build/server/chunks/8895.js +13 -8
- package/app/.next-cli-build/server/chunks/8910.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/915.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +2 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +6 -6
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/prefetch-hints.json +24 -0
- package/app/.next-cli-build/server/preview-props.json +3 -3
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/2985-0edfac861dcab249.js +1 -0
- package/app/.next-cli-build/static/chunks/{3794-39f2d5bb0d40336b.js → 3794-04350b0fcecd82e5.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-2ad88f6a28d488f2.js +7 -0
- package/app/.next-cli-build/static/chunks/{620-eb4703fefb0a8224.js → 620-664195c468db3646.js} +1 -1
- package/app/.next-cli-build/static/chunks/{761-ee86f920b407fe8e.js → 761-4b979ab522d3ca71.js} +11 -4
- package/app/.next-cli-build/static/chunks/8105-8f6822fa963b7f8e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/checkin/page-42825bd41f565908.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-cfb01ebc3a0d2693.js → page-96c2c298c3e438e7.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-41255a729606a996.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b9356341fb501ec9.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5fb01979338d3c54.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-e2e50aefcea07c9b.js → page-002702d0d2cd95ab.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-c2ab03a59a42ed24.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-bac485d168267329.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/addons/list/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/addons/update/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/checkin/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/system/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/{main-00cd8c01f6f6e461.js → main-ca004678a0b6b16d.js} +1 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-c056b5babdc7a81f.js → webpack-d22e163354099479.js} +1 -1
- package/app/.next-cli-build/static/css/5ce1d74323ea1a81.css +1 -0
- package/app/.next-cli-build/static/o6uo4o14Oyh19p0YQDVpi/_buildManifest.js +1 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/app/node_modules/@aws-sdk/core/package.json +2 -2
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/app/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/app/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/app/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/app/node_modules/@aws-sdk/credential-providers/package.json +13 -13
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/app/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/app/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +4 -4
- package/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/app/node_modules/next/dist/build/webpack-config.js +3 -3
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
- package/app/node_modules/next/dist/server/config.js +1 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/app/node_modules/next/dist/server/lib/generate-agent-files.js +3 -3
- package/app/node_modules/next/dist/server/lib/router-server.js +1 -1
- package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/app/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
- package/app/node_modules/next/dist/server/typescript/rules/config.js +2 -2
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/package.json +10 -10
- package/app/node_modules/sql.js/dist/sql-wasm.js +92 -92
- package/app/node_modules/sql.js/package.json +1 -1
- package/app/package.json +2 -2
- package/app/public/fonts/material-symbols-outlined.woff2 +0 -0
- package/app/src/mitm/server.js +25 -25
- package/package.json +1 -1
- package/src/cli/menus/providers.js +4 -0
- package/app/.next-cli-build/server/chunks/2708.js +0 -1
- package/app/.next-cli-build/server/chunks/3726.js +0 -1
- package/app/.next-cli-build/server/chunks/700.js +0 -1
- package/app/.next-cli-build/server/chunks/7066.js +0 -1
- package/app/.next-cli-build/server/chunks/8251.js +0 -1
- package/app/.next-cli-build/server/chunks/8402.js +0 -1
- package/app/.next-cli-build/server/chunks/8716.js +0 -1
- package/app/.next-cli-build/static/-A8yVxeQUhunMwVeISlwZ/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-bdb464e8bf997966.js +0 -7
- package/app/.next-cli-build/static/chunks/6808-e6340e2d4cfe01fe.js +0 -1
- package/app/.next-cli-build/static/chunks/8105-5dd3fc022d984a17.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-b29648e60668531b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-deb38e87524ff14e.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-06427d5637ff9cb2.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-07ce5bf168a701aa.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-8d03e04e4f7e0bcc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/addons/list/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/addons/update/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/system/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/css/a97374177c39fad4.css +0 -1
- /package/app/.next-cli-build/static/{-A8yVxeQUhunMwVeISlwZ → o6uo4o14Oyh19p0YQDVpi}/_ssgManifest.js +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},24075:(a,b,c)=>{Promise.resolve().then(c.bind(c,24777))},24777:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>Z});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(29225),k=c(50412),l=c(92592),m=c(91431),n=c(70552),o=c(18982);c(87592);var p=c(60757);let q=["none","low","medium","high"],r=["none","thinking"],s=["none","low","medium","high","xhigh","max"],t={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":s,"claude-budget":s,"gemini-level":["minimal","low","medium","high"],"gemini-budget":q,zai:r,qwen:q,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:r,hunyuan:q,step:q},u=["none","minimal","low","medium","high","xhigh","max"],v=["none","low","medium","high","max"],w=[{pattern:"*claude*4.6*",levels:v},{pattern:"*claude*4-6*",levels:v},{provider:"codex",pattern:"*gpt-6*",levels:u},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...u,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...u,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:u},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function x(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return b?{major:Number(b[1]),minor:void 0===b[2]?null:Number(b[2])}:null}(a);if(!c)return null;let{major:d,minor:e}=c;return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}(b))return null;let c=(0,n.nl)(a,b);if(!c.reasoning)return null;let d=String(b||"").replace(/\([^()]+\)\s*$/,""),e="codex"===a?(0,p.SM)("cx").find(a=>a.id===d)?.thinkingLevels:null,f=w.find(c=>(!c.provider||c.provider===a)&&(0,o.gH)(c.pattern,b)),g=e||f?.levels||t[c.thinkingFormat]||q;return!1===c.thinkingCanDisable&&(g=g.filter(a=>"none"!==a)),g}var y=c(50377),z=c(29476),A=c(99258),B=c(18753),C=c(49885),D=c.n(C);function E({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:j,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p}){let q=p?`${b}(${p})`:b,r="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base mt-0.5 sm:mt-0",style:r?{color:r}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:q}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(k.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.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,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(q,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:j,className:"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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})]})})}function F({modelId:a,fullModel:b,caps:c,copied:e,onCopy:f,onDeleteAlias:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a}`?"check":"content_copy"})}),(0,d.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:e===`model-${a}`?"Copied!":"Copy"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"progress_activity":"science"})}),(0,d.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:j?"Testing...":"Test"})]})]}),(c?.contextWindow||c?.maxOutput)&&(0,d.jsxs)("p",{className:"mt-1 text-[10px] text-text-muted",children:[c.contextWindow?`${c.contextWindow.toLocaleString()} context`:"",c.contextWindow&&c.maxOutput?" \xb7 ":"",c.maxOutput?`${c.maxOutput.toLocaleString()} max output`:""]})]}),(0,d.jsx)("button",{onClick:g,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function G({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(()=>new Set),[A,C]=(0,e.useState)({}),D=async b=>{if(!y.has(b)){z(a=>new Set(a).add(b));try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();C(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{C(a=>({...a,[b]:"error"}))}finally{z(a=>{let c=new Set(a);return c.delete(b),c})}}},E=(0,B.R)({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),H=async()=>{if(!o.trim()||u)return;let a=o.trim();if(E.some(b=>b.id===a))return void alert("Model already exists for this provider.");v(!0);try{await j(a,{...q?{contextWindow:Number(q)}:{},...s?{maxOutput:Number(s)}:{}}),p(""),r(""),t("")}catch(a){console.log("Error adding model:",a)}finally{v(!1)}},I=async()=>{if(w)return;let a=m.find(a=>!1!==a.isActive);if(a){x(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(E.some(a=>a.id===b)||(await j(b,a.caps),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{x(!1)}}},J=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&H(),placeholder:n?"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,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:H,disabled:!o.trim()||u,children:u?"Adding...":"Add"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:I,disabled:!J||w,children:w?"Importing...":"Import from /models"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"compatible-model-context-window",className:"text-xs text-text-muted mb-1 block",children:"Context window"}),(0,d.jsx)("input",{id:"compatible-model-context-window",type:"number",min:"1",step:"1",value:q,onChange:a=>r(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"compatible-model-max-output",className:"text-xs text-text-muted mb-1 block",children:"Maximum output"}),(0,d.jsx)("input",{id:"compatible-model-max-output",type:"number",min:"1",step:"1",value:s,onChange:a=>t(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),!J&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),E.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:E.map(({id:c,alias:e,source:f,caps:j})=>(0,d.jsx)(F,{modelId:c,fullModel:`${b}/${c}`,caps:j,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>D(c):void 0,testStatus:A[c],isTesting:y.has(c)},`${f}-${a}/${c}`))})]})}E.propTypes={model:D().shape({id:D().string.isRequired}).isRequired,fullModel:D().string.isRequired,alias:D().string,copied:D().string,onCopy:D().func.isRequired,testStatus:D().oneOf(["ok","error"]),isCustom:D().bool,isFree:D().bool,onDeleteAlias:D().func,onTest:D().func,isTesting:D().bool,onDisable:D().func,caps:D().object,thinkingSuffix:D().string},D().string.isRequired,D().string.isRequired,D().string,D().func.isRequired,D().func.isRequired,D().func,D().oneOf(["ok","error"]),D().bool,D().string.isRequired,D().object.isRequired,D().arrayOf(D().object),D().string,D().func.isRequired,D().func.isRequired,D().func.isRequired,D().func.isRequired,G.propTypes={providerStorageAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,modelAliases:D().object.isRequired,customModels:D().arrayOf(D().object),copied:D().string,onCopy:D().func.isRequired,onDeleteAlias:D().func.isRequired,onAddCustomModel:D().func.isRequired,onDeleteCustomModel:D().func.isRequired,connections:D().arrayOf(D().shape({id:D().string,isActive:D().bool})).isRequired,isAnthropic:D().bool};var H=c(74875);function I({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function J({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:j,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=new Map((b||[]).map(a=>[a.id,a])),w=a.providerSpecificData?.proxyPoolId||null,x=w?v.get(w):null,y=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,z=!!w||y,A=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:y?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",B=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",C="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let D=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",E="default";x?.isActive===!0?E="success":(w||y)&&(E="error");let F=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},G=a.authType||(c?"oauth":"apikey"),K="oauth"===G,L="cookie"===G,M=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(K?"OAuth Account":L?"Cookie Account":"API Key"),N=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[O,P]=(0,e.useState)(!1),Q=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,R="unavailable"!==a.testStatus||O?a.testStatus:"active",S=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":K?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:M}),N&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:N}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(k.Ex,{variant:(0,H.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(k.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(k.Ex,{variant:E,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(I,{until:Q}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),S()&&(0,d.jsx)(k.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:S()})]}),z&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),C&&(0,d.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:C}),D&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:D,children:["no_proxy: ",D]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${z?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.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,d.jsx)("button",{onClick:()=>F("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>F(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(k.m_,{text:B,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(k.lM,{size:"sm",checked:a.isActive??!0,onChange:j,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}I.propTypes={until:D().string.isRequired},J.propTypes={connection:D().shape({id:D().string,name:D().string,email:D().string,displayName:D().string,modelLockUntil:D().string,testStatus:D().string,isActive:D().bool,lastError:D().string,priority:D().number,globalPriority:D().number}).isRequired,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string,proxyUrl:D().string,noProxy:D().string,isActive:D().bool})),isOAuth:D().bool.isRequired,isFirst:D().bool.isRequired,isLast:D().bool.isRequired,onMoveUp:D().func.isRequired,onMoveDown:D().func.isRequired,onToggleActive:D().func.isRequired,onUpdateProxy:D().func,onEdit:D().func.isRequired,onDelete:D().func.isRequired,oneByOneStatus:D().shape({state:D().string,error:D().string}),autoPing:D().shape({on:D().bool,onToggle:D().func,provider:D().string})};let K=`name1|sk-key1
|
|
1
|
+
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},24075:(a,b,c)=>{Promise.resolve().then(c.bind(c,24777))},24777:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>$});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(29225),k=c(50412),l=c(92592),m=c(91431),n=c(70552),o=c(18982);c(87592);var p=c(60757);let q=["none","low","medium","high"],r=["none","thinking"],s=["none","low","medium","high","xhigh","max"],t={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":s,"claude-budget":s,"gemini-level":["minimal","low","medium","high"],"gemini-budget":q,zai:r,qwen:q,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:r,hunyuan:q,step:q,nous:q},u=["none","minimal","low","medium","high","xhigh","max"],v=["none","low","medium","high","max"],w=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:v},{pattern:"*claude*4-6*",levels:v},{provider:"codex",pattern:"*gpt-6*",levels:u},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...u,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...u,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:u},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"opencode",pattern:"*mimo*v2.6*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function x(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return b?{major:Number(b[1]),minor:void 0===b[2]?null:Number(b[2])}:null}(a);if(!c)return null;let{major:d,minor:e}=c;return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}(b))return null;let c=(0,n.nl)(a,b);if(!c.reasoning)return null;let d=String(b||"").replace(/\([^()]+\)\s*$/,""),e="codex"===a?(0,p.SM)("cx").find(a=>a.id===d)?.thinkingLevels:null,f=w.find(c=>(!c.provider||c.provider===a)&&(0,o.gH)(c.pattern,b)),g=e||f?.levels||t[c.thinkingFormat]||q;return!1===c.thinkingCanDisable&&(g=g.filter(a=>"none"!==a)),g}var y=c(50377),z=c(29476),A=c(99258),B=c(18753),C=c(49885),D=c.n(C);function E({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:j,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p}){let q=p?`${b}(${p})`:b,r="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base mt-0.5 sm:mt-0",style:r?{color:r}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:q}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(k.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.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,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(q,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:j,className:"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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})]})})}function F({modelId:a,fullModel:b,caps:c,copied:e,onCopy:f,onDeleteAlias:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a}`?"check":"content_copy"})}),(0,d.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:e===`model-${a}`?"Copied!":"Copy"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"progress_activity":"science"})}),(0,d.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:j?"Testing...":"Test"})]})]}),(c?.contextWindow||c?.maxOutput)&&(0,d.jsxs)("p",{className:"mt-1 text-[10px] text-text-muted",children:[c.contextWindow?`${c.contextWindow.toLocaleString()} context`:"",c.contextWindow&&c.maxOutput?" \xb7 ":"",c.maxOutput?`${c.maxOutput.toLocaleString()} max output`:""]})]}),(0,d.jsx)("button",{onClick:g,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function G({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(()=>new Set),[A,C]=(0,e.useState)({}),D=async b=>{if(!y.has(b)){z(a=>new Set(a).add(b));try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();C(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{C(a=>({...a,[b]:"error"}))}finally{z(a=>{let c=new Set(a);return c.delete(b),c})}}},E=(0,B.R)({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),H=async()=>{if(!o.trim()||u)return;let a=o.trim();if(E.some(b=>b.id===a))return void alert("Model already exists for this provider.");v(!0);try{await j(a,{...q?{contextWindow:Number(q)}:{},...s?{maxOutput:Number(s)}:{}}),p(""),r(""),t("")}catch(a){console.log("Error adding model:",a)}finally{v(!1)}},I=async()=>{if(w)return;let a=m.find(a=>!1!==a.isActive);if(a){x(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(E.some(a=>a.id===b)||(await j(b,a.caps),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{x(!1)}}},J=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&H(),placeholder:n?"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,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:H,disabled:!o.trim()||u,children:u?"Adding...":"Add"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:I,disabled:!J||w,children:w?"Importing...":"Import from /models"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"compatible-model-context-window",className:"text-xs text-text-muted mb-1 block",children:"Context window"}),(0,d.jsx)("input",{id:"compatible-model-context-window",type:"number",min:"1",step:"1",value:q,onChange:a=>r(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"compatible-model-max-output",className:"text-xs text-text-muted mb-1 block",children:"Maximum output"}),(0,d.jsx)("input",{id:"compatible-model-max-output",type:"number",min:"1",step:"1",value:s,onChange:a=>t(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),!J&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),E.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:E.map(({id:c,alias:e,source:f,caps:j})=>(0,d.jsx)(F,{modelId:c,fullModel:`${b}/${c}`,caps:j,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>D(c):void 0,testStatus:A[c],isTesting:y.has(c)},`${f}-${a}/${c}`))})]})}E.propTypes={model:D().shape({id:D().string.isRequired}).isRequired,fullModel:D().string.isRequired,alias:D().string,copied:D().string,onCopy:D().func.isRequired,testStatus:D().oneOf(["ok","error"]),isCustom:D().bool,isFree:D().bool,onDeleteAlias:D().func,onTest:D().func,isTesting:D().bool,onDisable:D().func,caps:D().object,thinkingSuffix:D().string},D().string.isRequired,D().string.isRequired,D().string,D().func.isRequired,D().func.isRequired,D().func,D().oneOf(["ok","error"]),D().bool,D().string.isRequired,D().object.isRequired,D().arrayOf(D().object),D().string,D().func.isRequired,D().func.isRequired,D().func.isRequired,D().func.isRequired,G.propTypes={providerStorageAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,modelAliases:D().object.isRequired,customModels:D().arrayOf(D().object),copied:D().string,onCopy:D().func.isRequired,onDeleteAlias:D().func.isRequired,onAddCustomModel:D().func.isRequired,onDeleteCustomModel:D().func.isRequired,connections:D().arrayOf(D().shape({id:D().string,isActive:D().bool})).isRequired,isAnthropic:D().bool};var H=c(74429),I=c(74875);function J({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function K({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:j,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=(0,e.useRef)(null),[w,x]=(0,e.useState)(null),y=new Map((b||[]).map(a=>[a.id,a])),z=a.providerSpecificData?.proxyPoolId||null,A=z?y.get(z):null,B=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,C=!!z||B,D=A?`Pool: ${A.name}`:z?`Pool: ${z} (inactive/missing)`:B?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",E=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",F="";if(A?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=A?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);F=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{F=b}}let G=A?.noProxy||a.providerSpecificData?.connectionNoProxy||"",L="default";A?.isActive===!0?L="success":(z||B)&&(L="error");let M=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},N=a.authType||(c?"oauth":"apikey"),O="oauth"===N,P="cookie"===N,Q=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(O?"OAuth Account":P?"Cookie Account":"API Key"),R=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[S,T]=(0,e.useState)(!1),U=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,V="unavailable"!==a.testStatus||S?a.testStatus:"active",W=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:P?"cookie":O?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:Q}),R&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:R}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(k.Ex,{variant:(0,I.g)(a.isActive,V),size:"sm",dot:!0,children:!1===a.isActive?"disabled":V||"Unknown"}),(0,d.jsx)(k.Ex,{variant:"default",size:"sm",children:O?"OAuth":P?"Cookie":"API Key"}),C&&(0,d.jsx)(k.Ex,{variant:L,size:"sm",children:"Proxy"}),S&&!1!==a.isActive&&(0,d.jsx)(J,{until:U}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),W()&&(0,d.jsx)(k.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:W()})]}),C&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:D,children:D}),F&&(0,d.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:F}),G&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:G,children:["no_proxy: ",G]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{ref:v,onClick:()=>{if(q)return void r(!1);let a=v.current?.getBoundingClientRect();if(!a)return void r(!0);let c=((b?.length||0)+1)*34+8,d=window.innerHeight-a.bottom,e=d<c&&a.top>d;x({position:"fixed",right:window.innerWidth-a.right,...e?{bottom:window.innerHeight-a.top+4,maxHeight:Math.max(a.top-8,120)}:{top:a.bottom+4,maxHeight:Math.max(d-8,120)}}),r(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,H.createPortal)((0,d.jsxs)("div",{ref:u,style:w,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,d.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!z?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>M(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${z===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]}),document.body)]}),p&&(0,d.jsx)(k.m_,{text:E,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(k.lM,{size:"sm",checked:a.isActive??!0,onChange:j,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}J.propTypes={until:D().string.isRequired},K.propTypes={connection:D().shape({id:D().string,name:D().string,email:D().string,displayName:D().string,modelLockUntil:D().string,testStatus:D().string,isActive:D().bool,lastError:D().string,priority:D().number,globalPriority:D().number}).isRequired,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string,proxyUrl:D().string,noProxy:D().string,isActive:D().bool})),isOAuth:D().bool.isRequired,isFirst:D().bool.isRequired,isLast:D().bool.isRequired,onMoveUp:D().func.isRequired,onMoveDown:D().func.isRequired,onToggleActive:D().func.isRequired,onUpdateProxy:D().func,onEdit:D().func.isRequired,onDelete:D().func.isRequired,oneByOneStatus:D().shape({state:D().string,error:D().string}),autoPing:D().shape({on:D().bool,onToggle:D().func,provider:D().string})};let L=`name1|sk-key1
|
|
2
2
|
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function
|
|
3
|
+
sk-key-only-auto-named`;function M({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:j,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"qoder"===b||"qoder-cn"===b?"Personal Access Token (PAT)":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=l.Q2?.[b]?.credentialForm==="aws",A=l.Q2?.[b]?.apiKeyOptionalWith||null,B=l.Q2?.[b]?.regions||null,C=l.Q2?.[b]?.defaultRegion||B?.[0]?.id||"",[D,E]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[F,G]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[H,I]=(0,e.useState)({accountId:""}),[J,K]=(0,e.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[N,O]=(0,e.useState)(C),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)(!1),V=y?`name1|sk-key1|acc123456
|
|
4
4
|
name2|sk-key2|def789012
|
|
5
5
|
sk-key-only-auto-named`:"qoder"===b||"qoder-cn"===b?`name1|pt-xxxxx
|
|
6
6
|
name2|pt-yyyyy
|
|
7
|
-
pt-only-auto-named`:K,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),aa=()=>{if(t&&D.ollamaHostUrl.trim())return{baseUrl:D.ollamaHostUrl.trim()};if(x)return{azureEndpoint:F.azureEndpoint,apiVersion:F.apiVersion,deployment:F.deployment,organization:F.organization};if(y)return{accountId:H.accountId};if(z){let a={};return J.profile.trim()&&(a.profile=J.profile.trim()),J.region.trim()&&(a.region=J.region.trim()),J.accessKeyId.trim()&&(a.accessKeyId=J.accessKeyId.trim()),J.sessionToken.trim()&&(a.sessionToken=J.sessionToken.trim()),Object.keys(a).length?a:void 0}if(B&&N)return{region:N}},ab=()=>{let a=aa();return!!(A&&a?.[A])||(z?!!D.apiKey&&!!a?.accessKeyId:!!D.apiKey)},ac=async()=>{Q(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:D.apiKey,providerSpecificData:aa()})}),c=await a.json();S(c.valid?"success":"failed")}catch{S("failed")}finally{Q(!1)}},ad=async()=>{if(b&&(t||ab())&&(t||D.name)&&(!f||D.defaultModel.trim())){U(!0);try{let a=!1;try{Q(!0),S(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:D.apiKey,providerSpecificData:aa()})});a=!!(await c.json()).valid,S(a?"success":"failed")}catch{S("failed")}finally{Q(!1)}await p({name:D.name||(t?"Ollama Local":""),apiKey:D.apiKey,defaultModel:f?D.defaultModel.trim():void 0,priority:D.priority,proxyPoolId:D.proxyPoolId===s?null:D.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:aa()})}finally{U(!1)}}},ae=async()=>{let a=Y.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;U(!0),_(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}U(!1),_({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!z&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{X("single"),_(null)},children:"Single"}),(0,d.jsx)(k.$n,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{X("bulk"),_(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b||"qoder-cn"===b?(0,d.jsxs)(d.Fragment,{children:["One PAT per line. Format: ",(0,d.jsx)("code",{children:"name|pt-..."})," or just ",(0,d.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.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:V,value:Y,onChange:a=>Z(a.target.value)}),$&&(0,d.jsxs)("div",{className:`text-sm font-medium ${$.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",$.success," added",$.failed>0?`, ✗ ${$.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ae,fullWidth:!0,disabled:T||!Y.trim(),children:T?"Adding...":"Add All Keys"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.pd,{label:"Name",value:D.name,onChange:a=>E({...D,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"Ollama Host URL",value:D.ollamaHostUrl,onChange:a=>E({...D,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ac,disabled:P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:w,type:u?"text":"password",value:D.apiKey,onChange:a=>E({...D,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"qoder"===b||"qoder-cn"===b?"pt-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ac,disabled:!ab()||P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),v&&(0,d.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."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,j&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",j.replace(/^https?:\/\//,"")]})]})]}),B&&(0,d.jsx)(k.l6,{label:"Region",value:N,onChange:a=>O(a.target.value),options:B.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(k.pd,{label:"Default Model",value:D.defaultModel,onChange:a=>E({...D,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),R&&(0,d.jsx)(k.Ex,{variant:"success"===R?"success":"error",children:"success"===R?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.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."}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(k.pd,{label:"Account ID",value:H.accountId,onChange:a=>I({...H,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),z&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"AWS Profile (SSO — recommended)",value:J.profile,onChange:a=>M({...J,profile:a.target.value}),placeholder:"my-sso-profile"}),(0,d.jsx)(k.pd,{label:"Region",value:J.region,onChange:a=>M({...J,region:a.target.value}),placeholder:"us-east-1"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,d.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,d.jsxs)("code",{children:["aws sso login --profile ",J.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,d.jsx)(k.pd,{label:"Access Key ID (only for static keys)",value:J.accessKeyId,onChange:a=>M({...J,accessKeyId:a.target.value}),placeholder:"AKIA..."}),(0,d.jsx)(k.pd,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:J.sessionToken,onChange:a=>M({...J,sessionToken:a.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,d.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"Azure Endpoint",value:F.azureEndpoint,onChange:a=>G({...F,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(k.pd,{label:"Deployment Name",value:F.deployment,onChange:a=>G({...F,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(k.pd,{label:"API Version",value:F.apiVersion,onChange:a=>G({...F,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(k.pd,{label:"Organization",value:F.organization,onChange:a=>G({...F,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(k.pd,{label:"Priority",type:"number",value:D.priority,onChange:a=>E({...D,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(k.l6,{label:"Proxy Pool",value:D.proxyPoolId,onChange:a=>E({...D,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ad,fullWidth:!0,disabled:T||!t&&(!D.name||!ab())||f&&!D.defaultModel.trim()||x&&(!F.azureEndpoint||!F.deployment||!F.organization)||y&&!H.accountId,children:T?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function M({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[j,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(k.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(k.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(k.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(k.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(k.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(k.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||j,children:j?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}L.propTypes={isOpen:D().bool.isRequired,provider:D().string,providerName:D().string,isCompatible:D().bool,isAnthropic:D().bool,authType:D().string,authHint:D().string,website:D().string,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string})),error:D().string,existingNames:D().arrayOf(D().string),onSave:D().func.isRequired,onBulkDone:D().func,onClose:D().func.isRequired},M.propTypes={isOpen:D().bool.isRequired,node:D().shape({id:D().string,name:D().string,prefix:D().string,apiType:D().string,baseUrl:D().string}),onSave:D().func.isRequired,onClose:D().func.isRequired,isAnthropic:D().bool};let N=()=>Object.fromEntries(Object.keys(m.bs).map(a=>[a,!1]));function O({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[j,l]=(0,e.useState)(N),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(""),z=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},A=async()=>{let a=z(h.trim());if(a){s("testing"),u("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();s(d.ok?"ok":"error"),u(d.error||"")}catch(a){s("error"),u(a.message)}}},B=async()=>{let a=z(h.trim());if(a&&!v){w(!0);try{let b={...j,...n?{contextWindow:Number(n)}:{},...p?{maxOutput:Number(p)}:{}};await f(a,b,j.stt?x:null)}finally{w(!1)}}};return(0,d.jsx)(k.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),s(null),u("")},onKeyDown:a=>{"Enter"===a.key&&A()},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,d.jsx)(k.$n,{variant:"secondary",icon:"science",loading:"testing"===r,onClick:A,disabled:!h.trim()||"testing"===r,children:"testing"===r?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:z(h.trim())||"model-id"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(m.bs).map(([a,b])=>(0,d.jsx)(k.lM,{checked:!!j[a],onChange:b=>l(c=>({...c,[a]:b})),label:b.label,description:b.desc,size:"sm"},a))})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Context window"}),(0,d.jsx)("input",{type:"number",min:"1",step:"1",value:n,onChange:a=>o(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Maximum output"}),(0,d.jsx)("input",{type:"number",min:"1",step:"1",value:p,onChange:a=>q(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(k.lM,{checked:!!j.stt,onChange:a=>{l(b=>({...b,stt:a})),a||y("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),j.stt&&(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)(k.l6,{label:"Transport",value:x,onChange:a=>y(a.target.value),placeholder:"Provider default (REST)",options:m.vp.map(a=>({value:a,label:m.qw[a].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===r&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===r&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:t||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(k.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(k.$n,{onClick:B,fullWidth:!0,size:"sm",disabled:!h.trim()||v,children:v?"Adding...":"Add Model"})]})]})})}O.propTypes={isOpen:D().bool.isRequired,providerAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,onSave:D().func.isRequired,onClose:D().func.isRequired};let P=`[
|
|
7
|
+
pt-only-auto-named`:L,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),aa=()=>{if(t&&D.ollamaHostUrl.trim())return{baseUrl:D.ollamaHostUrl.trim()};if(x)return{azureEndpoint:F.azureEndpoint,apiVersion:F.apiVersion,deployment:F.deployment,organization:F.organization};if(y)return{accountId:H.accountId};if(z){let a={};return J.profile.trim()&&(a.profile=J.profile.trim()),J.region.trim()&&(a.region=J.region.trim()),J.accessKeyId.trim()&&(a.accessKeyId=J.accessKeyId.trim()),J.sessionToken.trim()&&(a.sessionToken=J.sessionToken.trim()),Object.keys(a).length?a:void 0}if(B&&N)return{region:N}},ab=()=>{let a=aa();return!!(A&&a?.[A])||(z?!!D.apiKey&&!!a?.accessKeyId:!!D.apiKey)},ac=async()=>{Q(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:D.apiKey,providerSpecificData:aa()})}),c=await a.json();S(c.valid?"success":"failed")}catch{S("failed")}finally{Q(!1)}},ad=async()=>{if(b&&(t||ab())&&(t||D.name)&&(!f||D.defaultModel.trim())){U(!0);try{let a=!1;try{Q(!0),S(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:D.apiKey,providerSpecificData:aa()})});a=!!(await c.json()).valid,S(a?"success":"failed")}catch{S("failed")}finally{Q(!1)}await p({name:D.name||(t?"Ollama Local":""),apiKey:D.apiKey,defaultModel:f?D.defaultModel.trim():void 0,priority:D.priority,proxyPoolId:D.proxyPoolId===s?null:D.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:aa()})}finally{U(!1)}}},ae=async()=>{let a=Y.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;U(!0),_(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}U(!1),_({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!z&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{X("single"),_(null)},children:"Single"}),(0,d.jsx)(k.$n,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{X("bulk"),_(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b||"qoder-cn"===b?(0,d.jsxs)(d.Fragment,{children:["One PAT per line. Format: ",(0,d.jsx)("code",{children:"name|pt-..."})," or just ",(0,d.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.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:V,value:Y,onChange:a=>Z(a.target.value)}),$&&(0,d.jsxs)("div",{className:`text-sm font-medium ${$.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",$.success," added",$.failed>0?`, ✗ ${$.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ae,fullWidth:!0,disabled:T||!Y.trim(),children:T?"Adding...":"Add All Keys"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.pd,{label:"Name",value:D.name,onChange:a=>E({...D,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"Ollama Host URL",value:D.ollamaHostUrl,onChange:a=>E({...D,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ac,disabled:P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:w,type:u?"text":"password",value:D.apiKey,onChange:a=>E({...D,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"qoder"===b||"qoder-cn"===b?"pt-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ac,disabled:!ab()||P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),v&&(0,d.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."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,j&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",j.replace(/^https?:\/\//,"")]})]})]}),B&&(0,d.jsx)(k.l6,{label:"Region",value:N,onChange:a=>O(a.target.value),options:B.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(k.pd,{label:"Default Model",value:D.defaultModel,onChange:a=>E({...D,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),R&&(0,d.jsx)(k.Ex,{variant:"success"===R?"success":"error",children:"success"===R?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.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."}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(k.pd,{label:"Account ID",value:H.accountId,onChange:a=>I({...H,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),z&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"AWS Profile (SSO — recommended)",value:J.profile,onChange:a=>K({...J,profile:a.target.value}),placeholder:"my-sso-profile"}),(0,d.jsx)(k.pd,{label:"Region",value:J.region,onChange:a=>K({...J,region:a.target.value}),placeholder:"us-east-1"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,d.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,d.jsxs)("code",{children:["aws sso login --profile ",J.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,d.jsx)(k.pd,{label:"Access Key ID (only for static keys)",value:J.accessKeyId,onChange:a=>K({...J,accessKeyId:a.target.value}),placeholder:"AKIA..."}),(0,d.jsx)(k.pd,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:J.sessionToken,onChange:a=>K({...J,sessionToken:a.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,d.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"Azure Endpoint",value:F.azureEndpoint,onChange:a=>G({...F,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(k.pd,{label:"Deployment Name",value:F.deployment,onChange:a=>G({...F,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(k.pd,{label:"API Version",value:F.apiVersion,onChange:a=>G({...F,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(k.pd,{label:"Organization",value:F.organization,onChange:a=>G({...F,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(k.pd,{label:"Priority",type:"number",value:D.priority,onChange:a=>E({...D,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(k.l6,{label:"Proxy Pool",value:D.proxyPoolId,onChange:a=>E({...D,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ad,fullWidth:!0,disabled:T||!t&&(!D.name||!ab())||f&&!D.defaultModel.trim()||x&&(!F.azureEndpoint||!F.deployment||!F.organization)||y&&!H.accountId,children:T?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function N({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[j,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(k.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(k.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(k.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(k.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(k.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(k.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||j,children:j?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}M.propTypes={isOpen:D().bool.isRequired,provider:D().string,providerName:D().string,isCompatible:D().bool,isAnthropic:D().bool,authType:D().string,authHint:D().string,website:D().string,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string})),error:D().string,existingNames:D().arrayOf(D().string),onSave:D().func.isRequired,onBulkDone:D().func,onClose:D().func.isRequired},N.propTypes={isOpen:D().bool.isRequired,node:D().shape({id:D().string,name:D().string,prefix:D().string,apiType:D().string,baseUrl:D().string}),onSave:D().func.isRequired,onClose:D().func.isRequired,isAnthropic:D().bool};let O=()=>Object.fromEntries(Object.keys(m.bs).map(a=>[a,!1]));function P({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[j,l]=(0,e.useState)(O),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(""),z=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},A=async()=>{let a=z(h.trim());if(a){s("testing"),u("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();s(d.ok?"ok":"error"),u(d.error||"")}catch(a){s("error"),u(a.message)}}},B=async()=>{let a=z(h.trim());if(a&&!v){w(!0);try{let b={...j,...n?{contextWindow:Number(n)}:{},...p?{maxOutput:Number(p)}:{}};await f(a,b,j.stt?x:null)}finally{w(!1)}}};return(0,d.jsx)(k.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),s(null),u("")},onKeyDown:a=>{"Enter"===a.key&&A()},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,d.jsx)(k.$n,{variant:"secondary",icon:"science",loading:"testing"===r,onClick:A,disabled:!h.trim()||"testing"===r,children:"testing"===r?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:z(h.trim())||"model-id"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(m.bs).map(([a,b])=>(0,d.jsx)(k.lM,{checked:!!j[a],onChange:b=>l(c=>({...c,[a]:b})),label:b.label,description:b.desc,size:"sm"},a))})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Context window"}),(0,d.jsx)("input",{type:"number",min:"1",step:"1",value:n,onChange:a=>o(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Maximum output"}),(0,d.jsx)("input",{type:"number",min:"1",step:"1",value:p,onChange:a=>q(a.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(k.lM,{checked:!!j.stt,onChange:a=>{l(b=>({...b,stt:a})),a||y("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),j.stt&&(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)(k.l6,{label:"Transport",value:x,onChange:a=>y(a.target.value),placeholder:"Provider default (REST)",options:m.vp.map(a=>({value:a,label:m.qw[a].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===r&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===r&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:t||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(k.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(k.$n,{onClick:B,fullWidth:!0,size:"sm",disabled:!h.trim()||v,children:v?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:D().bool.isRequired,providerAlias:D().string.isRequired,providerDisplayAlias:D().string.isRequired,onSave:D().func.isRequired,onClose:D().func.isRequired};let Q=`[
|
|
8
8
|
{
|
|
9
9
|
"accessToken": "eyJhbGc...",
|
|
10
10
|
"refreshToken": "rt_...",
|
|
11
11
|
"idToken": "eyJhbGc...",
|
|
12
12
|
"email": "user@example.com"
|
|
13
13
|
}
|
|
14
|
-
]`;function
|
|
14
|
+
]`;function R({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[j,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,A.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,A.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,A.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(k.aF,{isOpen:a,title:(0,A.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,A.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Q,value:f,onChange:a=>g(a.target.value),disabled:h}),j&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:j}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,A.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,A.Tl)("failed")}`:""]}),q.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:q.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,A.Tl)("Importing..."):(0,A.Tl)("Import All")}),(0,d.jsx)(k.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,A.Tl)("Close")})]})]})})}R.propTypes={isOpen:D().bool.isRequired,onClose:D().func.isRequired,onSuccess:D().func};let S=`[
|
|
15
15
|
{
|
|
16
16
|
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
17
17
|
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
@@ -24,4 +24,4 @@ pt-only-auto-named`:K,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$
|
|
|
24
24
|
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
25
|
"email": "account2@example.com"
|
|
26
26
|
}
|
|
27
|
-
]`;function S(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function T({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[j,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=(0,e.useRef)(null),t=()=>{h||(g(""),l(""),n(null),r(null),p(!1),b())},u=async a=>{if(!a||0===a.length)return;l("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void l((0,A.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=S(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void l((0,A.Tl)("No accounts found in selected files"));g(JSON.stringify(a,null,2)),r({filesCount:b.length,accountsCount:a.length})}catch(a){l(`${(0,A.Tl)("Error reading files")}: ${a.message}`)}},v=async()=>{let a;l(""),n(null);try{a=S(f)}catch(a){l(`${(0,A.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void l((0,A.Tl)("No accounts found in input"));i(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void l(d?.error||`Request failed: ${b.status}`);n(d),d.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,A.Tl)("Request failed"))}finally{i(!1)}},w=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(k.aF,{isOpen:a,title:(0,A.Tl)("Bulk Add Grok CLI Accounts"),onClose:t,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,A.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:s,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{u(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(k.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>s.current?.click(),disabled:h,children:(0,A.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),p(!0)},onDragLeave:a=>{a.preventDefault(),p(!1)},onDrop:a=>{a.preventDefault(),p(!1),a.dataTransfer?.files?.length>0&&u(a.dataTransfer.files)},className:`relative rounded border transition-colors ${o?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:R,value:f,onChange:a=>{g(a.target.value),r(null)},disabled:h}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,A.Tl)("Drop .json files here")})]})]}),q&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,A.Tl)("Loaded")," ",q.accountsCount," ",(0,A.Tl)("account(s) from")," ",q.filesCount," ",(0,A.Tl)("file(s)")]})]}),j&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:j}),m&&m.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,A.Tl)("failed")]}),w.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:v,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,A.Tl)("Importing..."):(0,A.Tl)("Import All")}),(0,d.jsx)(k.$n,{onClick:t,variant:"ghost",fullWidth:!0,disabled:h,children:(0,A.Tl)("Close")})]})]})})}var U=c(41371);let V=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],W=/^[A-Za-z0-9-]+$/;function X({providerId:a}){let b=(0,U.i)(),[c,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)([{name:"",value:""}]),[i,j]=(0,e.useState)({}),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),p=(a,b,c)=>{h(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},q=(0,e.useCallback)(async()=>{let c={};for(let a of g.filter(a=>a.name.trim())){let d=a.name.trim();if(!W.test(d))return void b.error(`Invalid header name: ${d}`);if(V.includes(d.toLowerCase()))return void b.error(`Header ${d} cannot be overridden`);if(d in c)return void b.error(`Duplicate header name: ${d}`);a.value!==i[d]&&(c[d]=a.value)}o(!0);try{let d=await fetch(`/api/providers/${a}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:c})});if(!d.ok){let a=await d.json().catch(()=>({}));b.error(a.error||"Failed to save");return}m(Object.keys(c).length>0),b.success("Custom headers saved")}finally{o(!1)}},[g,i,a,b]);return 0!==Object.keys(i).length||l?(0,d.jsxs)(k.Zp,{padding:"xs",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>f(a=>!a),className:"flex w-full items-center justify-between text-left",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),l&&(0,d.jsx)(k.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:c?"expand_less":"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:g.map((a,b)=>{let c=a.name.trim()in i&&a.value!==i[a.name.trim()];return(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{value:a.name,onChange:a=>p(b,"name",a.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,d.jsx)("input",{value:a.value,onChange:a=>p(b,"value",a.target.value),placeholder:"Value",spellCheck:!1,title:c?"Overridden":a.name.trim()in i?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${c?"border-amber-400/60":"border-border"}`}),(0,d.jsx)("button",{type:"button",title:"Remove header",onClick:()=>h(a=>a.length>1?a.filter((a,c)=>c!==b):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},b)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>h(a=>[...a,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{type:"button",disabled:n,onClick:()=>{h(Object.entries(i).map(([a,b])=>({name:a,value:b})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,d.jsx)("button",{type:"button",disabled:n,onClick:q,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:n?"Saving...":"Save"})]})]})]})]}):null}X.propTypes={providerId:D().string.isRequired};let Y={claude:"claudeAutoPing",codex:"codexAutoPing"};function Z(){let a,b,c=(0,f.useParams)(),g=(0,f.useRouter)(),n=c.id,{getCaps:o}=(0,z.yU)(),[p,q]=(0,e.useState)([]),[r,s]=(0,e.useState)(!0),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[F,H]=(0,e.useState)(!1),[I,K]=(0,e.useState)(!1),[N,P]=(0,e.useState)(""),[R,S]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)([]),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)({}),[am,an]=(0,e.useState)(""),[ao,ap]=(0,e.useState)(()=>new Set),[aq,ar]=(0,e.useState)(!1),[as,at]=(0,e.useState)([]),[au,av]=(0,e.useState)("__none__"),[aw,ax]=(0,e.useState)(!1),[ay,az]=(0,e.useState)(null),[aA,aB]=(0,e.useState)(""),[aC,aD]=(0,e.useState)("auto"),[aE,aF]=(0,e.useState)({enabled:!1,connections:{}}),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)([]),[aK,aL]=(0,e.useState)(null),[aM,aN]=(0,e.useState)([]),[aO,aP]=(0,e.useState)([]),[aQ,aR]=(0,e.useState)(null),[aS,aT]=(0,e.useState)(!1),[aU,aV]=(0,e.useState)(!1),[aW,aX]=(0,e.useState)(!1),[aY,aZ]=(0,e.useState)(null),[a$,a_]=(0,e.useState)({}),[a0,a1]=(0,e.useState)(null),a2=(0,e.useRef)(!1),[a3,a4]=(0,e.useState)(!1),[a5,a6]=(0,e.useState)(!1),[a7,a8]=(0,e.useState)(!1),{copied:a9,copy:ba}=(0,y.C)(),bb=()=>{D(!0)},bc=()=>{bh?bb():(P(""),K(!0))},bd=()=>{P(""),K(!0)},be=()=>{bh?bc():bd()},bf=t?{id:t.id,name:t.name||("anthropic-compatible"===t.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===t.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===t.type?"AC":"OC",apiType:t.apiType,baseUrl:t.baseUrl,type:t.type}:l.zN[n]||l.fg[n]||l.IS[n]||l.nJ[n]||l.br[n],bg=bf?.authModes||[],bh=!!l.zN[n]||!!l.IS[n]||bg.includes("oauth"),bi=!!l.fg[n]||bg.includes("apikey"),bj=!!l.IS[n]?.noAuth,bk=(0,m.KC)(n),bl=("cursor"===n||"zed"===n)&&aI.length>0?aI:bk,bm=(0,l.wG)(n),bn=(0,l.mq)(n),bo=(0,l.gb)(n),bp=bn||bo,bq=!bp&&bh&&bi,br="xai"===n?"Grok Build OAuth":"grok-cli"===n?"Grok CLI Device Login":"kimi"===n?"Kimi Coding OAuth":"OAuth",bs="xai"===n?"xAI API Key":"kimi"===n?"Kimi API Key":"qoder"===n||"qoder-cn"===n?"PAT":"API Key",bt=a=>{if(!aC||"auto"===aC)return null;let b=x(n,a);return b&&b.includes(aC)?aC:null},bu=bp?n:bm,bv=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=x(n,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bl)c(a.id);for(let a of aM)c(a.id);for(let a of ag)a.providerAlias===bu&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bw=bp?t?.prefix||n:bm,bx=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}`,{cache:"no-store"}),b=await a.json();a.ok&&aP(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bu]),by=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bu,ids:[a]})})).ok&&await bx()}catch(a){console.log("Error disabling model:",a)}},bz=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bx()}catch(a){console.log("Error enabling model:",a)}},bA=async a=>{a.length&&aR({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aR(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bu,ids:a})})).ok&&await bx()}catch(a){console.log("Error disabling all models:",a)}}})},bB=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}`,{method:"DELETE"})).ok&&await bx()}catch(a){console.log("Error enabling all models:",a)}},bC=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&af(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bD=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ah(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bE=(0,e.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===n);q(a)}c.ok&&w(g.proxyPools||[]);let i=(h.providerStrategies||{})[n]||{};az(i.fallbackStrategy||null),aB(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1");let j=(h.providerThinking||{})[n]||{};aD(j.mode||"auto");let k=Y[n],l=k&&h[k]||{};if(aF({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===n)||null;if(!a&&bp)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===n)||null))break}u(a)}}catch(a){console.log("Error fetching connections:",a)}finally{s(!1)}},[n,bp]),bF=async a=>{try{let b=await fetch(`/api/provider-nodes/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(u(c.node),await bE(),_(!1))}catch(a){console.log("Error updating provider node:",a)}},bG=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[n]:f[n]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bH=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[n]={mode:a}:delete c[n],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bI=async a=>{let b=Y[n];if(b){aF(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bJ=async(a,b,c=bm)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bC();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bK=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bC()}catch(a){console.log("Error deleting alias:",a)}},bL=async(a,b="llm",c=bu,d,e)=>{try{let f=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b,...d?{caps:d}:{},...e?{transport:e}:{}})});if(f.ok)await bD();else{let a=await f.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bM=async(a,b="llm",c=bu)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bD()}catch(a){console.log("Error deleting custom model:",a)}},bN=async()=>{if(!a5&&0!==aG.length){a6(!0);try{let a=new Set(bl.map(a=>a.id)),b=new Set(ag.filter(a=>a.providerAlias===bu&&"llm"===(a.kind||a.type||"llm")).map(a=>a.id)),c=new Set(Object.values(ae).filter(a=>"string"==typeof a)),d=0;for(let e of aG){let f=e.id||e.name||e.model;!(!f||a.has(f)||b.has(f))&&(c.has(`${bu}/${f}`)||(await bL(f,"llm",bu,e.caps),b.add(f),d+=1))}alert(d>0?`${(0,A.Tl)("Successfully added")} ${d} ${(0,A.Tl)("models")}`:(0,A.Tl)("All models already exist, no new models added"))}catch(a){console.log("Error importing provider models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a6(!1)}}},bO=async()=>{if(a3)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,A.Tl)("Please add an active Qoder connection first"));a4(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,A.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,A.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^(qoder-cn|qoder)\//,"");ag.some(a=>a.providerAlias===bu&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(ae).includes(`${bu}/${c}`)||(await bL(c,"llm",bu,a.caps),e+=1)}0===e?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${e} `+(0,A.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a4(!1)}},bP=async()=>{if(a7)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,A.Tl)("Please add an active Cline connection first"));a8(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,A.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,A.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;b&&(ag.some(a=>a.providerAlias===bu&&a.id===b&&"llm"===(a.kind||a.type||"llm"))||Object.values(ae).includes(`${bu}/${b}`)||(await bL(b,"llm",bu),e+=1))}0===e?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${e} `+(0,A.Tl)("models"))}catch(a){console.log("Error importing Cline models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a8(!1)}},bQ=async()=>{if(aU||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));a2.current=!1,aV(!0),aX(!1),aZ(null),a_(a),a1({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(a2.current){a1({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aZ(d.id),a_(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,a_(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a_(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a1({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aZ(null),aV(!1),aX(!1),a2.current=!1}},bR=async a=>{aR({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aR(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&q(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bS=()=>{bE(),D(!1)},bT=async a=>{P("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bE(),K(!1);return}P(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),P("Failed to save connection")}},bU=async a=>{try{(await fetch(`/api/providers/${ac.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bE(),Z(!1))}catch(a){console.log("Error updating connection:",a)}},bV=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&q(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bW=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],q(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bE()}},bX=p.filter(a=>as.includes(a.id)),bY=p.length>0&&as.length===p.length;(()=>{if(0===bX.length)return;let a=new Set(bX.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=v.find(a=>a.id===b);return c?.name}})();let bZ=()=>{aw||ab(!1)},b$=async(a,{mode:b}={})=>{ax(!0);try{let c=await fetch("/api/providers/bulk-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,mode:b||"single",proxyPoolId:a[0]?.proxyPoolId??null,connectionIds:a.map(a=>a.connectionId)})});if(c.ok){let a=await c.json().catch(()=>({}));Array.isArray(a.missing)&&a.missing.length>0&&alert(`Applied to ${a.updated} connection(s); ${a.missing.length} no longer exist.`)}else if(404===c.status||405===c.status)await b_(a);else{let a=await c.json().catch(()=>({}));alert(a.error||"Failed to apply proxy.")}await bE(),ab(!1)}finally{ax(!1)}},b_=async a=>{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`)},b0=a=>b$(p.map(b=>({connectionId:b.id,proxyPoolId:a})),{mode:"single"}),b1=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:p.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,as.includes(c)),onChange:()=>{var b;return b=a.id,void at(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(J,{connection:a,proxyPools:v,isOAuth:bh,isFirst:0===b,isLast:b===p.length-1,onMoveUp:()=>bW(b,b-1),onMoveDown:()=>bW(b,b+1),onToggleActive:b=>bV(a.id,b),autoPing:Y[n]&&"oauth"===a.authType?{on:!0===aE.connections[a.id],onToggle:b=>{var c;return c=a.id,void bI({...aE,connections:{...aE.connections,[c]:b}})},provider:n}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&q(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ad(a),Z(!0)},onDelete:()=>bR(a.id),oneByOneStatus:a$[a.id]||null})})]},a.id)})}),b2=v.filter(a=>!0===a.isActive),b3=(0,d.jsx)(k.aF,{isOpen:aa,onClose:bZ,title:`Apply Proxy (${p.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=v.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):b$(p.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})),{mode:"one-to-one"})},disabled:aw||0===b2.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>b0(null),disabled:aw,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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),v.map(a=>(0,d.jsxs)("button",{onClick:()=>b0(a.id),disabled:aw||!0!==a.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aw&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(k.$n,{onClick:bZ,variant:"ghost",fullWidth:!0,disabled:aw,children:"Cancel"})]})}),b4=async a=>{if(!ao.has(a)){ap(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bu}/${a}`})}),c=await b.json();al(b=>({...b,[a]:c.ok?"ok":"error"})),an(c.ok?"":c.error||"Model not reachable")}catch{al(b=>({...b,[a]:"error"})),an("Network error")}finally{ap(b=>{let c=new Set(b);return c.delete(a),c})}}};if(r)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(k.Qv,{}),(0,d.jsx)(k.Qv,{})]});if(!bf)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let b5=()=>bn&&bf.apiType?"responses"===bf.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bo?"/providers/anthropic-m.png":(0,j.HY)(bf.id);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bf.color}15`},children:ai||!b5()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bf.color},children:bf.textIcon||bf.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.A,{src:b5(),alt:bf.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,j.Kw)(bf.id),aj(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bf.name}),(bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website)&&(0,d.jsxs)("a",{href:bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bf.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[p.length," connection",1===p.length?"":"s"]})]})]})]}),bf.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bf.deprecationNotice})]}),bf.notice?.text&&!bf.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bf.notice.text}),bf.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bf.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 →"})]}),bp&&t&&(0,d.jsx)(k.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bo?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bo?"Messages API":"responses"===t.apiType?"Responses API":"Chat Completions"," \xb7 ",(t.baseUrl||"").replace(/\/$/,""),"/",bo?"messages":"responses"===t.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:()=>{P(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>_(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aR({title:"Delete Compatible Node",message:`Delete this ${bo?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aR(null);try{(await fetch(`/api/provider-nodes/${n}`,{method:"DELETE"})).ok&&g.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bj?(0,d.jsx)(k.gw,{providerId:n}):(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4",children:[p.length>0&&v.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ab(!0),className:"whitespace-nowrap",children:"Apply Proxy"}),p.length>0&&(0,d.jsxs)(d.Fragment,{children:[as.length>0&&(0,d.jsxs)(k.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=as.length;0!==a&&aR({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aR(null);let a=0,b=[...as];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}q(a=>a.filter(a=>!b.includes(a.id))),at([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},className:"whitespace-nowrap",children:["Delete Selected (",as.length,")"]}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bQ,disabled:aU,className:"whitespace-nowrap",children:aU?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aU&&(0,d.jsx)(k.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aU&&(a2.current=!0,aX(!0))},className:"whitespace-nowrap",disabled:aW,children:aW?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(k.lM,{checked:"round-robin"===ay,onChange:a=>{let b=a?"round-robin":null,c=a?aA||"1":aA;a&&!aA&&aB("1"),az(b),bG(b,c)}}),"round-robin"===ay&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:aA,onChange:a=>{var b;aB(b=a.target.value),bG("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===p.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bh?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bq&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",br," or ",bs,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bq?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,children:br}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,children:bs})]}):(0,d.jsxs)(d.Fragment,{children:[!bp&&"iflow"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),children:"Cookie"}),"codex"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>S(!0),children:(0,A.Tl)("Bulk Add")}),"grok-cli"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),children:(0,A.Tl)("Bulk Add")}),(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,children:bp?"Add API Key":"iflow"===n?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a0&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",a0.total]}),(0,d.jsxs)("span",{children:["Completed: ",a0.completed]}),(0,d.jsxs)("span",{children:["Passed: ",a0.passed]}),(0,d.jsxs)("span",{children:["Failed: ",a0.failed]}),a0.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aU&&aY&&(0,d.jsxs)("span",{children:["Running: ",p.find(a=>a.id===aY)?.name||aY]})]})}),p.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:bY,onChange:()=>{bY?at([]):at(p.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b1,!bp&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>S(!0),title:(0,A.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),"grok-cli"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),title:(0,A.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),bq?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,className:"w-full sm:w-auto",children:br}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,className:"w-full sm:w-auto",children:bs})]}):(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsx)(X,{providerId:n}),(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bv&&(0,d.jsx)("select",{value:aC,onChange:a=>{var b;aD(b=a.target.value),bH(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bv.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bp&&(a=[...bl,...aM.filter(a=>!bl.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aO.includes(a)),b=("aihorde"===n||"opencode"===n)&&aG.length>0,(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[b&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:bN,disabled:a5,className:"whitespace-nowrap",children:a5?"Importing...":"Import from /models"}),aO.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bB,className:"whitespace-nowrap",children:"Active All"}),a.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bA(a),className:"whitespace-nowrap",children:"Disable All"})]}))]}),!!am&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:am}),"zed"===n&&!!aK&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aK}),(()=>{let a,b,c;if(bp)return(0,d.jsx)(G,{providerStorageAlias:bu,providerDisplayAlias:bw,modelAliases:ae,customModels:ag,copied:a9,onCopy:ba,onSetAlias:bJ,onDeleteAlias:bK,onAddCustomModel:(a,b)=>bL(a,"llm",bu,b),onDeleteCustomModel:a=>bM(a,"llm",bu),connections:p,isAnthropic:bo});let e=[...bl,...aM.filter(a=>!bl.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}),f=new Set(aO),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=(0,B.R)({customModels:ag,modelAliases:ae,providerAlias:bu,builtInModels:bl,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(E,{model:{id:a.id,name:a.name},fullModel:`${bw}/${a.id}`,alias:a.alias,copied:a9,onCopy:ba,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bM(a.id,"llm",bu):bK(a.alias)},testStatus:ak[a.id],onTest:p.length>0||bj?()=>b4(a.id):void 0,isTesting:ao.has(a.id),isCustom:!0,isFree:!1,caps:a.caps||o(`${bu}/${a.id}`),thinkingSuffix:bt(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bu}/${a.id}`,c=`${n}/${a.id}`,e=Object.entries(ae).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(E,{model:a,fullModel:`${bw}/${a.id}`,alias:e,copied:a9,onCopy:ba,onSetAlias:b=>bJ(a.id,b,bu),onDeleteAlias:()=>bK(e),testStatus:ak[a.id],onTest:p.length>0||bj?()=>b4(a.id):void 0,isTesting:ao.has(a.id),isFree:a.isFree,onDisable:()=>by(a.id),caps:o(`${n}/${a.id}`),thinkingSuffix:bt(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>ar(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===n||"qoder-cn"===n)&&p.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bO,disabled:a3,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a3?{animation:"spin 1s linear infinite"}:void 0,children:a3?"progress_activity":"download"}),a3?(0,A.Tl)("Fetching..."):(0,A.Tl)("Fetch Qoder Models")]}),("cline"===n||"clinepass"===n)&&p.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bP,disabled:a7,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a7?{animation:"spin 1s linear infinite"}:void 0,children:a7?"progress_activity":"download"}),a7?(0,A.Tl)("Fetching..."):(0,A.Tl)("Import from /models")]}),aG.length>0&&(a=new Set([...Object.values(ae),...i.map(a=>a.fullModel)]),b=new Set(bl.map(a=>a.id)),0===(c=aG.filter(c=>!a.has(`${bu}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bL(a.id,"llm",bu,a.caps)},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:a.contextLength?`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`:a.name,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),h.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>bz(a.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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),b3,"kiro"===n?(0,d.jsx)(k.Mh,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):"cursor"===n?(0,d.jsx)(k.G9,{isOpen:C,onSuccess:bS,onClose:()=>D(!1)}):"zed"===n?(0,d.jsx)(k.TE,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):"gitlab"===n?(0,d.jsx)(k.vj,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):(0,d.jsx)(k.LF,{isOpen:C,provider:n,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}),"iflow"===n&&(0,d.jsx)(k.vE,{isOpen:F,onSuccess:()=>{bE(),H(!1)},onClose:()=>H(!1)}),(0,d.jsx)(L,{isOpen:I,provider:n,providerName:bf.name,isCompatible:bp,isAnthropic:bo,authType:bf?.authType,authHint:bf?.authHint,website:bf?.website,proxyPools:v,error:N,existingNames:p.map(a=>a.name).filter(Boolean),onSave:bT,onBulkDone:bE,onClose:()=>{P(""),K(!1)}}),(0,d.jsx)(k.wI,{isOpen:W,connection:ac,proxyPools:v,onSave:bU,onClose:()=>Z(!1)}),bp&&(0,d.jsx)(M,{isOpen:$,node:t,onSave:bF,onClose:()=>_(!1),isAnthropic:bo}),!bp&&(0,d.jsx)(O,{isOpen:aq,providerAlias:bu,providerDisplayAlias:bw,onSave:async(a,b,c)=>{await bL(a,b?.stt?"stt":"llm",bu,b,c),ar(!1)},onClose:()=>ar(!1)}),"codex"===n&&(0,d.jsx)(Q,{isOpen:R,onClose:()=>S(!1),onSuccess:bE}),"grok-cli"===n&&(0,d.jsx)(T,{isOpen:U,onClose:()=>V(!1),onSuccess:bE}),(0,d.jsx)(k.uo,{isOpen:aS,onClose:()=>aT(!1),onConfirm:()=>{(aT(!1),bh)?bb():bd()},title:"Risk Notice",message:bf?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(k.uo,{isOpen:!!aQ,onClose:()=>aR(null),onConfirm:aQ?.onConfirm,title:aQ?.title||"Confirm",message:aQ?.message,variant:"danger"})]})}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86849:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/home/runner/work/9router/9router/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/home/runner/work/9router/9router/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},87123:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,9990,2760,1220,5390,9269,3192,6118,915,6457,4123,4386,6777,412,8716],()=>b(b.s=86849));module.exports=c})();
|
|
27
|
+
]`;function T(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function U({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[j,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=(0,e.useRef)(null),t=()=>{h||(g(""),l(""),n(null),r(null),p(!1),b())},u=async a=>{if(!a||0===a.length)return;l("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void l((0,A.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=T(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void l((0,A.Tl)("No accounts found in selected files"));g(JSON.stringify(a,null,2)),r({filesCount:b.length,accountsCount:a.length})}catch(a){l(`${(0,A.Tl)("Error reading files")}: ${a.message}`)}},v=async()=>{let a;l(""),n(null);try{a=T(f)}catch(a){l(`${(0,A.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void l((0,A.Tl)("No accounts found in input"));i(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void l(d?.error||`Request failed: ${b.status}`);n(d),d.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,A.Tl)("Request failed"))}finally{i(!1)}},w=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(k.aF,{isOpen:a,title:(0,A.Tl)("Bulk Add Grok CLI Accounts"),onClose:t,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,A.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:s,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{u(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(k.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>s.current?.click(),disabled:h,children:(0,A.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),p(!0)},onDragLeave:a=>{a.preventDefault(),p(!1)},onDrop:a=>{a.preventDefault(),p(!1),a.dataTransfer?.files?.length>0&&u(a.dataTransfer.files)},className:`relative rounded border transition-colors ${o?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:S,value:f,onChange:a=>{g(a.target.value),r(null)},disabled:h}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,A.Tl)("Drop .json files here")})]})]}),q&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,A.Tl)("Loaded")," ",q.accountsCount," ",(0,A.Tl)("account(s) from")," ",q.filesCount," ",(0,A.Tl)("file(s)")]})]}),j&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:j}),m&&m.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,A.Tl)("failed")]}),w.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:v,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,A.Tl)("Importing..."):(0,A.Tl)("Import All")}),(0,d.jsx)(k.$n,{onClick:t,variant:"ghost",fullWidth:!0,disabled:h,children:(0,A.Tl)("Close")})]})]})})}var V=c(41371);let W=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],X=/^[A-Za-z0-9-]+$/;function Y({providerId:a}){let b=(0,V.i)(),[c,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)([{name:"",value:""}]),[i,j]=(0,e.useState)({}),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),p=(a,b,c)=>{h(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},q=(0,e.useCallback)(async()=>{let c={};for(let a of g.filter(a=>a.name.trim())){let d=a.name.trim();if(!X.test(d))return void b.error(`Invalid header name: ${d}`);if(W.includes(d.toLowerCase()))return void b.error(`Header ${d} cannot be overridden`);if(d in c)return void b.error(`Duplicate header name: ${d}`);a.value!==i[d]&&(c[d]=a.value)}o(!0);try{let d=await fetch(`/api/providers/${a}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:c})});if(!d.ok){let a=await d.json().catch(()=>({}));b.error(a.error||"Failed to save");return}m(Object.keys(c).length>0),b.success("Custom headers saved")}finally{o(!1)}},[g,i,a,b]);return 0!==Object.keys(i).length||l?(0,d.jsxs)(k.Zp,{padding:"xs",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>f(a=>!a),className:"flex w-full items-center justify-between text-left",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),l&&(0,d.jsx)(k.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:c?"expand_less":"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:g.map((a,b)=>{let c=a.name.trim()in i&&a.value!==i[a.name.trim()];return(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{value:a.name,onChange:a=>p(b,"name",a.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,d.jsx)("input",{value:a.value,onChange:a=>p(b,"value",a.target.value),placeholder:"Value",spellCheck:!1,title:c?"Overridden":a.name.trim()in i?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${c?"border-amber-400/60":"border-border"}`}),(0,d.jsx)("button",{type:"button",title:"Remove header",onClick:()=>h(a=>a.length>1?a.filter((a,c)=>c!==b):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},b)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>h(a=>[...a,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{type:"button",disabled:n,onClick:()=>{h(Object.entries(i).map(([a,b])=>({name:a,value:b})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,d.jsx)("button",{type:"button",disabled:n,onClick:q,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:n?"Saving...":"Save"})]})]})]})]}):null}Y.propTypes={providerId:D().string.isRequired};let Z={claude:"claudeAutoPing",codex:"codexAutoPing"};function $(){let a,b,c=(0,f.useParams)(),g=(0,f.useRouter)(),n=c.id,{getCaps:o}=(0,z.yU)(),[p,q]=(0,e.useState)([]),[r,s]=(0,e.useState)(!0),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[F,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[L,O]=(0,e.useState)(""),[Q,S]=(0,e.useState)(!1),[T,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)([]),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)({}),[am,an]=(0,e.useState)(""),[ao,ap]=(0,e.useState)(()=>new Set),[aq,ar]=(0,e.useState)(!1),[as,at]=(0,e.useState)([]),[au,av]=(0,e.useState)("__none__"),[aw,ax]=(0,e.useState)(!1),[ay,az]=(0,e.useState)(null),[aA,aB]=(0,e.useState)(""),[aC,aD]=(0,e.useState)("auto"),[aE,aF]=(0,e.useState)({enabled:!1,connections:{}}),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)([]),[aK,aL]=(0,e.useState)(null),[aM,aN]=(0,e.useState)([]),[aO,aP]=(0,e.useState)([]),[aQ,aR]=(0,e.useState)(null),[aS,aT]=(0,e.useState)(!1),[aU,aV]=(0,e.useState)(!1),[aW,aX]=(0,e.useState)(!1),[aY,aZ]=(0,e.useState)(null),[a$,a_]=(0,e.useState)({}),[a0,a1]=(0,e.useState)(null),a2=(0,e.useRef)(!1),[a3,a4]=(0,e.useState)(!1),[a5,a6]=(0,e.useState)(!1),[a7,a8]=(0,e.useState)(!1),{copied:a9,copy:ba}=(0,y.C)(),bb=()=>{D(!0)},bc=()=>{bh?bb():(O(""),J(!0))},bd=()=>{O(""),J(!0)},be=()=>{bh?bc():bd()},bf=t?{id:t.id,name:t.name||("anthropic-compatible"===t.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===t.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===t.type?"AC":"OC",apiType:t.apiType,baseUrl:t.baseUrl,type:t.type}:l.zN[n]||l.fg[n]||l.IS[n]||l.nJ[n]||l.br[n],bg=bf?.authModes||[],bh=!!l.zN[n]||!!l.IS[n]||bg.includes("oauth"),bi=!!l.fg[n]||bg.includes("apikey"),bj=!!l.IS[n]?.noAuth,bk=(0,m.KC)(n),bl=("cursor"===n||"zed"===n)&&aI.length>0?aI:bk,bm=(0,l.wG)(n),bn=(0,l.mq)(n),bo=(0,l.gb)(n),bp=bn||bo,bq=!bp&&bh&&bi,br="xai"===n?"Grok Build OAuth":"grok-cli"===n?"Grok CLI Device Login":"kimi"===n?"Kimi Coding OAuth":"OAuth",bs="xai"===n?"xAI API Key":"kimi"===n?"Kimi API Key":"qoder"===n||"qoder-cn"===n?"PAT":"API Key",bt=a=>{if(!aC||"auto"===aC)return null;let b=x(n,a);return b&&b.includes(aC)?aC:null},bu=bp?n:bm,bv=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=x(n,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bl)c(a.id);for(let a of aM)c(a.id);for(let a of ag)a.providerAlias===bu&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bw=bp?t?.prefix||n:bm,bx=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}`,{cache:"no-store"}),b=await a.json();a.ok&&aP(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bu]),by=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bu,ids:[a]})})).ok&&await bx()}catch(a){console.log("Error disabling model:",a)}},bz=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bx()}catch(a){console.log("Error enabling model:",a)}},bA=async a=>{a.length&&aR({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aR(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bu,ids:a})})).ok&&await bx()}catch(a){console.log("Error disabling all models:",a)}}})},bB=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bu)}`,{method:"DELETE"})).ok&&await bx()}catch(a){console.log("Error enabling all models:",a)}},bC=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&af(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bD=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ah(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bE=(0,e.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===n);q(a)}c.ok&&w(g.proxyPools||[]);let i=(h.providerStrategies||{})[n]||{};az(i.fallbackStrategy||null),aB(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1");let j=(h.providerThinking||{})[n]||{};aD(j.mode||"auto");let k=Z[n],l=k&&h[k]||{};if(aF({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===n)||null;if(!a&&bp)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===n)||null))break}u(a)}}catch(a){console.log("Error fetching connections:",a)}finally{s(!1)}},[n,bp]),bF=async a=>{try{let b=await fetch(`/api/provider-nodes/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(u(c.node),await bE(),_(!1))}catch(a){console.log("Error updating provider node:",a)}},bG=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[n]:f[n]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bH=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[n]={mode:a}:delete c[n],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bI=async a=>{let b=Z[n];if(b){aF(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bJ=async(a,b,c=bm)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bC();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bK=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bC()}catch(a){console.log("Error deleting alias:",a)}},bL=async(a,b="llm",c=bu,d,e)=>{try{let f=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b,...d?{caps:d}:{},...e?{transport:e}:{}})});if(f.ok)await bD();else{let a=await f.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bM=async(a,b="llm",c=bu)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bD()}catch(a){console.log("Error deleting custom model:",a)}},bN=async()=>{if(!a5&&0!==aG.length){a6(!0);try{let a=new Set(bl.map(a=>a.id)),b=new Set(ag.filter(a=>a.providerAlias===bu&&"llm"===(a.kind||a.type||"llm")).map(a=>a.id)),c=new Set(Object.values(ae).filter(a=>"string"==typeof a)),d=0;for(let e of aG){let f=e.id||e.name||e.model;!(!f||a.has(f)||b.has(f))&&(c.has(`${bu}/${f}`)||(await bL(f,"llm",bu,e.caps),b.add(f),d+=1))}alert(d>0?`${(0,A.Tl)("Successfully added")} ${d} ${(0,A.Tl)("models")}`:(0,A.Tl)("All models already exist, no new models added"))}catch(a){console.log("Error importing provider models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a6(!1)}}},bO=async()=>{if(a3)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,A.Tl)("Please add an active Qoder connection first"));a4(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,A.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,A.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^(qoder-cn|qoder)\//,"");ag.some(a=>a.providerAlias===bu&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(ae).includes(`${bu}/${c}`)||(await bL(c,"llm",bu,a.caps),e+=1)}0===e?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${e} `+(0,A.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a4(!1)}},bP=async()=>{if(a7)return;let a=p.find(a=>!1!==a.isActive);if(!a)return void alert((0,A.Tl)("Please add an active Cline connection first"));a8(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,A.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,A.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;b&&(ag.some(a=>a.providerAlias===bu&&a.id===b&&"llm"===(a.kind||a.type||"llm"))||Object.values(ae).includes(`${bu}/${b}`)||(await bL(b,"llm",bu),e+=1))}0===e?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${e} `+(0,A.Tl)("models"))}catch(a){console.log("Error importing Cline models:",a),alert((0,A.Tl)("Error fetching models")+": "+a.message)}finally{a8(!1)}},bQ=async()=>{if(aU||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));a2.current=!1,aV(!0),aX(!1),aZ(null),a_(a),a1({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(a2.current){a1({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aZ(d.id),a_(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,a_(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a_(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a1({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aZ(null),aV(!1),aX(!1),a2.current=!1}},bR=async a=>{aR({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aR(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&q(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bS=()=>{bE(),D(!1)},bT=async a=>{O("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bE(),J(!1);return}O(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),O("Failed to save connection")}},bU=async a=>{try{(await fetch(`/api/providers/${ac.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bE(),X(!1))}catch(a){console.log("Error updating connection:",a)}},bV=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&q(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bW=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],q(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bE()}},bX=p.filter(a=>as.includes(a.id)),bY=p.length>0&&as.length===p.length;(()=>{if(0===bX.length)return;let a=new Set(bX.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=v.find(a=>a.id===b);return c?.name}})();let bZ=()=>{aw||ab(!1)},b$=async(a,{mode:b}={})=>{ax(!0);try{let c=await fetch("/api/providers/bulk-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,mode:b||"single",proxyPoolId:a[0]?.proxyPoolId??null,connectionIds:a.map(a=>a.connectionId)})});if(c.ok){let a=await c.json().catch(()=>({}));Array.isArray(a.missing)&&a.missing.length>0&&alert(`Applied to ${a.updated} connection(s); ${a.missing.length} no longer exist.`)}else if(404===c.status||405===c.status)await b_(a);else{let a=await c.json().catch(()=>({}));alert(a.error||"Failed to apply proxy.")}await bE(),ab(!1)}finally{ax(!1)}},b_=async a=>{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`)},b0=a=>b$(p.map(b=>({connectionId:b.id,proxyPoolId:a})),{mode:"single"}),b1=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:p.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,as.includes(c)),onChange:()=>{var b;return b=a.id,void at(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(K,{connection:a,proxyPools:v,isOAuth:bh,isFirst:0===b,isLast:b===p.length-1,onMoveUp:()=>bW(b,b-1),onMoveDown:()=>bW(b,b+1),onToggleActive:b=>bV(a.id,b),autoPing:Z[n]&&"oauth"===a.authType?{on:!0===aE.connections[a.id],onToggle:b=>{var c;return c=a.id,void bI({...aE,connections:{...aE.connections,[c]:b}})},provider:n}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&q(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ad(a),X(!0)},onDelete:()=>bR(a.id),oneByOneStatus:a$[a.id]||null})})]},a.id)})}),b2=v.filter(a=>!0===a.isActive),b3=(0,d.jsx)(k.aF,{isOpen:aa,onClose:bZ,title:`Apply Proxy (${p.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=v.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):b$(p.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})),{mode:"one-to-one"})},disabled:aw||0===b2.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>b0(null),disabled:aw,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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),v.map(a=>(0,d.jsxs)("button",{onClick:()=>b0(a.id),disabled:aw||!0!==a.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,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aw&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(k.$n,{onClick:bZ,variant:"ghost",fullWidth:!0,disabled:aw,children:"Cancel"})]})}),b4=async a=>{if(!ao.has(a)){ap(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bu}/${a}`})}),c=await b.json();al(b=>({...b,[a]:c.ok?"ok":"error"})),an(c.ok?"":c.error||"Model not reachable")}catch{al(b=>({...b,[a]:"error"})),an("Network error")}finally{ap(b=>{let c=new Set(b);return c.delete(a),c})}}};if(r)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(k.Qv,{}),(0,d.jsx)(k.Qv,{})]});if(!bf)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let b5=()=>bn&&bf.apiType?"responses"===bf.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bo?"/providers/anthropic-m.png":(0,j.HY)(bf.id);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bf.color}15`},children:ai||!b5()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bf.color},children:bf.textIcon||bf.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.A,{src:b5(),alt:bf.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,j.Kw)(bf.id),aj(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bf.name}),(bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website)&&(0,d.jsxs)("a",{href:bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bf.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[p.length," connection",1===p.length?"":"s"]})]})]})]}),bf.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bf.deprecationNotice})]}),bf.notice?.text&&!bf.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bf.notice.text}),bf.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bf.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 →"})]}),bp&&t&&(0,d.jsx)(k.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bo?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bo?"Messages API":"responses"===t.apiType?"Responses API":"Chat Completions"," \xb7 ",(t.baseUrl||"").replace(/\/$/,""),"/",bo?"messages":"responses"===t.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:()=>{O(""),J(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>_(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aR({title:"Delete Compatible Node",message:`Delete this ${bo?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aR(null);try{(await fetch(`/api/provider-nodes/${n}`,{method:"DELETE"})).ok&&g.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bj?(0,d.jsx)(k.gw,{providerId:n}):(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4",children:[p.length>0&&v.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ab(!0),className:"whitespace-nowrap",children:"Apply Proxy"}),p.length>0&&(0,d.jsxs)(d.Fragment,{children:[as.length>0&&(0,d.jsxs)(k.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=as.length;0!==a&&aR({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aR(null);let a=0,b=[...as];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}q(a=>a.filter(a=>!b.includes(a.id))),at([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},className:"whitespace-nowrap",children:["Delete Selected (",as.length,")"]}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bQ,disabled:aU,className:"whitespace-nowrap",children:aU?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aU&&(0,d.jsx)(k.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aU&&(a2.current=!0,aX(!0))},className:"whitespace-nowrap",disabled:aW,children:aW?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(k.lM,{checked:"round-robin"===ay,onChange:a=>{let b=a?"round-robin":null,c=a?aA||"1":aA;a&&!aA&&aB("1"),az(b),bG(b,c)}}),"round-robin"===ay&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:aA,onChange:a=>{var b;aB(b=a.target.value),bG("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===p.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bh?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bq&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",br," or ",bs,"."]})]})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:bq?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,className:"w-full sm:w-auto",children:br}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,className:"w-full sm:w-auto",children:bs})]}):(0,d.jsxs)(d.Fragment,{children:[!bp&&"iflow"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),children:"Cookie"}),"codex"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>S(!0),children:(0,A.Tl)("Bulk Add")}),"grok-cli"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),children:(0,A.Tl)("Bulk Add")}),(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,children:bp?"Add API Key":"iflow"===n?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a0&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",a0.total]}),(0,d.jsxs)("span",{children:["Completed: ",a0.completed]}),(0,d.jsxs)("span",{children:["Passed: ",a0.passed]}),(0,d.jsxs)("span",{children:["Failed: ",a0.failed]}),a0.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aU&&aY&&(0,d.jsxs)("span",{children:["Running: ",p.find(a=>a.id===aY)?.name||aY]})]})}),p.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:bY,onChange:()=>{bY?at([]):at(p.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b1,!bp&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>S(!0),title:(0,A.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),"grok-cli"===n&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),title:(0,A.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),bq?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,className:"w-full sm:w-auto",children:br}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,className:"w-full sm:w-auto",children:bs})]}):(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsx)(Y,{providerId:n}),(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bv&&(0,d.jsx)("select",{value:aC,onChange:a=>{var b;aD(b=a.target.value),bH(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bv.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bp&&(a=[...bl,...aM.filter(a=>!bl.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aO.includes(a)),b=("aihorde"===n||"opencode"===n)&&aG.length>0,(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[b&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:bN,disabled:a5,className:"whitespace-nowrap",children:a5?"Importing...":"Import from /models"}),aO.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bB,className:"whitespace-nowrap",children:"Active All"}),a.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bA(a),className:"whitespace-nowrap",children:"Disable All"})]}))]}),!!am&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:am}),"zed"===n&&!!aK&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aK}),(()=>{let a,b,c;if(bp)return(0,d.jsx)(G,{providerStorageAlias:bu,providerDisplayAlias:bw,modelAliases:ae,customModels:ag,copied:a9,onCopy:ba,onSetAlias:bJ,onDeleteAlias:bK,onAddCustomModel:(a,b)=>bL(a,"llm",bu,b),onDeleteCustomModel:a=>bM(a,"llm",bu),connections:p,isAnthropic:bo});let e=[...bl,...aM.filter(a=>!bl.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}),f=new Set(aO),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=(0,B.R)({customModels:ag,modelAliases:ae,providerAlias:bu,builtInModels:bl,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(E,{model:{id:a.id,name:a.name},fullModel:`${bw}/${a.id}`,alias:a.alias,copied:a9,onCopy:ba,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bM(a.id,"llm",bu):bK(a.alias)},testStatus:ak[a.id],onTest:p.length>0||bj?()=>b4(a.id):void 0,isTesting:ao.has(a.id),isCustom:!0,isFree:!1,caps:a.caps||o(`${bu}/${a.id}`),thinkingSuffix:bt(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bu}/${a.id}`,c=`${n}/${a.id}`,e=Object.entries(ae).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(E,{model:a,fullModel:`${bw}/${a.id}`,alias:e,copied:a9,onCopy:ba,onSetAlias:b=>bJ(a.id,b,bu),onDeleteAlias:()=>bK(e),testStatus:ak[a.id],onTest:p.length>0||bj?()=>b4(a.id):void 0,isTesting:ao.has(a.id),isFree:a.isFree,onDisable:()=>by(a.id),caps:o(`${n}/${a.id}`),thinkingSuffix:bt(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>ar(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===n||"qoder-cn"===n)&&p.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bO,disabled:a3,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a3?{animation:"spin 1s linear infinite"}:void 0,children:a3?"progress_activity":"download"}),a3?(0,A.Tl)("Fetching..."):(0,A.Tl)("Fetch Qoder Models")]}),("cline"===n||"clinepass"===n)&&p.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bP,disabled:a7,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a7?{animation:"spin 1s linear infinite"}:void 0,children:a7?"progress_activity":"download"}),a7?(0,A.Tl)("Fetching..."):(0,A.Tl)("Import from /models")]}),aG.length>0&&(a=new Set([...Object.values(ae),...i.map(a=>a.fullModel)]),b=new Set(bl.map(a=>a.id)),0===(c=aG.filter(c=>!a.has(`${bu}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bL(a.id,"llm",bu,a.caps)},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:a.contextLength?`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`:a.name,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),h.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>bz(a.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,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),b3,"kiro"===n?(0,d.jsx)(k.Mh,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):"cursor"===n?(0,d.jsx)(k.G9,{isOpen:C,onSuccess:bS,onClose:()=>D(!1)}):"zed"===n?(0,d.jsx)(k.TE,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):"gitlab"===n?(0,d.jsx)(k.vj,{isOpen:C,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}):(0,d.jsx)(k.LF,{isOpen:C,provider:n,providerInfo:bf,onSuccess:bS,onClose:()=>D(!1)}),"iflow"===n&&(0,d.jsx)(k.vE,{isOpen:F,onSuccess:()=>{bE(),H(!1)},onClose:()=>H(!1)}),(0,d.jsx)(M,{isOpen:I,provider:n,providerName:bf.name,isCompatible:bp,isAnthropic:bo,authType:bf?.authType,authHint:bf?.authHint,website:bf?.website,proxyPools:v,error:L,existingNames:p.map(a=>a.name).filter(Boolean),onSave:bT,onBulkDone:bE,onClose:()=>{O(""),J(!1)}}),(0,d.jsx)(k.wI,{isOpen:W,connection:ac,proxyPools:v,onSave:bU,onClose:()=>X(!1)}),bp&&(0,d.jsx)(N,{isOpen:$,node:t,onSave:bF,onClose:()=>_(!1),isAnthropic:bo}),!bp&&(0,d.jsx)(P,{isOpen:aq,providerAlias:bu,providerDisplayAlias:bw,onSave:async(a,b,c)=>{await bL(a,b?.stt?"stt":"llm",bu,b,c),ar(!1)},onClose:()=>ar(!1)}),"codex"===n&&(0,d.jsx)(R,{isOpen:Q,onClose:()=>S(!1),onSuccess:bE}),"grok-cli"===n&&(0,d.jsx)(U,{isOpen:T,onClose:()=>V(!1),onSuccess:bE}),(0,d.jsx)(k.uo,{isOpen:aS,onClose:()=>aT(!1),onConfirm:()=>{(aT(!1),bh)?bb():bd()},title:"Risk Notice",message:bf?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(k.uo,{isOpen:!!aQ,onClose:()=>aR(null),onConfirm:aQ?.onConfirm,title:aQ?.title||"Confirm",message:aQ?.message,variant:"danger"})]})}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71287:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/home/runner/work/9router/9router/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/home/runner/work/9router/9router/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87123:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/9router/9router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,9990,2760,1220,5390,9269,3192,6118,915,6457,4123,4386,6777,412,444],()=>b(b.s=71287));module.exports=c})();
|