@rsalmn/extremerouter 0.6.8 → 0.7.0
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 +12 -7
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +36 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/overview/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- 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/playground/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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/quota/page.js +2 -2
- 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 +2 -2
- 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/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/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/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js +1 -0
- package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- 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 +1 -1
- 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 +1 -1
- 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/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 +1 -1
- 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 +2 -2
- 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/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/droid-settings/route.js +2 -2
- 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/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 +1 -1
- 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/openclaw-settings/route.js +1 -1
- 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 +1 -1
- 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/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/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/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 +2 -2
- 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/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/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/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/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/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 +2 -2
- 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/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/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]/freebuff-profile/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -0
- 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]/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/[id]/v0-profile/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/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/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/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/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/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 +1 -1
- 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]/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/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/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/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/retry-stats/route.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -0
- 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/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/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/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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- 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 +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/playground.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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- 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 +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- 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 +2 -2
- 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 +12 -7
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/1129.js +4 -0
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/212.js +1 -1
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/2701.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +10 -7
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/4452.js +1 -0
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/5781.js +6 -0
- package/app/.next-cli-build/server/chunks/5961.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6182.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/6630.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/7524.js +1 -1
- package/app/.next-cli-build/server/chunks/788.js +1 -1
- package/app/.next-cli-build/server/chunks/7914.js +1 -0
- package/app/.next-cli-build/server/chunks/8142.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8833.js +2 -2
- package/app/.next-cli-build/server/chunks/8895.js +4 -4
- package/app/.next-cli-build/server/chunks/9422.js +13 -0
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9703.js +14 -0
- package/app/.next-cli-build/server/chunks/9903.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +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/static/chunks/1321-c2673b86ae099f7a.js +1 -0
- package/app/.next-cli-build/static/chunks/{5497-b52a89f9755eb560.js → 5497-4a46de726a80ec4c.js} +2 -2
- package/app/.next-cli-build/static/chunks/705-88c44a85ef2fa706.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-0858623d4e6bc8d9.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-02c60e92de70e467.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-f83681329e5612b2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-bc74cf85727e59c8.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-88b8c16ff41dc468.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2ebb6e5a67759dda.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-79901f3a01b79627.js → page-f2b0f4a782580e21.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7321cb331506637b.js +1 -0
- package/app/.next-cli-build/static/css/a024ae3118bec883.css +1 -0
- package/app/.next-cli-build/static/p-3kW8XDeBLQg0sl_rzmI/_buildManifest.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +80 -80
- package/app/public/providers/freebuff-web.svg +6 -0
- package/app/public/providers/openvecta.svg +7 -0
- package/app/public/providers/zenmux-free.svg +9 -0
- package/package.json +66 -66
- package/app/.next-cli-build/server/chunks/5141.js +0 -1
- package/app/.next-cli-build/server/chunks/9248.js +0 -24
- package/app/.next-cli-build/static/6ddNIh75ogte-iBCWv6aC/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-76d1d90661755074.js +0 -1
- package/app/.next-cli-build/static/chunks/705-c516b80d4469541b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-13dd1e8e32f7d580.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-d88cff439c2fa57d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-503d94f002901e45.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ba5802aef0691320.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-92152010fe3fda37.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d1f50f77018f738e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-d3db31f01a1d0f67.js +0 -1
- package/app/.next-cli-build/static/css/1bc6732048894b8c.css +0 -1
- /package/app/.next-cli-build/static/{6ddNIh75ogte-iBCWv6aC → p-3kW8XDeBLQg0sl_rzmI}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.3-to-0.6.4-0.6.4-20260705-031259 → upgrade-0.6.7-to-0.6.8-0.6.8-20260712-041517}/data.sqlite +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.4-to-0.6.5-0.6.5-20260705-054523 → upgrade-0.6.8-to-0.6.9-0.6.9-20260713-141714}/data.sqlite +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[705],{31474:(e,c,n)=>{n.d(c,{cn:()=>t});function t(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},62630:(e,c,n)=>{n.d(c,{BD:()=>p,PS:()=>r,ad:()=>u,gH:()=>o,uy:()=>h});let t={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.3-codex-xhigh":{input:10,output:40,cached:5,reasoning:60,cache_creation:10},"gpt-5.3-codex-high":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.3-codex-low":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.3-codex-none":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15},"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},a={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}}},i=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"*-codex-none",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.3-*",pricing:{input:6,output:24,cached:3,reasoning:36,cache_creation:6}},{pattern:"gpt-5.2-*",pricing:{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5}},{pattern:"gpt-5.1-*",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"gpt-5-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-5*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function o(e,c){return RegExp("^"+e.split("*").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(c)}function r(e,c){if(!c)return null;if(e&&a[e]?.[c])return a[e][c];let n=c.includes("/")?c.split("/").pop():c;if(t[n])return t[n];if(t[c])return t[c];for(let{pattern:e,pricing:t}of i)if(o(e,n)||o(e,c))return t;return null}function u(){return a}function p(e){return null==e||isNaN(e)?"$0.00":`$${e.toFixed(2)}`}function h(e,c){if(!e||!c)return 0;let n=0,t=e.prompt_tokens||e.input_tokens||0,a=e.cached_tokens||e.cache_read_input_tokens||0,i=e.cache_creation_input_tokens||0;n+=Math.max(0,t-a-i)*(c.input/1e6),a>0&&(n+=a*((c.cached||c.input)/1e6)),n+=(e.completion_tokens||e.output_tokens||0)*(c.output/1e6);let o=e.reasoning_tokens||0;return o>0&&(n+=o*((c.reasoning||c.output)/1e6)),i>0&&(n+=i*((c.cache_creation||c.input)/1e6)),n}},84588:(e,c,n)=>{n.d(c,{default:()=>i});var t=n(95155),a=n(31474);function i({children:e,title:c,subtitle:n,icon:o,action:r,padding:u="md",hover:p=!1,elev:h=!1,className:s,...g}){return(0,t.jsxs)("div",{className:(0,a.cn)("bg-panel border border-border-subtle text-text-main",h?"rounded-panel shadow-[var(--shadow-elev)]":"rounded-panel shadow-[var(--shadow-soft)]",p&&"hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)] transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-5",lg:"p-6"}[u],s),...g,children:[(c||r)&&(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[o&&(0,t.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o})}),(0,t.jsxs)("div",{className:"min-w-0",children:[c&&(0,t.jsx)("h3",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:c}),n&&(0,t.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:n})]})]}),r]}),e]})}i.Section=function({children:e,className:c,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("rounded-brand border border-border-subtle bg-surface-2 p-4",c),...n,children:e})},i.Row=function({children:e,className:c,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("-mx-3 border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",c),...n,children:e})},i.ListItem=function({children:e,actions:c,className:n,...i}){return(0,t.jsxs)("div",{className:(0,a.cn)("group -mx-3 flex items-center justify-between border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",n),...i,children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:e}),c&&(0,t.jsx)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:c})]})}}}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-0858623d4e6bc8d9.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{49293:(e,t,s)=>{Promise.resolve().then(s.bind(s,85330))},85330:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>$});var l=s(95155),a=s(12115),r=s(73321),i=s(35497),o=s(11059);let n=/^[a-zA-Z0-9_.\-]+$/,c=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"}],d={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"}};function m(e){return d[e]||d.fallback}function x(e){let t=c.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function h({combos:e,comboStrategies:t,activeProviders:s,onViewCombos:a,onCreate:r}){let o=e.length,n=function(e){let t=new Set;for(let s of e)for(let e of s.models||[])t.add(e);return t.size}(e),c=function(e,t){let s={fallback:0,"round-robin":0,fusion:0,swarm:0};for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback";s[e]=(s[e]||0)+1}return s}(e,t),d=Object.values(c).filter(e=>e>0).length,u=o>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/o*10)/10:0,p=Math.max(...Object.values(c),1);return(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:o,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:n,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:d,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,l.jsx)(i.Zp,{padding:"sm",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,l.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(c).map(([e,t])=>{let s=m(e),a=o>0?Math.round(t/o*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:s.color},children:s.icon}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,l.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:s.color}})}),(0,l.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",a,"%)"]})]},e)})})]}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,l.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:a,children:"View All"})]}),0===e.length?(0,l.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,l.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,l.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let a=t[e.name]?.fallbackStrategy||"fallback",r=m(a),o=(e.models||[]).filter(e=>{let t=e.split("/")[0];return s.some(e=>e.provider===t&&!1!==e.isActive)}).length,n=(e.models||[]).length,c=n>0?Math.round(o/n*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,l.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsx)(i.Ex,{variant:r.badge,size:"sm",children:x(a)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[n," models"]})]})]}),(0,l.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,l.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:`h-1.5 rounded-full ${c>=80?"bg-success":c>=50?"bg-warning":"bg-danger"}`,style:{width:`${c}%`}})}),(0,l.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[o,"/",n]})]})]},e.id)})})]})]})}function b({combo:e,modelCaps:t={},activeProviders:s=[],copied:r,onCopy:o,onEdit:n,onDelete:d,strategy:u={},onSetStrategy:p}){let[h,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),N=u.fallbackStrategy||"fallback",w=u.judgeModel||"",k="fusion"===N,C="swarm"===N,S=u.managerModel||"",M=u.staffModel||"",$=u.auditModel||"",E=m(N);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>g(!h),children:[(0,l.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${E.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:E.color},children:E.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsx)(i.Ex,{variant:E.badge,size:"sm",children:x(N)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.models.length," models"]})]}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]}),(0,l.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${h?"rotate-180":""}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,l.jsx)(i.l6,{options:c,value:N,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:d,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),h&&(0,l.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsxs)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:["Models (",e.models.length,")"]}),(0,l.jsx)("div",{className:"flex flex-col gap-1",children:e.models.map((e,s)=>(0,l.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:s+1}),(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s))})]}),k&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("button",{onClick:()=>j(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-1 font-mono text-xs text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:w||`Auto — ${e.models[0]||"first model"}`})]}),w&&(0,l.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:S,placeholder:`Auto — ${e.models[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:M,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:$,placeholder:"Same as Staff"}].map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,l.jsxs)("button",{onClick:()=>y(e.key),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,l.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,l.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]},e.key)),(0,l.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"font-medium",children:"Workers"}),(0,l.jsxs)("span",{children:["= combo models (",e.models.length,")"]}),(0,l.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,l.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]})]})]}),(0,l.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,l.jsxs)("span",{className:"font-medium",children:[x(N),":"]})," ",c.find(e=>e.value===N)?.desc]})]}),(0,l.jsx)(i.rq,{isOpen:f,onClose:()=>j(!1),onSelect:e=>{p({judgeModel:e?.value||""}),j(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:w?[w]:[],closeOnSelect:!0}),v&&(0,l.jsx)(i.rq,{isOpen:!0,onClose:()=>y(null),onSelect:e=>{p({[`${v}Model`]:e?.value||""}),y(null)},activeProviders:s,title:`Select ${"manager"===v?"Manager":"staff"===v?"Staff":"Audit"} Model`,addedModelValues:[],closeOnSelect:!0})]})}function g({combos:e,modelCaps:t,activeProviders:s,comboStrategies:r,copied:o,copy:n,onEdit:c,onDelete:d,onSetStrategy:m,onCreate:x}){let[h,f]=(0,a.useState)(""),[j,v]=(0,a.useState)("all"),[y,N]=(0,a.useState)("name"),w=(0,a.useMemo)(()=>{var t;let s;return t=function(e,t,s,l){let a=e;if("all"!==s&&(a=a.filter(e=>(l[e.name]?.fallbackStrategy||"fallback")===s)),t.trim()){let e=t.trim().toLowerCase();a=a.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return a}(e,h,j,r),s=[...t],"models-desc"===y?s.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===y?s.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):s.sort((e,t)=>e.name.localeCompare(t.name)),s},[e,h,j,y,r]);return 0===e.length?(0,l.jsx)(i.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsx)(i.pd,{placeholder:"Search combos or models...",value:h,onChange:e=>f(e.target.value),className:"sm:max-w-xs"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,l.jsx)("button",{onClick:()=>v(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${j===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,l.jsx)("select",{value:y,onChange:e=>N(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:w.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${w.length} of ${e.length} combos`}),0===w.length?(0,l.jsx)(i.Zp,{children:(0,l.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',h,'" ',"all"!==j&&`with ${j} strategy`]})}):(0,l.jsx)("div",{className:"flex flex-col gap-3",children:w.map(e=>(0,l.jsx)(b,{combo:e,modelCaps:t,activeProviders:s,copied:o,onCopy:n,onEdit:()=>c(e),onDelete:()=>d(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let f=[{id:"always-on",name:"Always-On (5-Layer Fallback)",description:"Zero-downtime coding with 5 layers of fallback. Mix of subscription, cheap, and free tiers — if any model fails, the next picks up automatically.",icon:"shield",category:"reliability",strategy:"fallback",models:["cc/claude-opus-4-7","cx/gpt-5.4","glm/glm-5.1","minimax/MiniMax-M2.7","kr/claude-sonnet-4.5"],requiredProviders:["claude","codex","glm","minimax","kiro"]}];function j({combos:e,connections:t,onApply:s}){let[r,o]=(0,a.useState)(null),n=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),c=new Set((e||[]).map(e=>e.name)),d=async e=>{o(e.id);try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,models:e.models,kind:null})});if(!t.ok){let e=await t.json();alert(e.error||"Failed to create combo from template");return}await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e.name]:{fallbackStrategy:e.strategy}}})}),s&&s()}catch(e){alert("Failed to apply template: "+(e?.message||String(e)))}finally{o(null)}};return 0===f.length?(0,l.jsx)(i.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"mb-1",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(e=>{let t=(e.requiredProviders||[]).filter(e=>n.has(e)).length,s=(e.requiredProviders||[]).length,a=c.has(e.name),o=m(e.strategy);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${o.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:o.color},children:e.icon||o.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,l.jsx)(i.Ex,{variant:o.badge,size:"sm",children:x(e.strategy)})]})]}),a&&(0,l.jsx)(i.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(e.models||[]).slice(0,4).map((e,t)=>(0,l.jsx)("code",{className:"inline-flex items-center rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5",children:e},t)),(e.models||[]).length>4&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",(e.models||[]).length-4," more"]})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:(e.requiredProviders||[]).map(e=>{let t=n.has(e);return(0,l.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${t?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:t?"check_circle":"radio_button_unchecked"}),e]},e)})}),(0,l.jsx)("div",{className:"mt-auto pt-1",children:(0,l.jsx)(i.$n,{size:"sm",fullWidth:!0,variant:a?"secondary":"primary",icon:r===e.id?"progress_activity":"add",disabled:a||r===e.id,onClick:()=>d(e),children:r===e.id?"Creating...":a?"Already Created":t===s?"Apply Template":`Apply (${t}/${s} ready)`})})]},e.id)})})]})}var v=s(44923),y=s(87256),N=s(5020),w=s(39768);function k({id:e,index:t,model:s,isFirst:r,isLast:o,modelCaps:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:b,isDragging:g}=(0,y.gl)({id:e}),f={transform:w.Ks.Transform.toString(b),opacity:g?.5:1,zIndex:g?999:void 0},[j,v]=(0,a.useState)(!1),[N,C]=(0,a.useState)(s),S=()=>{let e=N.trim();e&&e!==s?c(e):C(s),v(!1)};return(0,l.jsxs)("div",{ref:h,style:f,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${g?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,l.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),j?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>C(e.target.value),onBlur:S,onKeyDown:e=>{"Enter"===e.key&&S(),"Escape"===e.key&&(C(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>v(!0),title:"Click to edit",children:[(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:s}),n?.[s]&&(0,l.jsx)(i.nh,{caps:n[s],size:11})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,l.jsx)("button",{onClick:d,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`rounded p-1 transition-colors ${o?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}function C({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:o,modelCaps:d={},kindFilter:m=null}){let[x,u]=(0,a.useState)(t?.name||""),[p,h]=(0,a.useState)(t?.models||[]),[b,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[w,S]=(0,a.useState)(""),[M,$]=(0,a.useState)({}),E=(0,v.FR)((0,v.MS)(v.AN,{activationConstraint:{distance:5}}),(0,v.MS)(v.uN,{coordinateGetter:y.JR})),z=p.map((e,t)=>({uid:`item-${t}`,model:e}));(0,a.useEffect)(()=>{e&&(async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();$(t.aliases||{})}}catch{}})()},[e]);let F=e=>e.trim()?n.test(e)?(S(""),!0):(S("Only letters, numbers, -, _ and . allowed"),!1):(S("Name is required"),!1),O=async()=>{F(x)&&(j(!0),await r({name:x.trim(),models:p}),j(!1))},A=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.aF,{isOpen:e,onClose:s,title:A?"Edit Combo":"Create Combo",size:"lg",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(i.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?F(t):S("")},placeholder:"my-combo",error:w}),(0,l.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),x.trim()&&(0,l.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:x.trim()})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),p.length>0&&(0,l.jsxs)(i.Ex,{variant:"info",size:"sm",children:[p.length," model",1!==p.length?"s":""]})]}),(0,l.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===p.length?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,l.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>g(!0),children:"Add First Model"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.Mp,{sensors:E,collisionDetection:v.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=z.findIndex(e=>e.uid===t.id),l=z.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&h(t=>(0,y.be)(t,e,l))}},modifiers:[N.FN,N.gj],children:(0,l.jsx)(y.gB,{items:z.map(e=>e.uid),strategy:y._G,children:(0,l.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:z.map(({uid:e,model:t},s)=>(0,l.jsx)(k,{id:e,index:s,model:t,modelCaps:d,isFirst:0===s,isLast:s===z.length-1,onEdit:e=>{let t=[...p];t[s]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(s),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(s),onRemove:()=>{h(p.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),p.length>=2&&(0,l.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:c.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,l.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(i.$n,{onClick:O,fullWidth:!0,size:"sm",icon:A?"save":"add",disabled:!x.trim()||!!w||f,children:f?"Saving...":A?"Save Changes":"Create Combo"})]})]})}),(0,l.jsx)(i.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{p.includes(e.value)||h([...p,e.value])},onDeselect:e=>{h(p.filter(t=>t!==e.value))},activeProviders:o,modelAliases:M,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}let S=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"}];function M(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[s,n]=(0,a.useState)([]),[c,d]=(0,a.useState)(!0),[m,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[b,f]=(0,a.useState)([]),[v,y]=(0,a.useState)({}),[N,w]=(0,a.useState)({}),[k,M]=(0,a.useState)(null),{copied:$,copy:E}=(0,o.C)(),z=(0,a.useCallback)(async()=>{try{let[e,t,s,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),a=await e.json(),r=await t.json(),i=s.ok?await s.json():{};if(e.ok&&n((a.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&f(r.connections||[]),l.ok){let e=await l.json(),t={};for(let s of e.models||[])s.caps&&(t[s.fullModel]=s.caps);w(t)}y(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{d(!1)}},[]);(0,a.useEffect)(()=>{z()},[z]);let F=t=>e.push(`/dashboard/combos?tab=${t}`),O=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await z(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},A=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await z(),p(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},_=async(e,t)=>{try{let s={...v},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),y(s)}catch(e){console.log("Error updating combo strategy:",e)}};return c?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(i.Qv,{}),(0,l.jsx)(i.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,l.jsx)(i.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,l.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,l.jsx)(i.Iz,{options:S,value:t,onChange:F}),"overview"===t&&(0,l.jsx)(h,{combos:s,comboStrategies:v,activeProviders:b,onViewCombos:()=>F("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,l.jsx)(g,{combos:s,modelCaps:N,activeProviders:b,comboStrategies:v,copied:$,copy:E,onEdit:p,onDelete:e=>{M({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{M(null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&n(s.filter(t=>t.id!==e))}catch(e){console.log("Error deleting combo:",e)}}})},onSetStrategy:_,onCreate:()=>x(!0)}),"templates"===t&&(0,l.jsx)(j,{combos:s,connections:b,onApply:z}),(0,l.jsx)(C,{isOpen:m,onClose:()=>x(!1),onSave:O,activeProviders:b,modelCaps:N},"create"),(0,l.jsx)(C,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>A(u.id,e),activeProviders:b,modelCaps:N},u?.id||"new"),(0,l.jsx)(i.uo,{isOpen:!!k,onClose:()=>M(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function $(){return(0,l.jsx)(a.Suspense,{fallback:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,l.jsx)(M,{})})}}},e=>{e.O(0,[27,7055,1321,705,5497,8441,3794,7358],()=>e(e.s=49293)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{73411:(e,s,t)=>{Promise.resolve().then(t.bind(t,98378))},98378:(e,s,t)=>{"use strict";t.d(s,{default:()=>f});var r=t(95155),a=t(12115),n=t(35497),i=t(14051),o=t.n(i);let c=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"Via RTK + Headroom"},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function l({data:e}){if(!e)return null;let s={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:c.map(e=>{let t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-panel border border-border-subtle bg-panel p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[e.color]}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e.icon})}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("span",{className:"text-2xl font-bold text-text-main",children:(t=Number(s[e.key]||0))>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()})})]}),(0,r.jsx)("div",{className:"text-sm font-medium text-text-main",children:e.label}),(0,r.jsx)("div",{className:"text-xs text-text-muted",children:e.sub})]},e.key)})})}l.propTypes={data:o().object};let d=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function m({settings:e}){return e?(0,r.jsx)("div",{className:"flex flex-wrap gap-3",children:d.map(s=>{let t=!!e[s.key];return(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${t?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${t?"text-success":"text-text-muted"}`,children:s.icon}),(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s.name}),(0,r.jsx)(n.Ex,{variant:t?"success":"default",size:"sm",dot:!0,children:t?"Active":"Off"})]},s.key)})}):null}m.propTypes={settings:o().object};var u=t(98500),x=t.n(u),p=t(57250);let b=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat","api-airforce","openvecta","freebuff-web","zenmux-free"]),g=e=>{let s=Number(e||0);return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString()};function h({providers:e}){return e&&0!==e.length?(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{var s;let t=e.color||"#6b7280",a=t.length>7?t:t+"15";return(0,r.jsxs)(x(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,r.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:a},children:(0,r.jsx)(p.A,{src:(s=e.id,`/providers/${s}.${b.has(s)?"svg":"png"}`),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"font-medium",children:[g(e.requests)," requests"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{children:[g(e.tokens)," tokens"]})]}):e.connected?(0,r.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,r.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,r.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,r.jsx)(n.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function f(){let[e,s]=(0,a.useState)(null),[t,i]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||s(e)}).catch(()=>{}).finally(()=>i(!1))},[]),t)?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(l,{data:e}),(0,r.jsx)(n.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,r.jsx)(m,{settings:e?.tokenSaverSettings})}),(0,r.jsx)(n.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,r.jsx)(h,{providers:e?.freeProviders||[]})})]})}h.propTypes={providers:o().arrayOf(o().shape({id:o().string,name:o().string,icon:o().string,color:o().string,requests:o().number,tokens:o().number}))}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{38485:(e,t,s)=>{"use strict";s.d(t,{default:()=>y});var a=s(95155),r=s(12115),n=s(35497),l=s(14051),o=s.n(l);function i({models:e,value:t,onChange:s,compact:r=!1}){let n=function(e){let t={};for(let s of e){let e=s.provider||s.id.split("/")[0]||"other";t[e]||(t[e]=[]),t[e].push(s)}return t}(e);return(0,a.jsxs)("select",{value:t,onChange:e=>s(e.target.value),className:`${r?"h-8 text-xs":"h-9 text-sm"} rounded-lg border border-border-subtle bg-surface-2 px-3 text-text-main focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/30`,children:[(0,a.jsx)("option",{value:"",children:"Select a model..."}),Object.entries(n).map(([e,t])=>(0,a.jsx)("optgroup",{label:e,children:t.map(e=>(0,a.jsx)("option",{value:e.id,children:e.id},e.id))},e))]})}function c({params:e,onChange:t}){let[s,n]=(0,r.useState)(!0),l=(s,a)=>t({...e,[s]:a});return(0,a.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("button",{onClick:()=>n(!s),className:"mb-3 flex w-full items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters"]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${s?"rotate-90":""}`,children:"chevron_right"})]}),s&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,a.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>l("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"Temperature"}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:e.temperature?.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"2",step:"0.05",value:e.temperature??.7,onChange:e=>l("temperature",parseFloat(e.target.value)),className:"w-full accent-primary"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,a.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>l("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"Top P"}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:e.topP?.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"1",step:"0.05",value:e.topP??1,onChange:e=>l("topP",parseFloat(e.target.value)),className:"w-full accent-primary"})]})]})]})}i.propTypes={models:o().arrayOf(o().shape({id:o().string,provider:o().string})),value:o().string,onChange:o().func.isRequired,compact:o().bool},c.propTypes={params:o().shape({systemPrompt:o().string,temperature:o().number,maxTokens:o().number,topP:o().number}).isRequired,onChange:o().func.isRequired};var m=s(62630);function d(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function x(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function u({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,a.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Total: ",x(e.compareLatencyMs)]})]});let r=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),a=s>0?t.slice(0,s):null,r=s>0?t.slice(s+1):t,n=(0,m.PS)(a,r);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,m.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,m.BD)(s);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:d(e.inputTokens)})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:d(e.outputTokens)})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:x(e.latencyMs)})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-warning",children:r})]})]}),e.model&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function p({sessions:e,currentSession:t,onNew:s,onLoad:r,onDelete:l}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat"})]}),0===e.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):(0,a.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:e.map(e=>(0,a.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,a.jsxs)("button",{onClick:()=>r(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,a.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,a.jsx)("button",{onClick:()=>l(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}function h({messages:e,onSend:t,streaming:s}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,a.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,a.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,a.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,a.jsx)(f,{msg:e},e.id))})}function f({msg:e}){let t="user"===e.role,s=e.error;return(0,a.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,a.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),(0,a.jsxs)("p",{className:"whitespace-pre-wrap break-words",children:[e.content,e.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}u.propTypes={stats:o().object,mode:o().string},p.propTypes={sessions:o().array,currentSession:o().string,onNew:o().func.isRequired,onLoad:o().func.isRequired,onDelete:o().func.isRequired},h.propTypes={messages:o().arrayOf(o().shape({id:o().string,role:o().string,content:o().string,model:o().string,streaming:o().bool,error:o().bool})),onSend:o().func,streaming:o().bool};let g="extremerouter.playground.sessions";function b(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function j(e){try{localStorage.setItem(g,JSON.stringify(e))}catch{}}function y(){let[e,t]=(0,r.useState)(!0),[s,l]=(0,r.useState)([]),[o,m]=(0,r.useState)([]),[d,x]=(0,r.useState)(null),[f,y]=(0,r.useState)([]),[v,w]=(0,r.useState)(!1),[k,S]=(0,r.useState)({}),[C,T]=(0,r.useState)("single"),[P,$]=(0,r.useState)([""]),[D,_]=(0,r.useState)({}),[O,E]=(0,r.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1}),[A,z]=(0,r.useState)({}),R=(0,r.useRef)({}),M=(0,r.useRef)(null);(0,r.useEffect)(()=>{(async()=>{m(function(){try{let e=localStorage.getItem(g);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(M.current=s.key)}catch{}try{let e=await fetch("/api/v1/models"),t=((await e.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(t),t.length>0&&$([t[0].id])}catch{}t(!1)})()},[]);let F=(0,r.useCallback)(()=>{f.length>0&&d&&J(d,f),y([]),x(null),z({}),_({})},[f,d]),L=(0,r.useCallback)(e=>{f.length>0&&d&&J(d,f),y(e.messages||[]),x(e.id),e.model&&$([e.model]),e.params&&E(e.params),z({}),_({})},[f,d]),q=(0,r.useCallback)(e=>{let t=o.filter(t=>t.id!==e);m(t),j(t),d===e&&(x(null),y([]))},[o,d]),J=(0,r.useCallback)((e,t)=>{let s=o.map(s=>s.id===e?{...s,messages:t,updatedAt:Date.now()}:s);m(s),j(s)},[o]),B=(0,r.useCallback)(()=>{if(0===f.length)return;let e=d||b(),t={id:e,title:f.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:f,model:P[0],params:O,createdAt:Date.now(),updatedAt:Date.now()},s=o.find(t=>t.id===e)?o.map(s=>s.id===e?{...s,...t}:s):[t,...o];m(s),j(s),x(e)},[f,d,o,P,O]),H=(0,r.useCallback)(async e=>{if(!e.trim()||v)return;let t=[...f,{role:"user",content:e,id:b()}];if(O.systemPrompt&&t.unshift({role:"system",content:O.systemPrompt}),"single"===C){let e=P[0];if(!e)return;let s=b();y([...t.filter(e=>"system"!==e.role),{role:"assistant",content:"",id:s,model:e,streaming:!0}]),w(!0);let a=Date.now(),r=new AbortController;R.current={single:r};try{let n={"Content-Type":"application/json",Accept:"text/event-stream"};M.current&&(n.Authorization=`Bearer ${M.current}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:n,body:JSON.stringify({model:e,messages:t,stream:!0,temperature:O.temperature,max_tokens:O.maxTokens,top_p:O.topP}),signal:r.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));y(t=>t.map(t=>t.id===s?{...t,content:`❌ Error: ${e.error?.message||l.status}`,streaming:!1,error:!0}:t));return}let o=l.body.getReader(),i=new TextDecoder,c="",m="",d=null;for(;;){let{value:e,done:t}=await o.read();if(t)break;let a=(c+=i.decode(e,{stream:!0})).split("\n");for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=e.choices?.[0]?.delta?.content;t&&(m+=t,y(e=>e.map(e=>e.id===s?{...e,content:m}:e))),e.usage&&(d=e.usage)}catch{}}}let x=Date.now()-a;z({model:e,inputTokens:d?.prompt_tokens||0,outputTokens:d?.completion_tokens||0,latencyMs:x}),y(e=>e.map(e=>e.id===s?{...e,streaming:!1}:e))}catch(e){"AbortError"!==e.name?y(t=>t.map(t=>t.id===s?{...t,content:`❌ Error: ${e.message}`,streaming:!1,error:!0}:t)):y(e=>e.map(e=>e.id===s?{...e,streaming:!1}:e))}finally{w(!1),delete R.current.single}}else{let e=P.filter(Boolean);if(0===e.length)return;_({}),w(!0);let s=Date.now(),a={};await Promise.allSettled(e.map(async e=>{let s=new AbortController;R.current[e]=s,a[e]={content:"",streaming:!0,error:null},_({...a});try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};M.current&&(r.Authorization=`Bearer ${M.current}`);let n=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({model:e,messages:t,stream:!0,temperature:O.temperature,max_tokens:O.maxTokens,top_p:O.topP}),signal:s.signal});if(!n.ok){let t=await n.json().catch(()=>({error:{message:`HTTP ${n.status}`}}));a[e]={...a[e],content:`❌ ${t.error?.message||n.status}`,streaming:!1,error:!0},_({...a});return}let l=n.body.getReader(),o=new TextDecoder,i="",c="";for(;;){let{value:t,done:s}=await l.read();if(s)break;let r=(i+=o.decode(t,{stream:!0})).split("\n");for(let t of(i=r.pop()||"",r)){let s=t.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let t=JSON.parse(r),s=t.choices?.[0]?.delta?.content;s&&(c+=s,a[e]={...a[e],content:c,streaming:!0},_({...a}))}catch{}}}a[e]={...a[e],streaming:!1},_({...a})}catch(t){"AbortError"!==t.name?a[e]={...a[e],content:`❌ ${t.message}`,streaming:!1,error:!0}:a[e]={...a[e],streaming:!1},_({...a})}finally{delete R.current[e]}})),z({compareLatencyMs:Date.now()-s,models:e.length}),w(!1)}},[f,v,C,P,O]),I=(0,r.useCallback)(()=>{Object.values(R.current).forEach(e=>e?.abort?.()),w(!1),y(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),_(e=>{let t={};for(let[s,a]of Object.entries(e))t[s]={...a,streaming:!1};return t})},[]);return e?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,a.jsx)(n.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:C,onChange:T,size:"sm"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:v?"stop":"save",onClick:v?I:B,disabled:!v&&0===f.length,children:v?"Stop":"Save"})]})}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,a.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,a.jsx)(p,{sessions:o,currentSession:d,onNew:F,onLoad:L,onDelete:q})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===C?(0,a.jsx)(i,{models:s,value:P[0],onChange:e=>$([e])}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[P.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(i,{models:s,value:e,onChange:e=>{let s=[...P];s[t]=e,$(s)},compact:!0}),P.length>2&&(0,a.jsx)("button",{onClick:()=>$(P.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),P.length<4&&(0,a.jsxs)("button",{onClick:()=>$([...P,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===C?(0,a.jsx)(h,{messages:f,onSend:H,streaming:v,stats:A}):(0,a.jsx)("div",{className:"flex min-w-0 gap-3",children:P.filter(Boolean).map(e=>{let t=D[e];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,a.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,a.jsx)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:t?.content?(0,a.jsxs)("p",{className:`whitespace-pre-wrap text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.content,t.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:v?"Waiting...":"Send a message to compare"})})]},e)})}),(0,a.jsx)(N,{onSend:H,streaming:v,onStop:I}),Object.keys(A).length>0&&(0,a.jsx)(u,{stats:A,mode:C})]}),(0,a.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,a.jsx)(c,{params:O,onChange:E})})]})]})}function N({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,r.useState)(""),o=(0,r.useRef)(null),i=()=>{n.trim()&&!t&&(e(n),l(""),o.current&&(o.current.style.height="auto"))};return(0,a.jsxs)("div",{className:"flex items-end gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[(0,a.jsx)("textarea",{ref:o,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},placeholder:"Send a message... (Enter to send, Shift+Enter for new line)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,a.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,a.jsx)("button",{onClick:i,disabled:!n.trim(),className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})}},51191:(e,t,s)=>{Promise.resolve().then(s.bind(s,38485))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=51191)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{7862:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>K});var a=s(95155),l=s(12115),i=s(73321),n=s(98500),r=s.n(n),o=s(5772),d=s(35497),c=s(88105),m=s(28777),p=s(11059),x=s(53593),u=s(73006);let h=new Map;async function f(e){if(!e?.url||!e?.type)return[];let t=h.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return h.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}function g({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:a=[],type:l="llm",includeLegacyAliases:i=!0}){let n=new Set(a.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let a=`${s}/${t.id}`;r.has(a)||(r.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e}))}if(!i)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||n.has(t)||r.has(s)||(r.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:l||"llm"}))}return o}var y=s(14051),b=s.n(y);let v=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function j({caps:e,selectedLevel:t,onSelect:s}){let[i,n]=(0,l.useState)(!1),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!i)return;let e=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let o=v.filter(t=>"auto"===t.value||"none"!==t.value||e?.thinkingCanDisable!==!1),d=o.find(e=>e.value===t)||o[0];return(0,a.jsxs)("div",{className:"relative",ref:r,children:[(0,a.jsx)("button",{onClick:()=>n(e=>!e),title:`Thinking: ${d.label}${d.hint?` (${d.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==t?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),i&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),o.map(e=>(0,a.jsxs)("button",{onClick:()=>{s(e.value),n(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${e.value===t?"text-primary font-semibold":"text-text-main"}`,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:e.hint})]},e.value))]})]})}function N({model:e,fullModel:t,alias:s,copied:i,onCopy:n,testStatus:r,isCustom:o,isFree:c,onDeleteAlias:m,onTest:p,isTesting:x,onDisable:u,caps:h}){let[f,g]=(0,l.useState)("auto"),y="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0,b=!!h?.reasoning,v="auto"!==f&&"none"!==f?`${t}(${f})`:"none"===f?`${t}(none)`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:y?{color:y}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:v}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(d.nh,{caps:h,colorOverride:"text-text-muted/70",size:12})]})]}),b&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)(j,{caps:h,selectedLevel:f,onSelect:g}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:"Thinking"})]}),p&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:p,disabled:x,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${x?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:x?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>n(v,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function w({modelId:e,fullModel:t,copied:s,onCopy:l,onDeleteAlias:i,onTest:n,testStatus:r,isTesting:o}){let d="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:n,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function k({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:i,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,l.useState)(""),[f,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[j,N]=(0,l.useState)(null),[C,S]=(0,l.useState)({}),$=async t=>{if(!j){N(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();S(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{S(e=>({...e,[t]:"error"}))}finally{N(null)}}},A=g({customModels:i,modelAliases:s,providerAlias:e,type:"llm"}),T=async()=>{if(!u.trim()||f)return;let e=u.trim();if(A.some(t=>t.id===e))return void alert("Model already exists for this provider.");y(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{y(!1)}},E=async()=>{if(b)return;let e=p.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let e of a){let t=e.id||e.name||e.model;t&&(A.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},P=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:T,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:E,disabled:!P||b,children:b?"Importing...":"Import from /models"})]}),!P&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),A.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:A.map(({id:s,alias:l,source:i})=>(0,a.jsx)(w,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===i?m(s):o(l),onTest:p.length>0?()=>$(s):void 0,testStatus:C[s],isTesting:j===s},`${i}-${e}/${s}`))})]})}N.propTypes={model:b().shape({id:b().string.isRequired}).isRequired,fullModel:b().string.isRequired,alias:b().string,copied:b().string,onCopy:b().func.isRequired,testStatus:b().oneOf(["ok","error"]),isCustom:b().bool,isFree:b().bool,onDeleteAlias:b().func,onTest:b().func,isTesting:b().bool,onDisable:b().func,caps:b().object},k.propTypes={providerStorageAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,modelAliases:b().object.isRequired,customModels:b().arrayOf(b().object),copied:b().string,onCopy:b().func.isRequired,onDeleteAlias:b().func.isRequired,onAddCustomModel:b().func.isRequired,onDeleteCustomModel:b().func.isRequired,connections:b().arrayOf(b().shape({id:b().string,isActive:b().bool})).isRequired,isAnthropic:b().bool};var C=s(70217);function S({until:e}){let[t,s]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function $({connection:e,proxyPools:t,isOAuth:s,isFirst:i,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,w=N?j.get(N):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!N||k,T=w?`Pool: ${w.name}`:N?`Pool: ${N} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",E=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",P="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let O=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";w?.isActive===!0?I="success":(N||k)&&(I="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let z=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},D=e.authType||(s?"oauth":"apikey"),U="oauth"===D,_="cookie"===D,R=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(U?"OAuth Account":_?"Cookie Account":"API Key"),M=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[L,q]=(0,l.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let F="unavailable"!==e.testStatus||L?e.testStatus:"active",J=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:r,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:_?"cookie":U?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:R}),M&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:M}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(0,C.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:U?"OAuth":_?"Cookie":"API Key"}),A&&(0,a.jsx)(d.Ex,{variant:I,size:"sm",children:"Proxy"}),L&&!1!==e.isActive&&(0,a.jsx)(S,{until:K}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),J()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:J()})]}),A&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),P&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:P}),O&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>z("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>z(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(d.m_,{text:E,children:(0,a.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}S.propTypes={until:b().string.isRequired},$.propTypes={connection:b().shape({id:b().string,name:b().string,email:b().string,displayName:b().string,modelLockUntil:b().string,testStatus:b().string,isActive:b().bool,lastError:b().string,priority:b().number,globalPriority:b().number}).isRequired,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string,proxyUrl:b().string,noProxy:b().string,isActive:b().bool})),isOAuth:b().bool.isRequired,isFirst:b().bool.isRequired,isLast:b().bool.isRequired,onMoveUp:b().func.isRequired,onMoveDown:b().func.isRequired,onToggleActive:b().func.isRequired,onUpdateProxy:b().func,onEdit:b().func.isRequired,onDelete:b().func.isRequired,oneByOneStatus:b().shape({state:b().string,error:b().string}),autoPing:b().shape({on:b().bool,onToggle:b().func,provider:b().string})};let A=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function T({isOpen:e,provider:t,providerName:s,isCompatible:i,isAnthropic:n,authType:r,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===r,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",N=b?"grok-web"===t?"sso=xxxxx... or just the raw value":"chatglm-cn"===t?"Paste your full chatglm.cn cookies, or just the chatglm_refresh_token value (eyJhbGc...)":"eyJhbGciOi...":v?"xai-...":"",w="azure"===t,k="cloudflare-ai"===t,C=c.Q2?.[t]?.regions||null,S=c.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,E]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[P,O]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,z]=(0,l.useState)({accountId:""}),[D,U]=(0,l.useState)(S),[_,R]=(0,l.useState)(!1),[M,L]=(0,l.useState)(null),[q,K]=(0,l.useState)(!1),[F,J]=(0,l.useState)("single"),[W,B]=(0,l.useState)(""),[H,G]=(0,l.useState)(null),V=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:w?{azureEndpoint:P.azureEndpoint,apiVersion:P.apiVersion,deployment:P.deployment,organization:P.organization}:k?{accountId:I.accountId}:C&&D?{region:D}:void 0,Q=async()=>{R(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})}),s=await e.json();L(s.valid?"success":"failed")}catch{L("failed")}finally{R(!1)}},Z=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!i||$.defaultModel.trim())){K(!0);try{let e=!1;try{R(!0),L(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,L(e?"success":"failed")}catch{L("failed")}finally{R(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:i?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},X=async()=>{let e=W.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),G(null);let s=0,a=0;for(let l=0;l<e.length;l++){let i=e[l].split("|"),n=i.length>=2?i.slice(1).join("|").trim():i[0].trim(),r=i.length>=2?i[0].trim():"Key",o=`${r} ${l+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:n,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),G({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{J("single"),G(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{J("bulk"),G(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:A,value:W,onChange:e=>B(e.target.value)}),H&&(0,a.jsxs)("div",{className:`text-sm font-medium ${H.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",H.success," added",H.failed>0?`, ✗ ${H.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:X,fullWidth:!0,disabled:q||!W.trim(),children:q?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>E({...$,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>E({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:_||q,variant:"secondary",children:_?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[b?(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:j}),(0,a.jsx)("textarea",{value:$.apiKey,onChange:e=>E({...$,apiKey:e.target.value}),placeholder:N,rows:5,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:"w-full rounded-lg border border-border bg-input px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary font-mono resize-y"})]}):(0,a.jsx)(d.pd,{label:j,type:"password",value:$.apiKey,onChange:e=>E({...$,apiKey:e.target.value}),placeholder:N,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:!$.apiKey||_||q,variant:"secondary",children:_?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),C&&(0,a.jsx)(d.l6,{label:"Region",value:D,onChange:e=>U(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),i&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>E({...$,defaultModel:e.target.value}),placeholder:n?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,a.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),i&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>z({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:P.azureEndpoint,onChange:e=>O({...P,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:P.deployment,onChange:e=>O({...P,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:P.apiVersion,onChange:e=>O({...P,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:P.organization,onChange:e=>O({...P,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>E({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>E({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:q||!y&&(!$.name||!$.apiKey)||i&&!$.defaultModel.trim()||w&&(!P.azureEndpoint||!P.deployment||!P.organization)||k&&!I.accountId,children:q?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function E({isOpen:e,node:t,onSave:s,onClose:i,isAnthropic:n}){let[r,o]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(n?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,n]);let v=async()=>{if(r.name.trim()&&r.prefix.trim()&&r.baseUrl.trim()){m(!0);try{let e={name:r.name,prefix:r.prefix,baseUrl:r.baseUrl};n||(e.apiType=r.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:r.baseUrl,apiKey:p,type:n?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${n?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:r.name,onChange:e=>o({...r,name:e.target.value}),placeholder:`${n?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:r.prefix,onChange:e=>o({...r,prefix:e.target.value}),placeholder:n?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!n&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:r.apiType,onChange:e=>o({...r,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:r.baseUrl,onChange:e=>o({...r,baseUrl:e.target.value}),placeholder:n?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${n?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!p||f||!r.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!r.name.trim()||!r.prefix.trim()||!r.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function P({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:i,onClose:n}){let[r,o]=(0,l.useState)(""),[c,m]=(0,l.useState)(null),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(r.trim());if(e){m("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),x(a.error||"")}catch(e){m("error"),x(e.message)}}},y=async()=>{let e=f(r.trim());if(e&&!u){h(!0);try{await i(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:r,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!r.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(r.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:p||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!r.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}T.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},E.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},P.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired};let O=`[
|
|
4
|
+
{
|
|
5
|
+
"accessToken": "eyJhbGc...",
|
|
6
|
+
"refreshToken": "rt_...",
|
|
7
|
+
"idToken": "eyJhbGc...",
|
|
8
|
+
"email": "user@example.com"
|
|
9
|
+
}
|
|
10
|
+
]`;function I({isOpen:e,onClose:t,onSuccess:s}){let[i,n]=(0,l.useState)(""),[r,o]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),h=()=>{r||(n(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=i.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,u.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{o(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.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:O,value:i,onChange:e=>n(e.target.value),disabled:r}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:r||!i.trim(),children:r?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:r,children:(0,u.Tl)("Close")})]})]})})}I.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let z={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function D({providerId:e}){let[t,s]=(0,l.useState)(null);if((0,l.useEffect)(()=>{let t;if(!e)return;let a=!1,l=async()=>{try{let t=await fetch(`/api/providers/${e}/vault-pool`,{cache:"no-store"});if(!t.ok)return;let l=await t.json();a||s(l)}catch{}};l();let i=()=>{t||(t=setInterval(l,1e4))},n=()=>{t&&(clearInterval(t),t=null)},r=()=>document.hidden?n():i();return i(),document.addEventListener("visibilitychange",r),()=>{a=!0,n(),document.removeEventListener("visibilitychange",r)}},[e]),!t||!t.hasPool)return null;let i=z[t.status]||z.healthy;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,a.jsx)(d.Ex,{variant:i.variant,size:"sm",icon:i.icon,children:i.label}),(0,a.jsxs)(d.Ex,{variant:"info",size:"sm",icon:"key",children:[t.total," pool keys"]}),(0,a.jsxs)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[t.available," available"]}),t.rateLimited>0&&(0,a.jsxs)(d.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[t.rateLimited," cooling"]})]})}function U({connectionId:e,cookie:t,currentPlan:s="free",onPlanChanged:i}){let n,[r,o]=(0,l.useState)([]),[c,m]=(0,l.useState)(s),[p,x]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),v=(n=String(t||"").match(/ctoken=([^;]+)/),n?.[1]||"");(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{cache:"no-store"});if(!t.ok)return;let s=await t.json();!e&&Array.isArray(s.plans)&&o(s.plans)}catch{}})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(!v)return;let e=!1;return h(!0),(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ctoken:v})});if(!t.ok)return;let a=await t.json();!e&&a.planKey&&(x(a.planKey),s&&"free"!==s||m(a.planKey))}catch{}finally{e||h(!1)}})(),()=>{e=!0}},[v,s]);let j=async t=>{let a=t.target.value;m(a),g(!0),b(null);try{if(!(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:a}})})).ok)throw Error("Failed to save plan");i?.(a)}catch(e){b(e.message),m(s)}finally{g(!1)}},N=p&&p===c;return 0===r.length?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsx)("select",{value:c,onChange:j,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,a.jsxs)("option",{value:c,children:[c," (loading…)"]})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:c,onChange:j,disabled:f,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:r.map(e=>(0,a.jsxs)("option",{value:e.planKey,children:[e.name," (",e.modelCount," models",e.price>0?`, $${e.price}/mo`:", free",")"]},e.planKey))}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),u&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Detecting…"}),N&&!u&&(0,a.jsx)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),f&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Saving…"}),y&&(0,a.jsx)(d.Ex,{variant:"error",size:"sm",icon:"error",children:y})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:p?`Plan auto-detected from your ctoken: ${p}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}function _({providerId:e,hours:t=24}){let[s,i]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e)return;let s=!1,a=async()=>{try{let a=await fetch(`/api/providers/${e}/health-timeline?hours=${t}`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();s||i(l.timeline||[])}catch{}};a();let l=setInterval(a,6e4),n=()=>{document.hidden?clearInterval(l):(a(),setInterval(a,6e4))};return document.addEventListener("visibilitychange",n),()=>{s=!0,clearInterval(l),document.removeEventListener("visibilitychange",n)}},[e,t]),!s)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===s.length||s.every(e=>0===e.ok&&0===e.err))return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let n=s.length,r=s.reduce((e,t)=>e+t.ok+t.err,0),o=s.reduce((e,t)=>e+t.err,0),d=Math.max(...s.map(e=>e.ok+e.err),1),c=Math.max(...s.map(e=>e.latency),1),m=Math.max(6*n,120),p=Math.max(m/n-1,2),x=s.filter(e=>e.latency>0).map((e,t)=>{let s=t/Math.max(n-1,1)*m,a=32-e.latency/c*19.2-2;return`${s.toFixed(1)},${a.toFixed(1)}`}),u=x.length>1?`M${x.join(" L")}`:"",h=r>0?Math.round((r-o)/r*100):null;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==h&&(0,a.jsxs)("span",{className:`text-[10px] font-bold ${h>=90?"text-success":h>=70?"text-warning":"text-danger"}`,children:[h,"% success \xb7 ",r," requests \xb7 ",o," errors"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,a.jsxs)("svg",{width:m,height:32,className:"overflow-visible",children:[s.map((e,t)=>{let s=m/n*t;if(0===e.ok+e.err)return null;let l=e.ok/d*32,i=e.err/d*32;return(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:s,y:32-l-i,width:p,height:i,rx:.5,className:"fill-danger/60"}),(0,a.jsx)("rect",{x:s,y:32-l,width:p,height:l,rx:.5,className:"fill-success/60"})]},t)}),u&&(0,a.jsx)("path",{d:u,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}function R({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,n]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/freebuff-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||n(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t)return null;let r=t.expires?new Date(t.expires):null,o=r?Math.ceil((r.getTime()-Date.now())/864e5):null,c=null!==o&&o<=3;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[t.image?(0,a.jsx)("img",{src:t.image,alt:t.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"F"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),r&&(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",r.toLocaleDateString()]}),null!==o&&(0,a.jsxs)(d.Ex,{variant:c?"warning":"success",size:"sm",children:[o,"d left"]})]})]})]})}function M({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,n]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/v0-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||n(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t?.profile&&!t?.balance)return null;let{profile:r,balance:o}=t;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[r?.image?(0,a.jsx)("img",{src:r.image,alt:r.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:r?.name?.charAt(0)?.toUpperCase()||"v"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:r?.name||"User"}),r?.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:r.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[r?.plan&&(0,a.jsx)(d.Ex,{variant:"v0-free"===r.plan?"default":"primary",size:"sm",children:"v0-free"===r.plan?"Free":r.plan}),r?.teamName&&(0,a.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:r.teamName})]})]}),o&&(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,a.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:o.remaining}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",o.total||"?"]})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}var L=s(67098);let q={claude:"claudeAutoPing",codex:"codexAutoPing"};function K(){let e,t,s,n=(0,i.useParams)(),h=(0,i.useRouter)(),y=n.id,{getCaps:b}=(0,x.y)(),{markSeen:v}=(0,L.P)("providers");(0,l.useEffect)(()=>{y&&v(y)},[y,v]);let[j,w]=(0,l.useState)([]),[C,S]=(0,l.useState)(!0),[A,O]=(0,l.useState)(null),[z,K]=(0,l.useState)([]),[F,J]=(0,l.useState)(!1),[W,B]=(0,l.useState)(!1),[H,G]=(0,l.useState)(!1),[V,Q]=(0,l.useState)(""),[Z,X]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(!1),[ei,en]=(0,l.useState)(null),[er,eo]=(0,l.useState)({}),[ed,ec]=(0,l.useState)([]),[em,ep]=(0,l.useState)(!1),[ex,eu]=(0,l.useState)({}),[eh,ef]=(0,l.useState)(""),[eg,ey]=(0,l.useState)(()=>new Set),[eb,ev]=(0,l.useState)(""),[ej,eN]=(0,l.useState)(!1),[ew,ek]=(0,l.useState)(!1),[eC,eS]=(0,l.useState)([]),[e$,eA]=(0,l.useState)("__none__"),[eT,eE]=(0,l.useState)(!1),[eP,eO]=(0,l.useState)(null),[eI,ez]=(0,l.useState)(""),[eD,eU]=(0,l.useState)("auto"),[e_,eR]=(0,l.useState)({enabled:!1,connections:{}}),[eM,eL]=(0,l.useState)([]),[eq,eK]=(0,l.useState)([]),[eF,eJ]=(0,l.useState)([]),[eW,eB]=(0,l.useState)(null),[eH,eG]=(0,l.useState)(!1),[eV,eQ]=(0,l.useState)(!1),[eZ,eX]=(0,l.useState)(!1),[eY,e0]=(0,l.useState)(null),[e1,e2]=(0,l.useState)({}),[e5,e3]=(0,l.useState)(null),e4=(0,l.useRef)(!1),[e6,e8]=(0,l.useState)(!1),{copied:e7,copy:e9}=(0,p.C)(),te="ag_risk_confirmed",tt=()=>{J(!0)},ts=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(te)?eG(!0):tr?tt():(Q(""),G(!0))},ta=()=>{Q(""),G(!0)},tl=()=>{tr?ts():ta()},ti=A?{id:A.id,name:A.name||("anthropic-compatible"===A.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===A.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===A.type?"AC":"OC",apiType:A.apiType,baseUrl:A.baseUrl,type:A.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],tn=ti?.authModes||[],tr=(!!c.zN[y]||!!c.IS[y]||tn.includes("oauth"))&&ti?.hasOAuth!==!1,to=!!c.fg[y]||tn.includes("apikey")||ti?.hasOAuth===!1,td=!!c.IS[y]?.noAuth,tc=(0,m.KC)(y),tm=(0,c.wG)(y),tp=(0,c.mq)(y),tx=(0,c.gb)(y),tu=tp||tx,th=!tu&&tr&&to,tf="xai"===y?"Grok Build OAuth":"OAuth",tg="xai"===y?"xAI API Key":"API Key",ty=c.Q2[y]?.thinkingConfig||c.s9.extended,tb=tu?y:tm,tv=tu?A?.prefix||y:tm,tj=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tb)}`,{cache:"no-store"}),t=await e.json();e.ok&&eJ(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tb]),tN=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tb,ids:[e]})})).ok&&await tj()}catch(e){console.log("Error disabling model:",e)}},tw=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tb)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tj()}catch(e){console.log("Error enabling model:",e)}},tk=async e=>{e.length&&eB({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eB(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tb,ids:e})})).ok&&await tj()}catch(e){console.log("Error disabling all models:",e)}}})},tC=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tb)}`,{method:"DELETE"})).ok&&await tj()}catch(e){console.log("Error enabling all models:",e)}},tS=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&eo(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),t$=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ec(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eK(e.models)}).catch(()=>{})},[y]);let tA=(0,l.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),i=await t.json(),n=await s.json(),r=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===y);w(e)}s.ok&&K(n.proxyPools||[]);let o=(r.providerStrategies||{})[y]||{};eO(o.fallbackStrategy||null),ez(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(r.providerThinking||{})[y]||{};eU(d.mode||"auto");let c=q[y],m=c&&r[c]||{};if(eR({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===y)||null;if(!e&&tu)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===y)||null))break}O(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,tu]),tT=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(O(s.node),await tA(),es(!1))}catch(e){console.log("Error updating provider node:",e)}},tE=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...a};0===Object.keys(l).length?delete i[y]:i[y]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},tP=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[y]={mode:e}:delete s[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tO=async e=>{let t=q[y];if(t){eR(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{tA(),tS(),t$(),tj()},[tA,tS,t$,tj]),(0,l.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eL)},[y]);let tI=async(e,t,s=tm)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tS();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tz=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tS()}catch(e){console.log("Error deleting alias:",e)}},tD=async(e,t="llm",s=tb)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await t$(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tU=async(e,t="llm",s=tb)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await t$(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t_=async()=>{if(e6)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e8(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let l=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");ed.some(e=>e.providerAlias===tb&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(er).includes(`${tb}/${s}`)||(await tD(s,"llm",tb),l+=1)}0===l?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${l} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e8(!1)}},tR=async()=>{if(eV||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));e4.current=!1,eQ(!0),eX(!1),e0(null),e2(e),e3({total:j.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<j.length;e+=1){if(e4.current){e3({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];e0(a.id),e2(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:s+=1,e2(e=>({...e,[a.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){s+=1,e2(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e3({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e0(null),eQ(!1),eX(!1),e4.current=!1}},tM=async e=>{eB({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eB(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&w(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tL=()=>{tA(),J(!1)},tq=async e=>{Q("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tA(),G(!1);return}Q(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Q("Failed to save connection")}},tK=async e=>{try{(await fetch(`/api/providers/${ei.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tA(),ee(!1))}catch(e){console.log("Error updating connection:",e)}},tF=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&w(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tJ=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],w(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tA()}},tW=j.filter(e=>eC.includes(e.id)),tB=j.length>0&&eC.length===j.length;(0,l.useEffect)(()=>{eS(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tW.length)return;let e=new Set(tW.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=z.find(e=>e.id===t);return s?.name}})();let tH=()=>{eT||el(!1)},tG=async e=>{eE(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tA(),el(!1)}finally{eE(!1)}},tV=e=>tG(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tQ=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:j.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,eC.includes(s)),onChange:()=>{var t;return t=e.id,void eS(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)($,{connection:e,proxyPools:z,isOAuth:tr,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>tJ(t,t-1),onMoveDown:()=>tJ(t,t+1),onToggleActive:t=>tF(e.id,t),autoPing:q[y]&&"oauth"===e.authType?{on:!0===e_.connections[e.id],onToggle:t=>{var s;return s=e.id,void tO({...e_,connections:{...e_.connections,[s]:t}})},provider:y}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&w(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{en(e),ee(!0)},onDelete:()=>tM(e.id),oneByOneStatus:e1[e.id]||null})})]},e.id)})}),tZ=z.filter(e=>!0===e.isActive),tX=(0,a.jsx)(d.aF,{isOpen:ea,onClose:tH,title:`Apply Proxy (${j.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=z.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tG(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eT||0===tZ.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tV(null),disabled:eT,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),z.map(e=>(0,a.jsxs)("button",{onClick:()=>tV(e.id),disabled:eT||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eT&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tH,variant:"ghost",fullWidth:!0,disabled:eT,children:"Cancel"})]})}),tY=async e=>{if(!eg.has(e)){ey(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tb}/${e}`})}),s=await t.json();eu(t=>({...t,[e]:s.ok?"ok":"error"})),ef(s.ok?"":s.error||"Model not reachable")}catch{eu(t=>({...t,[e]:"error"})),ef("Network error")}finally{ey(t=>{let s=new Set(t);return s.delete(e),s})}}},t0=async e=>{ej||0===e.length||(eN(!0),ef(""),await Promise.all(e.map(e=>tY(e))),eN(!1))};return C?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):ti?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${ti.color}15`},children:em?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:ti.color},children:ti.textIcon||ti.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tp&&ti.apiType?"responses"===ti.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tx?"/providers/anthropic-m.png":`/providers/${ti.id}.png`,alt:ti.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ep(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:ti.name}),(ti.notice?.apiKeyUrl||ti.notice?.signupUrl||ti.website)&&(0,a.jsxs)("a",{href:ti.notice?.apiKeyUrl||ti.notice?.signupUrl||ti.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),ti.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),ti.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:ti.deprecationNotice})]}),ti.notice?.text&&!ti.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-info shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:ti.notice.text}),ti.notice.apiKeyUrl&&(0,a.jsx)("a",{href:ti.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 →"})]}),tu&&A&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tx?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tx?"Messages API":"responses"===A.apiType?"Responses API":"Chat Completions"," \xb7 ",(A.baseUrl||"").replace(/\/$/,""),"/",tx?"messages":"responses"===A.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{Q(""),G(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>es(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eB({title:"Delete Compatible Node",message:`Delete this ${tx?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eB(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),td?(0,a.jsx)(d.gw,{providerId:y}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsx)(D,{providerId:y}),"freebuff-web"===y&&j.length>0&&(0,a.jsx)(R,{connectionId:j[0].id}),"v0-vercel-web"===y&&j.length>0&&(0,a.jsx)(M,{connectionId:j[0].id})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&z.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>el(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[eC.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eC.length;0!==e&&eB({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eB(null);let e=0,t=[...eC];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}w(e=>e.filter(e=>!t.includes(e.id))),eS([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eC.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tR,disabled:eV,children:eV?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eV&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eV&&(e4.current=!0,eX(!0))},disabled:eZ,children:eZ?"Stopping...":"Stop"})]}),ty&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Thought Level"}),(0,a.jsx)("select",{value:eD,onChange:e=>{var t;eU(t=e.target.value),tP(t)},className:"text-xs px-2 py-1 border border-border rounded-md bg-background focus:outline-none focus:border-primary",children:ty.options.map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eP,onChange:e=>{let t=e?"round-robin":null,s=e?eI||"1":eI;e&&!eI&&ez("1"),eO(t),tE(t,s)}}),"round-robin"===eP&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eI,onChange:e=>{var t;ez(t=e.target.value),tE("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),"zenmux-free"===y&&j.length>0&&(0,a.jsx)(U,{connectionId:j[0].id,cookie:j[0].apiKey||"",currentPlan:j[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:()=>{tA()}})]})]}),0===j.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tr?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),th&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tf," or ",tg,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:th?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ts,children:tf}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:ta,children:tg})]}):(0,a.jsxs)(a.Fragment,{children:[!tu&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tl,children:tu?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[e5&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",e5.total]}),(0,a.jsxs)("span",{children:["Completed: ",e5.completed]}),(0,a.jsxs)("span",{children:["Passed: ",e5.passed]}),(0,a.jsxs)("span",{children:["Failed: ",e5.failed]}),e5.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eV&&eY&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===eY)?.name||eY]})]})}),j.length>0&&(0,a.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,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:tB,onChange:()=>{tB?eS([]):eS(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tQ,!tu&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),th?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ts,className:"w-full sm:w-auto",children:tf}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:ta,className:"w-full sm:w-auto",children:tg})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tl,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsx)(d.Zp,{children:(0,a.jsx)("div",{className:"py-1",children:(0,a.jsx)(_,{providerId:y})})}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tu&&(e=[...tc,...eq.filter(e=>!tc.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eF.includes(e)),t=eb.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eF.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tC,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tk(e),children:"Disable All"}),(j.length>0||td)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:ej?"progress_activity":"play_arrow",onClick:()=>t0(s),disabled:ej,children:ej?"Testing...":`Test All (${s.length})`})]}))]}),(0,a.jsx)("div",{className:"sm:max-w-xs",children:(0,a.jsx)(d.pd,{type:"search",placeholder:"Search models...",value:eb,onChange:e=>ev(e.target.value),className:"w-full"})})]}),!!eh&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:eh}),(()=>{let e,t,s;if(tu)return(0,a.jsx)(k,{providerStorageAlias:tb,providerDisplayAlias:tv,modelAliases:er,customModels:ed,copied:e7,onCopy:e9,onSetAlias:tI,onDeleteAlias:tz,onAddCustomModel:e=>tD(e,"llm",tb),onDeleteCustomModel:e=>tU(e,"llm",tb),connections:j,isAnthropic:tx});let l=[...tc,...eq.filter(e=>!tc.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),i=new Set(eF),n=l.filter(e=>!i.has(e.id)),r=l.filter(e=>i.has(e.id)),o=g({customModels:ed,modelAliases:er,providerAlias:tb,builtInModels:tc,type:"llm"}),d=eb.trim().toLowerCase(),c=(e,t="")=>!d||e.toLowerCase().includes(d)||String(t).toLowerCase().includes(d),p=n.filter(e=>c(e.id,e.name)),x=o.filter(e=>c(e.id,e.name));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[x.map(e=>(0,a.jsx)(N,{model:{id:e.id,name:e.name},fullModel:`${tv}/${e.id}`,alias:e.alias,copied:e7,onCopy:e9,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tU(e.id,"llm",tb):tz(e.alias)},testStatus:ex[e.id],onTest:j.length>0||td?()=>tY(e.id):void 0,isTesting:eg.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tb}/${e.id}`,s=`${y}/${e.id}`,l=Object.entries(er).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(N,{model:e,fullModel:`${tv}/${e.id}`,alias:l,copied:e7,onCopy:e9,onSetAlias:t=>tI(e.id,t,tb),onDeleteAlias:()=>tz(l),testStatus:ex[e.id],onTest:j.length>0||td?()=>tY(e.id):void 0,isTesting:eg.has(e.id),isFree:e.isFree,onDisable:()=>tN(e.id),caps:b(`${y}/${e.id}`)},e.id)}),eb.trim()&&0===p.length&&0===x.length&&(0,a.jsxs)("p",{className:"w-full text-center text-sm text-text-muted py-4",children:["No models match “",eb,"”"]}),(0,a.jsxs)("button",{onClick:()=>ek(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&j.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:t_,disabled:e6,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-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e6?{animation:"spin 1s linear infinite"}:void 0,children:e6?"progress_activity":"download"}),e6?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eM.length>0&&(e=new Set([...Object.values(er),...o.map(e=>e.fullModel)]),t=new Set(tc.map(e=>e.id)),0===(s=eM.filter(s=>!e.has(`${tb}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tD(e.id,"llm",tb)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),r.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(e=>(0,a.jsxs)("button",{onClick:()=>tw(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tX,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:F,providerInfo:ti,onSuccess:tL,onClose:()=>J(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:F,onSuccess:tL,onClose:()=>J(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:F,providerInfo:ti,onSuccess:tL,onClose:()=>J(!1)}):(0,a.jsx)(d.LF,{isOpen:F,provider:y,providerInfo:ti,onSuccess:tL,onClose:()=>J(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:W,onSuccess:()=>{tA(),B(!1)},onClose:()=>B(!1)}),(0,a.jsx)(T,{isOpen:H,provider:y,providerName:ti.name,isCompatible:tu,isAnthropic:tx,authType:ti?.authType,authHint:ti?.authHint,website:ti?.website,proxyPools:z,error:V,onSave:tq,onBulkDone:tA,onClose:()=>{Q(""),G(!1)}}),(0,a.jsx)(d.wI,{isOpen:Y,connection:ei,proxyPools:z,onSave:tK,onClose:()=>ee(!1)}),tu&&(0,a.jsx)(E,{isOpen:et,node:A,onSave:tT,onClose:()=>es(!1),isAnthropic:tx}),!tu&&(0,a.jsx)(P,{isOpen:ew,providerAlias:tb,providerDisplayAlias:tv,onSave:async e=>{await tD(e,"llm",tb),ek(!1)},onClose:()=>ek(!1)}),"codex"===y&&(0,a.jsx)(I,{isOpen:Z,onClose:()=>X(!1),onSuccess:tA}),(0,a.jsx)(d.uo,{isOpen:eH,onClose:()=>eG(!1),onConfirm:()=>{(window.localStorage.setItem(te,"true"),eG(!1),tr)?tt():ta()},title:"Risk Notice",message:ti?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eW,onClose:()=>eB(null),onConfirm:eW?.onConfirm,title:eW?.title||"Confirm",message:eW?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,7862))}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{34695:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>T});var a=s(95155),r=s(12115),i=s(98500),n=s.n(i),l=s(35497),o=s(90620),d=s(88105),c=s(65921),p=s(38003),m=s(67098),h=s(14051),u=s.n(h),x=s(57250);let g=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat","api-airforce","openvecta","freebuff-web","zenmux-free"]);function f({providerId:e,provider:t,stats:s,onToggle:r,isNoAuth:i=!1,comingSoon:o=!1,isNew:c=!1}){let p=e.startsWith(d.JH),m=e.startsWith(d.DI),{connected:h,error:u,errorCode:b,errorTime:v,allDisabled:y}=s;return(0,a.jsxs)("div",{className:"group relative flex items-center justify-between gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsxs)(n(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(x.A,{src:p?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":m?"/providers/anthropic-m.png":`/providers/${t.id}.${g.has(t.id)?"svg":"png"}`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h3",{className:"truncate text-sm font-semibold text-text-main",children:[t.name,c&&(0,a.jsx)("span",{className:"ml-1.5 inline-flex items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[10px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:[y?(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):i&&0===h&&0===u?(0,a.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):h>0?(0,a.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}):null,u>0&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:b?`${u} Error (${b})`:`${u} Error`}),0===h&&0===u&&!i&&0===s.total&&(0,a.jsx)("span",{className:"text-text-muted",children:"No connections"}),o&&(0,a.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Coming Soon"]})}),p&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),m&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"}),v&&(0,a.jsx)("span",{className:"text-text-muted",children:v})]})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&r&&(0,a.jsx)("div",{className:"opacity-60 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!!y)},children:(0,a.jsx)(l.lM,{size:"sm",checked:!y,onChange:()=>{}})})})]})}function b({title:e,icon:t,count:s,connectedCount:r,isExpanded:i,onToggle:n,isSearching:o,onTestAll:d,testingMode:c,testModeKey:p,children:m,hasContent:h=!0,emptyTitle:u="No providers in this category",emptyDescription:x="Providers you add will appear here."}){let g=i||o;return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex items-center gap-2 text-lg font-semibold leading-tight text-text-main transition-colors hover:text-primary","aria-expanded":g,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] transition-transform ${g?"rotate-90":""}`,children:"chevron_right"}),e,(0,a.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:["(",s,")"]})]}),d&&h&&(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:c===p?"progress_activity":"play_arrow",onClick:d,disabled:!!c,className:c===p?"animate-pulse":"",children:c===p?"Testing...":"Test All"})]}),g&&(h?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:m}):(0,a.jsx)(l.pp,{icon:t||"dns",title:u,description:x}))]})}f.propTypes={providerId:u().string.isRequired,provider:u().shape({id:u().string,name:u().string,color:u().string,textIcon:u().string,apiType:u().string}).isRequired,stats:u().shape({connected:u().number,error:u().number,total:u().number,errorCode:u().string,errorTime:u().string,allDisabled:u().bool}).isRequired,onToggle:u().func,isNoAuth:u().bool,comingSoon:u().bool},b.propTypes={title:u().string.isRequired,icon:u().string,count:u().number.isRequired,connectedCount:u().number,isExpanded:u().bool.isRequired,onToggle:u().func.isRequired,isSearching:u().bool,onTestAll:u().func,testingMode:u().string,testModeKey:u().string,children:u().node,hasContent:u().bool,emptyTitle:u().string,emptyDescription:u().string};let v={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function y({results:e}){if(e.error&&!e.results)return(0,a.jsxs)("div",{className:"py-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:s}=e,r=e.results||[],i=v[s]||s;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,a.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[i," Test"]}),(0,a.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,a.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,a.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,a.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,a.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,a.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,a.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}function j({totalProviders:e,connectedProviders:t,errorCount:s,onTestAll:r,testingMode:i}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-brand border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"dns"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:e}),(0,a.jsx)("span",{className:"text-text-muted",children:"providers"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-success"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:t}),(0,a.jsx)("span",{className:"text-text-muted",children:"connected"})]}),s>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-danger"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:s}),(0,a.jsx)("span",{className:"text-text-muted",children:"errors"})]})]}),r&&(0,a.jsx)(l.$n,{size:"sm",variant:"primary",icon:"all"===i?"progress_activity":"bolt",onClick:r,disabled:!!i,className:"all"===i?"animate-pulse":"",children:"all"===i?"Testing All...":"Test All Providers"})]})}y.propTypes={results:u().shape({mode:u().string,results:u().array,summary:u().shape({total:u().number,passed:u().number,failed:u().number}),error:u().string}).isRequired},j.propTypes={totalProviders:u().number,connectedProviders:u().number,errorCount:u().number,onTestAll:u().func,testingMode:u().string};let N={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},w=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function C({variant:e,isOpen:t,onClose:s,onCreated:i}){let n=N[e],o=()=>({name:"",prefix:"",...n.hasApiType?{apiType:"chat"}:{},baseUrl:n.defaultBaseUrl}),[d,c]=(0,r.useState)(o),[p,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),[x,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{n.hasApiType?c(e=>({...e,baseUrl:n.defaultBaseUrl})):t&&(y(null),u(""),g(""))},[n.hasApiType?d.apiType:t]);let j=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...n.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:n.type})}),t=await e.json();e.ok&&(i(t.node),c(o()),u(""),y(null))}catch(e){console.log(`Error creating ${n.errorLabel} node:`,e)}finally{m(!1)}}},k=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:n.type,modelId:x.trim()||void 0})}),t=await e.json();y(t)}catch{y({valid:!1,error:"Network error"})}finally{b(!1)}};return(0,a.jsx)(l.aF,{isOpen:t,title:n.title,onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(l.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:n.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,a.jsx)(l.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:n.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),n.hasApiType&&(0,a.jsx)(l.l6,{label:"API Type",options:w,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,a.jsx)(l.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:n.defaultBaseUrl,hint:n.baseUrlHint}),(0,a.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>u(e.target.value)}),(0,a.jsx)(l.pd,{label:"Model ID (optional)",value:x,onChange:e=>g(e.target.value),placeholder:n.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,a.jsx)(l.$n,{onClick:k,disabled:!h||f||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:f?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,method:s}=v;return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,a.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function k(e,t){return e?.hasOAuth===!1?"apikey":t}function T(){let e,[t,s]=(0,r.useState)([]),[i,n]=(0,r.useState)([]),[h,u]=(0,r.useState)(!0),[x,g]=(0,r.useState)(!1),{isNew:v,markSeen:N}=(0,m.P)("providers"),[w,T]=(0,r.useState)(!1),[A,S]=(0,r.useState)(!1),[P,I]=(0,r.useState)(!0),[O,$]=(0,r.useState)(!0),[E,U]=(0,r.useState)(!0),[R,z]=(0,r.useState)(!1),[M,_]=(0,r.useState)(!1),[D,q]=(0,r.useState)(null),[L,K]=(0,r.useState)(null),J=(0,r.useRef)(!1),W=(0,c.i)(),F=(0,p.C)(e=>e.query),B=(0,p.C)(e=>e.register),H=(0,p.C)(e=>e.unregister),Q=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&s(t.connections||[])}catch{}},[]);(0,r.useEffect)(()=>(B("Search providers..."),()=>H()),[B,H]),(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),a=await e.json(),r=await t.json();e.ok&&s(a.connections||[]),t.ok&&n(r.nodes||[])}catch{}u(!1)})()},[]);let V=!!F.trim(),Y=(e=F.trim().toLowerCase(),(t,s="",a="")=>!e||t.toLowerCase().includes(e)||s.toLowerCase().includes(e)||a.toLowerCase().includes(e)),G=(e,s)=>{let a=Array.isArray(s)?s:[s],r=t.filter(t=>t.provider===e&&a.includes(t.authType)),i=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},n=r.filter(e=>{let t=i(e);return"active"===t||"success"===t}).length,l=r.filter(e=>{let t=i(e);return"error"===t||"failed"===t}),o=l.length,d=l[0],c=d?Object.entries(d).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":d.errorCode||null:null,p=d?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),s=Math.floor((new Date().getTime()-t.getTime())/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;let a=Math.floor(s/60);if(a<24)return`${a}h ago`;let r=Math.floor(a/24);return r<7?`${r}d ago`:t.toLocaleDateString()}(d.lastErrorAt):null,m=r.length>0&&r.every(e=>!1===e.isActive);return{connected:n,error:o,total:r.length,errorCode:c,errorTime:p,allDisabled:m}},X=(e,t)=>[...e].sort(([e,s],[a,r])=>{let i=s.priority??999,n=r.priority??999;if(i!==n)return i-n;let l=G(e,t),o=G(a,t),d=l.total>0?0:1,c=o.total>0?0:1;return d!==c?d-c:(s.name||"").localeCompare(r.name||"")}),Z=(0,r.useCallback)((e,t,a)=>{let r=Array.isArray(t)?t:[t],i=t=>t.provider===e&&r.includes(t.authType);s(e=>(Promise.allSettled(e.filter(i).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})}))),e.map(e=>i(e)?{...e,isActive:a}:e)))},[]),ee=(0,r.useCallback)(async(e,t=null)=>{if(!J.current){J.current=!0,q("provider"===e?t:e),K(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),a=await s.json();if(K(a),a.summary){let{passed:e,failed:t,total:s}=a.summary;0===t?W.success(`All ${s} tests passed`):W.warning(`${e}/${s} passed, ${t} failed`)}Q()}catch{K({error:"Test request failed"}),W.error("Provider test failed")}finally{q(null),J.current=!1}}},[W,Q]),et=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>Y(e.name,e.id)),es=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>Y(e.name,e.id)),ea=X(Object.entries(o.zN).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"oauth"),er=Object.entries(d.IS).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),ei=X(Object.entries(d.nJ).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"apikey"),en=Object.entries(o.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"apikey").total>0?0:1,i=G(s,"apikey").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),el=Object.entries(d.br).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"cookie").total>0?0:1,i=G(s,"cookie").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),eo=V||x?en:en.slice(0,20),ed=ea.length+er.length+ei.length+en.length+el.length,ec=[...ea,...er,...ei,...en,...el].map(([e])=>e),ep=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).connected>0}).length,em=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).error>0}).length;if(h)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]});let eh=et.length>0||es.length>0||ea.length>0||er.length>0||ei.length>0||en.length>0||el.length>0;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>_(!0),children:"Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>z(!0),children:"OpenAI"})]})}),(0,a.jsx)(j,{totalProviders:ed,connectedProviders:ep,errorCount:em,onTestAll:()=>ee("all"),testingMode:D}),V&&!eh&&(0,a.jsx)(l.pp,{icon:"search_off",title:`No providers match "${F}"`,description:"Try a different search term, or browse the sections below."}),(0,a.jsxs)(b,{title:"Custom Providers (OpenAI/Anthropic Compatible)",icon:"extension",count:et.length+es.length,isExpanded:w,onToggle:()=>T(e=>!e),isSearching:V,hasContent:et.length>0||es.length>0,emptyTitle:"No custom providers",emptyDescription:"Add OpenAI or Anthropic compatible endpoints to get started.",children:[(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>z(!0),children:"Add OpenAI"}),[...et,...es].map(e=>(0,a.jsx)(f,{providerId:e.id,provider:e,stats:G(e.id,"apikey"),isNew:v(e.id),onToggle:t=>Z(e.id,"apikey",t)},e.id))]}),(0,a.jsx)(b,{title:"Cookies Provider",icon:"cookie",count:el.length,isExpanded:A,onToggle:()=>S(e=>!e),isSearching:V,onTestAll:()=>ee("cookie"),testingMode:D,testModeKey:"cookie",hasContent:el.length>0,children:el.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"cookie"),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,"cookie",t)},e))}),(0,a.jsx)(b,{title:"OAuth Providers",icon:"lock",count:ea.length,isExpanded:P,onToggle:()=>I(e=>!e),isSearching:V,onTestAll:()=>ee("oauth"),testingMode:D,testModeKey:"oauth",hasContent:ea.length>0,children:ea.map(([e,t])=>{let s=k(t,"oauth");return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),comingSoon:!!t.comingSoon,isNew:v(e),onToggle:t=>Z(e,s,t)},e)})}),(0,a.jsxs)(b,{title:"Free Tier Providers",icon:"redeem",count:er.length+ei.length,isExpanded:O,onToggle:()=>$(e=>!e),isSearching:V,onTestAll:()=>ee("free"),testingMode:D,testModeKey:"free",hasContent:er.length>0||ei.length>0,children:[er.map(([e,t])=>{let s="kiro"===e?["oauth","apikey","api_key"]:"oauth";return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,s,t)},e)}),ei.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e))]}),(0,a.jsxs)(b,{title:"API Key Providers",icon:"key",count:en.length,isExpanded:E,onToggle:()=>U(e=>!e),isSearching:V,onTestAll:()=>ee("apikey"),testingMode:D,testModeKey:"apikey",hasContent:en.length>0,children:[eo.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e)),!V&&!x&&en.length>20&&(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-brand border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",en.length," providers"]})]}),L&&(0,a.jsx)(l.aF,{isOpen:!!L,onClose:()=>K(null),title:"Provider Test Results",size:"md",children:(0,a.jsx)(y,{results:L})}),(0,a.jsx)(C,{variant:"openai",isOpen:R,onClose:()=>z(!1),onCreated:e=>{n(t=>[...t,e]),z(!1)}}),(0,a.jsx)(C,{variant:"anthropic",isOpen:M,onClose:()=>_(!1),onCreated:e=>{n(t=>[...t,e]),_(!1)}})]})}C.propTypes={variant:u().oneOf(["openai","anthropic"]).isRequired,isOpen:u().bool.isRequired,onClose:u().func.isRequired,onCreated:u().func.isRequired}},86296:(e,t,s)=>{Promise.resolve().then(s.bind(s,34695))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=86296)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>o,ev:()=>m,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,c=5,o=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var a=s(95155),l=s(12115),r=s(35497),n=s(11059),i=s(73006),c=s(15536);function o(){let[e,t]=(0,l.useState)(!0),[s,o]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[b,y]=(0,l.useState)(""),[g,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,H]=(0,l.useState)(.85),[P,R]=(0,l.useState)(null),[$,z]=(0,l.useState)("en"),{copied:M,copy:_}=(0,n.C)();(0,l.useEffect)(()=>(z((0,i.kk)()),(0,i.oQ)(()=>z((0,i.kk)()))),[]);let A=c.hT.includes($),I=A?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!A&&(w("ultra"),O({cavemanLevel:"ultra"}))},[A,N]);let O=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},D=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},F=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await O({headroomUrl:e}),W()},W=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),B=(0,l.useCallback)(async()=>{y(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await W()}catch(e){y(e.message)}finally{j(!1)}},[W]),J=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await W()}finally{j(!1)}},[W]),Y=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),o(!!s.headroomEnabled),m(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),H("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),W()}}catch{}})()},[W]);let G=!!x.running,K=x.loading?"Checking…":G?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",Z=!1!==x.localUrl,q=!!x.canStart,Q=Z&&!!x.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(r.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(r.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(r.lM,{checked:e,onChange:()=>D(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${G?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:K}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:G?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(r.lM,{checked:s&&G,disabled:!G,onChange:()=>{var e;let t;return e=!s,void(m(t=d.trim()||"http://localhost:8787"),o(e),O({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[g&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:I.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),O({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(r.lM,{checked:g,onChange:()=>{var e;v(e=!g),O({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),O({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(r.lM,{checked:k,onChange:()=>{var e;C(e=!k),O({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(r.lM,{checked:T,onChange:()=>{var e;L(e=!T),O({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;H(t=parseFloat(e.target.value)),O({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),P&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",P.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",P.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",P.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",P.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",P.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:Y,children:"Clear Cache"})]})]})]}),(0,a.jsx)(r.aF,{isOpen:p,title:G?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:G?"text-success":"text-warning",children:K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:F,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),Q?(0,a.jsx)(r.$n,{onClick:J,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):G?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):q?(0,a.jsx)(r.$n,{onClick:B,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):Z?x.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>_('pip install "headroom-ai[proxy]"'),children:M?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),b&&(0,a.jsx)("p",{className:"text-sm text-warning",children:b}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>W(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
|