zevairouter 1.1.46 → 1.1.48
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/CHANGELOG.md +24 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +15 -15
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -51
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +15 -15
- package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2568.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/2897.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/415.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4897.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5019.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5330.js +37 -9
- package/cli/app/.next-cli-build/server/chunks/5949.js +7 -7
- package/cli/app/.next-cli-build/server/chunks/6928.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/7319.js +41 -41
- package/cli/app/.next-cli-build/server/chunks/7502.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7568.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/{7634.js → 7574.js} +2 -2
- package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8895.js +7 -7
- package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8985.js +26 -0
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/server/preview-props.json +3 -3
- package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/cli/app/.next-cli-build/static/chunks/620-f70c473fe962e22d.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-4bd92dec9d25dff3.js → page-7c06c366dcec369c.js} +1 -1
- package/cli/app/.next-cli-build/static/css/{b45d78e41f951e9a.css → d11572d8f7baa8f2.css} +1 -1
- package/cli/app/CHANGELOG.md +24 -0
- package/cli/app/cli/hooks/bunRuntime.js +86 -0
- package/cli/app/cli/hooks/safeGlobalInstall.js +24 -1
- package/cli/app/cli/hooks/startupRuntime.js +4 -0
- package/cli/app/package.json +3 -3
- package/cli/app/src/lib/updater/updater.js +4 -1
- package/cli/app/src/mitm/server.js +41 -37
- package/cli/cli.js +19 -9
- package/cli/hooks/bunRuntime.js +86 -0
- package/cli/hooks/safeGlobalInstall.js +24 -1
- package/cli/hooks/startupRuntime.js +4 -0
- package/cli/package.json +2 -2
- package/package.json +3 -3
- package/cli/app/.next-cli-build/server/chunks/2051.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/3184.js +0 -26
- package/cli/app/.next-cli-build/server/chunks/4586.js +0 -29
- package/cli/app/.next-cli-build/server/chunks/5932.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/620-db14acf5ab1f9090.js +0 -1
- /package/cli/app/.next-cli-build/static/{49WrfprfANWLHDX8M34oV → XB-ecVrVkgIL5G31K14wJ}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{49WrfprfANWLHDX8M34oV → XB-ecVrVkgIL5G31K14wJ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{20490:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var r=s(95155),a=s(12115),i=s(14051),l=s.n(i),n=s(35497),o=s(57250),d=s(90620),c=s(52679),m=s(98500),p=s.n(m),u=s(28915),x=s(65921),h=s(38003);let f={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function g(){let[e,t]=(0,a.useState)(null),[s,i]=(0,a.useState)(!0),[l,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,x.i)(),u=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let s=await e.json();t(s)}}catch{}finally{i(!1)}},[]);(0,a.useEffect)(()=>{u();let e=setInterval(u,3e4);return()=>clearInterval(e)},[u]),(0,a.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&o(!1)};return l&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(p.success(`Cooldown cleared for ${t}`),await u()):p.error("Failed to clear cooldown")}catch{p.error("Failed to clear cooldown")}finally{c(null)}};if(s)return null;let g=e?.models||[],b=e?.unavailableCount||g.filter(e=>"available"!==e.status).length,v=0===b,y={};return g.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";y[t]||(y[t]=[]),y[t].push(e)}),(0,r.jsxs)("div",{className:"relative",ref:m,children:[(0,r.jsxs)("button",{onClick:()=>o(!l),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all ${v?"bg-emerald-500/10 border-emerald-500/20 text-emerald-500 hover:bg-emerald-500/15":"bg-amber-500/10 border-amber-500/20 text-amber-500 hover:bg-amber-500/15"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:v?"verified":"warning"}),v?"All models operational":`${b} model${1!==b?"s":""} with issues`]}),l&&(0,r.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:v?"#22c55e":"#f59e0b"},children:v?"verified":"warning"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,r.jsx)("button",{onClick:u,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,r.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:v?(0,r.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,r.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(y).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=f[e.status]||f.unknown,s=d===`${e.provider}:${e.model}`;return(0,r.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,r.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:s,className:"text-[10px] px-1.5! py-0.5! ml-2",children:s?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})]})}var b=s(66430),v=s(40728);function y(e,t,s){if(e>0)return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-success"}),e," connected"]});if(t>0){let e=s?`${t} Error (${s})`:`${t} Error`;return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-error",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-error"}),e]})}return(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:"No connections"})}let j=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"ready",label:"Ready"},{value:"setup",label:"Needs setup"}];async function N(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),r=null;try{r=await s.json()}catch{r=null}return{response:s,data:r}}finally{window.clearTimeout(s)}}function w(){let e,t,[s,i]=(0,a.useState)([]),[l,o]=(0,a.useState)([]),[m,p]=(0,a.useState)(!0),[f,y]=(0,a.useState)(""),[w,A]=(0,a.useState)(1),[E,I]=(0,a.useState)(20),[P,O]=(0,a.useState)(!1),[_,U]=(0,a.useState)(!1),[q,z]=(0,a.useState)(()=>new Set),[M,D]=(0,a.useState)(null),[F,L]=(0,a.useState)("all"),[J,H]=(0,a.useState)({custom:!1,oauth:!1,free:!0,apikey:!0}),K=(0,x.i)(),W=(0,h.C)(e=>e.query),B=(0,h.C)(e=>e.setQuery),Q=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>()=>Q(),[Q]),(0,a.useEffect)(()=>{A(1)},[W,E,F]);let G=e=>!W.trim()||e.toLowerCase().includes(W.trim().toLowerCase());(0,a.useEffect)(()=>{(async()=>{try{y("");let[e,t]=await Promise.allSettled([(0,b.b7)("providers:list",v.t7),N("/api/provider-nodes")]);"fulfilled"===e.status?i(e.value?.connections||[]):(i([]),y("Provider connection stats could not be loaded. The provider catalog is still available.")),"fulfilled"===t.status&&t.value.response.ok?o(t.value.data?.nodes||[]):(o([]),y(e=>e||"Custom provider data could not be loaded. The provider catalog is still available."))}catch(e){console.log("Error fetching data:",e),y("Provider data could not be loaded. The provider catalog is still available.")}finally{p(!1)}})()},[]);let V=(0,a.useMemo)(()=>{let e=new Map;for(let t of s){let s=t.provider||t.id;e.has(s)||e.set(s,[]),e.get(s).push(t)}return e},[s]),X=s.length,Z=(0,a.useMemo)(()=>s.filter(e=>!1!==e.isActive).length,[s]),Y=V.size,ee=Math.max(0,X-Z),et=X>0?Math.round(Z/X*100):0,es=(e,t)=>{let s=Array.isArray(t)?t:[t],r=(V.get(e)||[]).filter(e=>s.includes(e.authType)),a=r.filter(e=>{let t,s=(t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now()),"unavailable"!==e.testStatus||t?e.testStatus:"active");return"error"===s||"expired"===s||"unavailable"===s}),i=r.length>0?r.length:0,l=r.length>0?0:a.length,n=r.length,o=n>0&&r.every(e=>!1===e.isActive),d=a.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:l,total:n,errorCode:d?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let s=Number(e.errorCode);if(Number.isFinite(s)&&s>=400)return String(s);let r=(0,u.E2)(e.lastError);if("401"===r||"403"===r)return"AUTH";if(r&&"ERR"!==r)return r;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(d):null,errorTime:d?.lastErrorAt?(0,u.gs)(d.lastErrorAt):null,allDisabled:o}},er=(e,t,s)=>{if("all"===F)return!0;let r=es(e,s);return"connected"===F?r.connected>0:"ready"===F?0===r.connected&&!0===t.noAuth:0===r.connected&&!0!==t.noAuth},ea=e=>{H(t=>({...t,[e]:!t[e]}))},ei=async(e,t,r)=>{let a=s.filter(s=>s.provider===e&&s.authType===t);i(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:r}:s));let l=(await Promise.allSettled(a.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).filter(e=>"rejected"===e.status).length;l>0?(i(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:!r}:s)),K.error(`Failed to update ${l} connection${l>1?"s":""} — reverted`)):(0,b.au)("providers:list")},el=async(e,t=null)=>{let s="provider"===e?t:e;if(s){z(e=>new Set(e).add(s)),D(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await s.json();if(D(r),r.summary){let{passed:e,failed:t,total:s}=r.summary;0===t?K.success(`All ${s} tests passed`):K.warning(`${e}/${s} passed, ${t} failed`)}}catch(e){D({error:"Test request failed"}),K.error("Provider test failed")}finally{z(e=>{let t=new Set(e);return t.delete(s),t})}}},en=l.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=>G(e.name)&&er(e.id,e,"apikey")),eo=l.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>G(e.name)&&er(e.id,e,"apikey")),ed=Object.entries(d.zN).filter(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return!t.hidden&&G(t.name)&&er(e,t,s)}),ec=Object.entries(c.IS).filter(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return!t.hidden&&G(t.name)&&er(e,t,s?["oauth","apikey"]:"oauth")}),em=Object.entries(c.nJ).filter(([e,t])=>!t.hidden&&G(t.name)&&er(e,t,"apikey")),ep=(e=Object.entries(d.fg).filter(([e,t])=>!t.hidden&&(t.serviceKinds??["llm"]).includes("llm")&&G(t.name)&&er(e,t,"apikey")),t="apikey",[...e].sort(([e,s],[r,a])=>{let i=es(e,t),l=es(r,t),n=+(i.connected>0),o=+(l.connected>0);return n!==o?o-n:(s.name||"").localeCompare(a.name||"")})),eu=Math.min(w,Math.max(1,Math.ceil(ep.length/E))),ex=ep.slice((eu-1)*E,eu*E);if(m)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let eh=ed.length>0||ec.length>0||em.length>0||ep.length>0||en.length>0||eo.length>0,ef=en.length>0||eo.length>0||"all"===F&&!W.trim();return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[X>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface/80 shadow-sm",children:(0,r.jsxs)("div",{className:"grid grid-cols-3 divide-x divide-y divide-border-subtle sm:grid-cols-4 sm:divide-y-0",children:[(0,r.jsxs)("div",{className:"col-span-3 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,r.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",style:{fontSize:18},children:"dns"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connection health"}),(0,r.jsxs)("p",{className:"mt-0.5 text-sm font-semibold tabular-nums text-text-main",children:[et,"% active"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connections"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-text-main",children:X})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Active"}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-baseline gap-2",children:[(0,r.jsx)("p",{className:"text-lg font-semibold tabular-nums text-success",children:Z}),ee>0&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[ee," paused"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Providers"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-info",children:Y})]})]})}),f&&(0,r.jsx)(n.Gi,{tone:"warning",title:"Some provider status is unavailable",children:f}),(0,r.jsxs)(n.i5,{label:"Provider search and filters",children:[(0,r.jsx)(n.pd,{"aria-label":"Search providers",icon:"search",placeholder:"Search providers...",value:W,onChange:e=>B(e.target.value),className:"w-full sm:min-w-56 sm:max-w-72",inputClassName:"h-11 sm:h-9"}),(0,r.jsx)("div",{className:"flex w-full min-w-0 gap-1 overflow-x-auto rounded-xl bg-bg/70 p-1 [scrollbar-width:none] sm:w-auto [&::-webkit-scrollbar]:hidden",children:j.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{L(e.value),A(1),H({custom:!1,oauth:!1,free:!1,apikey:!1})},"aria-pressed":F===e.value,className:`flex h-11 flex-1 items-center justify-center whitespace-nowrap rounded-lg px-3 text-xs font-medium transition-colors sm:h-8 sm:flex-none sm:px-3 ${F===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-black/5 hover:text-text-main dark:hover:bg-white/5"}`,children:e.label},e.value))})]}),!eh&&(0,r.jsx)(n.pp,{icon:"search_off",title:W.trim()?"No providers match your search":"No providers match this filter",description:"Adjust the search or status filter to see more providers.",action:(0,r.jsx)(n.$n,{variant:"secondary",onClick:()=>{B(""),L("all")},children:"Clear filters"})}),ef&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"extension",title:"Custom Providers",description:"OpenAI and Anthropic-compatible endpoints",count:en.length+eo.length,collapsed:J.custom&&!W.trim(),onToggle:()=>ea("custom"),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,r.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>U(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add Anthropic Compatible"}),(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>O(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add OpenAI Compatible"})]})}),(0,r.jsx)("div",{className:J.custom&&!W.trim()?"hidden sm:block":"",children:0===en.length&&0===eo.length?(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-dashed border-border bg-surface/45 px-4 py-3 text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-[18px]",children:"add_link"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No custom endpoints yet"}),(0,r.jsx)("p",{className:"mt-0.5 text-xs",children:"Add an OpenAI or Anthropic-compatible endpoint when you need one."})]})]}):(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4",children:[...en,...eo].map(e=>(0,r.jsx)(T,{providerId:e.id,provider:e,stats:es(e.id,"apikey"),onToggle:t=>ei(e.id,"apikey",t)},e.id))})})]}),ed.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"passkey",title:"OAuth Providers",description:"Connect existing provider accounts securely",count:ed.length,collapsed:J.oauth&&!W.trim(),onToggle:()=>ea("oauth"),children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)(g,{}),(0,r.jsxs)("button",{onClick:()=>el("oauth"),disabled:q.has("oauth"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("oauth")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("oauth")?" animate-spin":""}`,children:"play_arrow"}),q.has("oauth")?"Testing...":"Test All"]})]})}),(0,r.jsx)("div",{className:`${J.oauth&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ed.map(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return(0,r.jsx)(C,{providerId:e,provider:t,stats:es(e,s),onToggle:t=>ei(e,"oauth",t)},e)})})]}),(ec.length>0||em.length>0)&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"savings",title:"Free Tier Providers",description:"Ready-to-use and free-tier routing options",count:ec.length+em.length,collapsed:J.free&&!W.trim(),onToggle:()=>ea("free"),children:(0,r.jsxs)("button",{onClick:()=>el("free"),disabled:q.has("free"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("free")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("free")?" animate-spin":""}`,children:"play_arrow"}),q.has("free")?"Testing...":"Test All"]})}),(0,r.jsxs)("div",{className:`${J.free&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:[ec.map(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return(0,r.jsx)(C,{providerId:e,provider:t,stats:es(e,s?["oauth","apikey"]:"oauth"),onToggle:t=>ei(e,s?"apikey":"oauth",t)},e)}),em.map(([e,t])=>(0,r.jsx)(T,{providerId:e,provider:t,stats:es(e,"apikey"),onToggle:t=>ei(e,"apikey",t)},e))]})]}),ep.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"key",title:"API Key Providers",description:"Bring your own provider credentials",count:ep.length,collapsed:J.apikey&&!W.trim(),onToggle:()=>ea("apikey"),children:(0,r.jsxs)("button",{onClick:()=>el("apikey"),disabled:q.has("apikey"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("apikey")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("apikey")?" animate-spin":""}`,children:"play_arrow"}),q.has("apikey")?"Testing...":"Test All"]})}),(0,r.jsx)("div",{className:`${J.apikey&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ex.map(([e,t])=>(0,r.jsx)(T,{providerId:e,provider:t,stats:es(e,"apikey"),onToggle:t=>ei(e,"apikey",t)},e))}),ep.length>0&&(0,r.jsx)("div",{className:J.apikey&&!W.trim()?"hidden sm:block":"",children:(0,r.jsx)(n.dK,{currentPage:eu,pageSize:E,totalItems:ep.length,onPageChange:A,onPageSizeChange:e=>{I(e),A(1)}})})]}),(0,r.jsx)(S,{isOpen:P,onClose:()=>O(!1),onCreated:e=>{o(t=>[...t,e]),O(!1)}}),(0,r.jsx)($,{isOpen:_,onClose:()=>U(!1),onCreated:e=>{o(t=>[...t,e]),U(!1)}}),M&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>D(null),children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,r.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,r.jsx)("button",{onClick:()=>D(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,r.jsx)("div",{className:"p-5",children:(0,r.jsx)(R,{results:M})})]})]})]})}function k({icon:e,title:t,description:s,count:a,collapsed:i,onToggle:l,children:n}){return(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 sm:w-auto",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5 sm:flex-none",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-[17px] text-primary",children:e}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"truncate text-lg font-semibold leading-tight",children:t}),(0,r.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold tabular-nums text-text-muted",children:a})]}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-[11px] text-text-muted sm:text-xs",children:s})]})]}),(0,r.jsx)("button",{type:"button",onClick:l,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border text-text-muted transition-colors hover:border-primary/30 hover:text-primary sm:hidden","aria-expanded":!i,"aria-label":`${i?"Expand":"Collapse"} ${t}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i?"expand_more":"expand_less"})})]}),n&&(0,r.jsx)("div",{className:i?"hidden sm:block":"block",children:n})]})}function C({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:i,error:l,errorCode:d,allDisabled:c}=s,m=!!t.noAuth;return(0,r.jsx)("div",{className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${c?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center overflow-hidden whitespace-nowrap",children:c?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-success"}),"Ready"]}):y(i,l,d)})]})]}),(0,r.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 sm:flex",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!c)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!c,onChange:()=>{},title:c?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]}),(0,r.jsx)(A,{providerId:e,hasConnections:s.total>0,active:!c,onToggle:a})]})})})}function T({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:i,error:l,errorCode:d,allDisabled:m}=s,u=e.startsWith(c.JH),x=e.startsWith(c.DI);return(0,r.jsx)("div",{className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${m?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:u?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":x?"/providers/anthropic-m.png":`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap",children:m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):(0,r.jsxs)(r.Fragment,{children:[y(i,l,d),u&&(0,r.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["\xb7 ","responses"===t.apiType?"Responses":"Chat"]}),x&&(0,r.jsx)("span",{className:"text-[10px] text-text-subtle",children:"\xb7 Messages"})]})})]})]}),(0,r.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 sm:flex",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!m)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]}),(0,r.jsx)(A,{providerId:e,hasConnections:s.total>0,active:!m,onToggle:a})]})})})}function A({providerId:e,hasConnections:t,active:s,onToggle:i}){let[l,n]=(0,a.useState)(!1),o=(0,a.useRef)(null),d=(0,a.useId)();return(0,a.useEffect)(()=>{if(!l)return;let e=e=>{"Escape"!==e.key&&o.current?.contains(e.target)||n(!1)};return document.addEventListener("keydown",e),document.addEventListener("pointerdown",e),()=>{document.removeEventListener("keydown",e),document.removeEventListener("pointerdown",e)}},[l]),(0,r.jsxs)("div",{ref:o,className:"relative shrink-0 sm:hidden",children:[(0,r.jsx)("button",{type:"button","aria-label":"Provider actions","aria-expanded":l,"aria-controls":d,onClick:()=>n(e=>!e),className:"grid size-11 place-items-center rounded-xl text-text-muted transition-colors hover:bg-surface-2 hover:text-text-main focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",children:"more_vert"})}),l&&(0,r.jsxs)("div",{id:d,className:"absolute right-0 top-full z-20 mt-1 w-48 overflow-hidden rounded-xl border border-border bg-surface p-1 shadow-[var(--shadow-elev)]",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-h-11 items-center gap-2 rounded-lg px-3 text-sm text-text-main hover:bg-surface-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px]",children:"arrow_forward"}),"Open provider"]}),t&&(0,r.jsxs)("button",{type:"button",onClick:()=>{i(!s),n(!1)},className:"flex min-h-11 w-full items-center gap-2 rounded-lg px-3 text-left text-sm text-text-main hover:bg-surface-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px]",children:s?"pause_circle":"play_circle"}),s?"Disable provider":"Enable provider"]})]})]})}function S({isOpen:e,onClose:t,onCreated:s}){let[i,l]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{let e="https://api.openai.com/v1";l(t=>t.baseUrl&&t.baseUrl!==e?t:{...t,baseUrl:e})},[i.apiType]);let y=async()=>{if(i.name.trim()&&i.prefix.trim()&&i.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.name,prefix:i.prefix,apiType:i.apiType,baseUrl:i.baseUrl,type:"openai-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),l({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating OpenAI Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:i.baseUrl,apiKey:c,type:"openai-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:i.name,onChange:e=>l({...i,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:i.prefix,onChange:e=>l({...i,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:i.apiType,onChange:e=>l({...i,apiType:e.target.value})}),(0,r.jsx)(n.pd,{label:"Base URL",value:i.baseUrl,onChange:e=>l({...i,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>u(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||x||!i.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:x?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!i.name.trim()||!i.prefix.trim()||!i.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function $({isOpen:e,onClose:t,onCreated:s}){let[i,l]=(0,a.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(g(null),m(""),u(""),v(""))},[e]);let y=async()=>{if(i.name.trim()&&i.prefix.trim()&&i.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.name,prefix:i.prefix,baseUrl:i.baseUrl,type:"anthropic-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),l({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating Anthropic Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:i.baseUrl,apiKey:c,type:"anthropic-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:i.name,onChange:e=>l({...i,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:i.prefix,onChange:e=>l({...i,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.pd,{label:"Base URL",value:i.baseUrl,onChange:e=>l({...i,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>u(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||x||!i.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:x?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!i.name.trim()||!i.prefix.trim()||!i.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function R({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:s}=e,a=e.results||[];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[s]||s," Test"]}),(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),a.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===a.length&&(0,r.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}k.propTypes={icon:l().string.isRequired,title:l().string.isRequired,description:l().string.isRequired,count:l().number.isRequired,collapsed:l().bool.isRequired,onToggle:l().func.isRequired,children:l().node},C.propTypes={providerId:l().string.isRequired,provider:l().shape({id:l().string.isRequired,name:l().string.isRequired,color:l().string,textIcon:l().string}).isRequired,stats:l().shape({connected:l().number,error:l().number,errorCode:l().string,errorTime:l().string,total:l().number,allDisabled:l().bool}).isRequired,onToggle:l().func},A.propTypes={providerId:l().string.isRequired,hasConnections:l().bool.isRequired,active:l().bool.isRequired,onToggle:l().func.isRequired},T.propTypes={providerId:l().string.isRequired,provider:l().shape({id:l().string.isRequired,name:l().string.isRequired,color:l().string,textIcon:l().string,apiType:l().string}).isRequired,stats:l().shape({connected:l().number,error:l().number,errorCode:l().string,errorTime:l().string,total:l().number,allDisabled:l().bool}).isRequired,onToggle:l().func},S.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onCreated:l().func.isRequired},$.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onCreated:l().func.isRequired},R.propTypes={results:l().shape({mode:l().string,results:l().array,summary:l().shape({total:l().number,passed:l().number,failed:l().number}),error:l().string}).isRequired}},28915:(e,t,s)=>{"use strict";s.d(t,{x6:()=>r.fetchJson,E2:()=>a,gs:()=>i});var r=s(68211);function a(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function i(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let r=Math.floor(s/24);return`${r}d ago`}},31703:(e,t,s)=>{Promise.resolve().then(s.bind(s,20490))},68211:(e,t,s)=>{"use strict";s.d(t,{fetchJson:()=>a});let r={"Content-Type":"application/json"};async function a(e,t={}){let{body:s,headers:i,...l}=t,n={...l,headers:{...r,...i}};void 0!==s&&"string"!=typeof s?n.body=JSON.stringify(s):void 0!==s&&(n.body=s);let o=await fetch(e,n),d=await o.text(),c=null;if(d)try{c=JSON.parse(d)}catch{let t=Error(`Non-JSON response from ${e} (HTTP ${o.status})`);throw t.status=o.status,t.rawBody=d.slice(0,300),t}if(!o.ok){let e=c&&(c.error?.message||c.error||c.message)||`Request failed (HTTP ${o.status})`,t=Error("string"==typeof e?e:`HTTP ${o.status}`);throw t.status=o.status,t.data=c,t}return c}a.get=(e,t)=>a(e,{...t,method:"GET"}),a.post=(e,t,s)=>a(e,{...s,method:"POST",body:t}),a.put=(e,t,s)=>a(e,{...s,method:"PUT",body:t}),a.patch=(e,t,s)=>a(e,{...s,method:"PATCH",body:t}),a.del=(e,t)=>a(e,{...t,method:"DELETE"})}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=31703)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{20490:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var r=s(95155),a=s(12115),i=s(14051),l=s.n(i),n=s(35497),o=s(57250),d=s(90620),c=s(52679),m=s(98500),p=s.n(m),u=s(28915),x=s(65921),h=s(38003);let f={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function g(){let[e,t]=(0,a.useState)(null),[s,i]=(0,a.useState)(!0),[l,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,x.i)(),u=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let s=await e.json();t(s)}}catch{}finally{i(!1)}},[]);(0,a.useEffect)(()=>{u();let e=setInterval(u,3e4);return()=>clearInterval(e)},[u]),(0,a.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&o(!1)};return l&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(p.success(`Cooldown cleared for ${t}`),await u()):p.error("Failed to clear cooldown")}catch{p.error("Failed to clear cooldown")}finally{c(null)}};if(s)return null;let g=e?.models||[],b=e?.unavailableCount||g.filter(e=>"available"!==e.status).length,v=0===b,y={};return g.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";y[t]||(y[t]=[]),y[t].push(e)}),(0,r.jsxs)("div",{className:"relative",ref:m,children:[(0,r.jsxs)("button",{onClick:()=>o(!l),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all ${v?"bg-emerald-500/10 border-emerald-500/20 text-emerald-500 hover:bg-emerald-500/15":"bg-amber-500/10 border-amber-500/20 text-amber-500 hover:bg-amber-500/15"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:v?"verified":"warning"}),v?"All models operational":`${b} model${1!==b?"s":""} with issues`]}),l&&(0,r.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:v?"#22c55e":"#f59e0b"},children:v?"verified":"warning"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,r.jsx)("button",{onClick:u,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,r.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:v?(0,r.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,r.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(y).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=f[e.status]||f.unknown,s=d===`${e.provider}:${e.model}`;return(0,r.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,r.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:s,className:"text-[10px] px-1.5! py-0.5! ml-2",children:s?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})]})}var b=s(66430),v=s(40728);function y(e,t,s){if(e>0)return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-success"}),e," connected"]});if(t>0){let e=s?`${t} Error (${s})`:`${t} Error`;return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-error",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-error"}),e]})}return(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:"No connections"})}let j=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"ready",label:"Ready"},{value:"setup",label:"Needs setup"}];async function N(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),r=null;try{r=await s.json()}catch{r=null}return{response:s,data:r}}finally{window.clearTimeout(s)}}function w(){let e,t,[s,i]=(0,a.useState)([]),[l,o]=(0,a.useState)([]),[m,p]=(0,a.useState)(!0),[f,y]=(0,a.useState)(""),[w,A]=(0,a.useState)(1),[E,I]=(0,a.useState)(20),[P,O]=(0,a.useState)(!1),[_,U]=(0,a.useState)(!1),[q,z]=(0,a.useState)(()=>new Set),[M,D]=(0,a.useState)(null),[F,L]=(0,a.useState)("all"),[J,H]=(0,a.useState)({custom:!1,oauth:!1,free:!0,apikey:!0}),K=(0,x.i)(),W=(0,h.C)(e=>e.query),B=(0,h.C)(e=>e.setQuery),Q=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>()=>Q(),[Q]),(0,a.useEffect)(()=>{A(1)},[W,E,F]);let G=e=>!W.trim()||e.toLowerCase().includes(W.trim().toLowerCase());(0,a.useEffect)(()=>{(async()=>{try{y("");let[e,t]=await Promise.allSettled([(0,b.b7)("providers:list",v.t7),N("/api/provider-nodes")]);"fulfilled"===e.status?i(e.value?.connections||[]):(i([]),y("Provider connection stats could not be loaded. The provider catalog is still available.")),"fulfilled"===t.status&&t.value.response.ok?o(t.value.data?.nodes||[]):(o([]),y(e=>e||"Custom provider data could not be loaded. The provider catalog is still available."))}catch(e){console.log("Error fetching data:",e),y("Provider data could not be loaded. The provider catalog is still available.")}finally{p(!1)}})()},[]);let V=(0,a.useMemo)(()=>{let e=new Map;for(let t of s){let s=t.provider||t.id;e.has(s)||e.set(s,[]),e.get(s).push(t)}return e},[s]),X=s.length,Z=(0,a.useMemo)(()=>s.filter(e=>!1!==e.isActive).length,[s]),Y=V.size,ee=Math.max(0,X-Z),et=X>0?Math.round(Z/X*100):0,es=(e,t)=>{let s=Array.isArray(t)?t:[t],r=(V.get(e)||[]).filter(e=>s.includes(e.authType)),a=r.filter(e=>{let t,s=(t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now()),"unavailable"!==e.testStatus||t?e.testStatus:"active");return"error"===s||"expired"===s||"unavailable"===s}),i=r.length>0?r.length:0,l=r.length>0?0:a.length,n=r.length,o=n>0&&r.every(e=>!1===e.isActive),d=a.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:l,total:n,errorCode:d?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let s=Number(e.errorCode);if(Number.isFinite(s)&&s>=400)return String(s);let r=(0,u.E2)(e.lastError);if("401"===r||"403"===r)return"AUTH";if(r&&"ERR"!==r)return r;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(d):null,errorTime:d?.lastErrorAt?(0,u.gs)(d.lastErrorAt):null,allDisabled:o}},er=(e,t,s)=>{if("all"===F)return!0;let r=es(e,s);return"connected"===F?r.connected>0:"ready"===F?0===r.connected&&!0===t.noAuth:0===r.connected&&!0!==t.noAuth},ea=e=>{H(t=>({...t,[e]:!t[e]}))},ei=async(e,t,r)=>{let a=s.filter(s=>s.provider===e&&s.authType===t);i(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:r}:s));let l=(await Promise.allSettled(a.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).filter(e=>"rejected"===e.status).length;l>0?(i(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:!r}:s)),K.error(`Failed to update ${l} connection${l>1?"s":""} — reverted`)):(0,b.au)("providers:list")},el=async(e,t=null)=>{let s="provider"===e?t:e;if(s){z(e=>new Set(e).add(s)),D(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await s.json();if(D(r),r.summary){let{passed:e,failed:t,total:s}=r.summary;0===t?K.success(`All ${s} tests passed`):K.warning(`${e}/${s} passed, ${t} failed`)}}catch(e){D({error:"Test request failed"}),K.error("Provider test failed")}finally{z(e=>{let t=new Set(e);return t.delete(s),t})}}},en=l.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=>G(e.name)&&er(e.id,e,"apikey")),eo=l.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>G(e.name)&&er(e.id,e,"apikey")),ed=Object.entries(d.zN).filter(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return!t.hidden&&G(t.name)&&er(e,t,s)}),ec=Object.entries(c.IS).filter(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return!t.hidden&&G(t.name)&&er(e,t,s?["oauth","apikey"]:"oauth")}),em=Object.entries(c.nJ).filter(([e,t])=>!t.hidden&&G(t.name)&&er(e,t,"apikey")),ep=(e=Object.entries(d.fg).filter(([e,t])=>!t.hidden&&(t.serviceKinds??["llm"]).includes("llm")&&G(t.name)&&er(e,t,"apikey")),t="apikey",[...e].sort(([e,s],[r,a])=>{let i=es(e,t),l=es(r,t),n=+(i.connected>0),o=+(l.connected>0);return n!==o?o-n:(s.name||"").localeCompare(a.name||"")})),eu=Math.min(w,Math.max(1,Math.ceil(ep.length/E))),ex=ep.slice((eu-1)*E,eu*E);if(m)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let eh=ed.length>0||ec.length>0||em.length>0||ep.length>0||en.length>0||eo.length>0,ef=en.length>0||eo.length>0||"all"===F&&!W.trim();return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[X>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface/80 shadow-sm",children:(0,r.jsxs)("div",{className:"grid grid-cols-3 divide-x divide-y divide-border-subtle sm:grid-cols-4 sm:divide-y-0",children:[(0,r.jsxs)("div",{className:"col-span-3 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,r.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",style:{fontSize:18},children:"dns"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connection health"}),(0,r.jsxs)("p",{className:"mt-0.5 text-sm font-semibold tabular-nums text-text-main",children:[et,"% active"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connections"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-text-main",children:X})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Active"}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-baseline gap-2",children:[(0,r.jsx)("p",{className:"text-lg font-semibold tabular-nums text-success",children:Z}),ee>0&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[ee," paused"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Providers"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-info",children:Y})]})]})}),f&&(0,r.jsx)(n.Gi,{tone:"warning",title:"Some provider status is unavailable",children:f}),(0,r.jsxs)(n.i5,{label:"Provider search and filters",children:[(0,r.jsx)(n.pd,{"aria-label":"Search providers",icon:"search",placeholder:"Search providers...",value:W,onChange:e=>B(e.target.value),className:"w-full sm:min-w-56 sm:max-w-72",inputClassName:"h-11 sm:h-9"}),(0,r.jsx)("div",{className:"flex w-full min-w-0 gap-1 overflow-x-auto rounded-xl bg-bg/70 p-1 [scrollbar-width:none] sm:w-auto [&::-webkit-scrollbar]:hidden",children:j.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{L(e.value),A(1),H({custom:!1,oauth:!1,free:!1,apikey:!1})},"aria-pressed":F===e.value,className:`flex h-11 flex-1 items-center justify-center whitespace-nowrap rounded-lg px-3 text-xs font-medium transition-colors sm:h-8 sm:flex-none sm:px-3 ${F===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-black/5 hover:text-text-main dark:hover:bg-white/5"}`,children:e.label},e.value))})]}),!eh&&(0,r.jsx)(n.pp,{icon:"search_off",title:W.trim()?"No providers match your search":"No providers match this filter",description:"Adjust the search or status filter to see more providers.",action:(0,r.jsx)(n.$n,{variant:"secondary",onClick:()=>{B(""),L("all")},children:"Clear filters"})}),ef&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"extension",title:"Custom Providers",description:"OpenAI and Anthropic-compatible endpoints",count:en.length+eo.length,collapsed:J.custom&&!W.trim(),onToggle:()=>ea("custom"),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,r.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>U(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add Anthropic Compatible"}),(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>O(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add OpenAI Compatible"})]})}),(0,r.jsx)("div",{className:J.custom&&!W.trim()?"hidden sm:block":"",children:0===en.length&&0===eo.length?(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-dashed border-border bg-surface/45 px-4 py-3 text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-[18px]",children:"add_link"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No custom endpoints yet"}),(0,r.jsx)("p",{className:"mt-0.5 text-xs",children:"Add an OpenAI or Anthropic-compatible endpoint when you need one."})]})]}):(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4",children:[...en,...eo].map(e=>(0,r.jsx)(T,{providerId:e.id,provider:e,stats:es(e.id,"apikey"),onToggle:t=>ei(e.id,"apikey",t)},e.id))})})]}),ed.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"passkey",title:"OAuth Providers",description:"Connect existing provider accounts securely",count:ed.length,collapsed:J.oauth&&!W.trim(),onToggle:()=>ea("oauth"),children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)(g,{}),(0,r.jsxs)("button",{onClick:()=>el("oauth"),disabled:q.has("oauth"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("oauth")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("oauth")?" animate-spin":""}`,children:"play_arrow"}),q.has("oauth")?"Testing...":"Test All"]})]})}),(0,r.jsx)("div",{className:`${J.oauth&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ed.map(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return(0,r.jsx)(C,{providerId:e,provider:t,stats:es(e,s),onToggle:t=>ei(e,"oauth",t)},e)})})]}),(ec.length>0||em.length>0)&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"savings",title:"Free Tier Providers",description:"Ready-to-use and free-tier routing options",count:ec.length+em.length,collapsed:J.free&&!W.trim(),onToggle:()=>ea("free"),children:(0,r.jsxs)("button",{onClick:()=>el("free"),disabled:q.has("free"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("free")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("free")?" animate-spin":""}`,children:"play_arrow"}),q.has("free")?"Testing...":"Test All"]})}),(0,r.jsxs)("div",{className:`${J.free&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:[ec.map(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return(0,r.jsx)(C,{providerId:e,provider:t,stats:es(e,s?["oauth","apikey"]:"oauth"),onToggle:t=>ei(e,s?"apikey":"oauth",t)},e)}),em.map(([e,t])=>(0,r.jsx)(T,{providerId:e,provider:t,stats:es(e,"apikey"),onToggle:t=>ei(e,"apikey",t)},e))]})]}),ep.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(k,{icon:"key",title:"API Key Providers",description:"Bring your own provider credentials",count:ep.length,collapsed:J.apikey&&!W.trim(),onToggle:()=>ea("apikey"),children:(0,r.jsxs)("button",{onClick:()=>el("apikey"),disabled:q.has("apikey"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${q.has("apikey")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${q.has("apikey")?" animate-spin":""}`,children:"play_arrow"}),q.has("apikey")?"Testing...":"Test All"]})}),(0,r.jsx)("div",{className:`${J.apikey&&!W.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ex.map(([e,t])=>(0,r.jsx)(T,{providerId:e,provider:t,stats:es(e,"apikey"),onToggle:t=>ei(e,"apikey",t)},e))}),ep.length>0&&(0,r.jsx)("div",{className:J.apikey&&!W.trim()?"hidden sm:block":"",children:(0,r.jsx)(n.dK,{currentPage:eu,pageSize:E,totalItems:ep.length,onPageChange:A,onPageSizeChange:e=>{I(e),A(1)}})})]}),(0,r.jsx)(S,{isOpen:P,onClose:()=>O(!1),onCreated:e=>{o(t=>[...t,e]),O(!1)}}),(0,r.jsx)($,{isOpen:_,onClose:()=>U(!1),onCreated:e=>{o(t=>[...t,e]),U(!1)}}),M&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>D(null),children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,r.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,r.jsx)("button",{onClick:()=>D(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,r.jsx)("div",{className:"p-5",children:(0,r.jsx)(R,{results:M})})]})]})]})}function k({icon:e,title:t,description:s,count:a,collapsed:i,onToggle:l,children:n}){return(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 sm:w-auto",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5 sm:flex-none",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-[17px] text-primary",children:e}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"truncate text-lg font-semibold leading-tight",children:t}),(0,r.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold tabular-nums text-text-muted",children:a})]}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-[11px] text-text-muted sm:text-xs",children:s})]})]}),(0,r.jsx)("button",{type:"button",onClick:l,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border text-text-muted transition-colors hover:border-primary/30 hover:text-primary sm:hidden","aria-expanded":!i,"aria-label":`${i?"Expand":"Collapse"} ${t}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i?"expand_more":"expand_less"})})]}),n&&(0,r.jsx)("div",{className:i?"hidden sm:block":"block",children:n})]})}function C({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:i,error:l,errorCode:d,allDisabled:c}=s,m=!!t.noAuth;return(0,r.jsx)("div",{className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${c?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center overflow-hidden whitespace-nowrap",children:c?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-success"}),"Ready"]}):y(i,l,d)})]})]}),(0,r.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 sm:flex",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!c)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!c,onChange:()=>{},title:c?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]}),(0,r.jsx)(A,{providerId:e,hasConnections:s.total>0,active:!c,onToggle:a})]})})})}function T({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:i,error:l,errorCode:d,allDisabled:m}=s,u=e.startsWith(c.JH),x=e.startsWith(c.DI);return(0,r.jsx)("div",{className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${m?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:u?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":x?"/providers/anthropic-m.png":`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap",children:m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):(0,r.jsxs)(r.Fragment,{children:[y(i,l,d),u&&(0,r.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["\xb7 ","responses"===t.apiType?"Responses":"Chat"]}),x&&(0,r.jsx)("span",{className:"text-[10px] text-text-subtle",children:"\xb7 Messages"})]})})]})]}),(0,r.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 sm:flex",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!m)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]}),(0,r.jsx)(A,{providerId:e,hasConnections:s.total>0,active:!m,onToggle:a})]})})})}function A({providerId:e,hasConnections:t,active:s,onToggle:i}){let[l,n]=(0,a.useState)(!1),o=(0,a.useRef)(null),d=(0,a.useId)();return(0,a.useEffect)(()=>{if(!l)return;let e=e=>{"Escape"!==e.key&&o.current?.contains(e.target)||n(!1)};return document.addEventListener("keydown",e),document.addEventListener("pointerdown",e),()=>{document.removeEventListener("keydown",e),document.removeEventListener("pointerdown",e)}},[l]),(0,r.jsxs)("div",{ref:o,className:"relative shrink-0 sm:hidden",children:[(0,r.jsx)("button",{type:"button","aria-label":"Provider actions","aria-expanded":l,"aria-controls":d,onClick:()=>n(e=>!e),className:"grid size-11 place-items-center rounded-xl text-text-muted transition-colors hover:bg-surface-2 hover:text-text-main focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",children:"more_vert"})}),l&&(0,r.jsxs)("div",{id:d,className:"absolute right-0 top-full z-20 mt-1 w-48 overflow-hidden rounded-xl border border-border bg-surface p-1 shadow-[var(--shadow-elev)]",children:[(0,r.jsxs)(p(),{href:`/dashboard/providers/${e}`,className:"flex min-h-11 items-center gap-2 rounded-lg px-3 text-sm text-text-main hover:bg-surface-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px]",children:"arrow_forward"}),"Open provider"]}),t&&(0,r.jsxs)("button",{type:"button",onClick:()=>{i(!s),n(!1)},className:"flex min-h-11 w-full items-center gap-2 rounded-lg px-3 text-left text-sm text-text-main hover:bg-surface-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px]",children:s?"pause_circle":"play_circle"}),s?"Disable provider":"Enable provider"]})]})]})}function S({isOpen:e,onClose:t,onCreated:s}){let[i,l]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{let e="https://api.openai.com/v1";l(t=>t.baseUrl&&t.baseUrl!==e?t:{...t,baseUrl:e})},[i.apiType]);let y=async()=>{if(i.name.trim()&&i.prefix.trim()&&i.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.name,prefix:i.prefix,apiType:i.apiType,baseUrl:i.baseUrl,type:"openai-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),l({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating OpenAI Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:i.baseUrl,apiKey:c,type:"openai-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:i.name,onChange:e=>l({...i,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:i.prefix,onChange:e=>l({...i,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:i.apiType,onChange:e=>l({...i,apiType:e.target.value})}),(0,r.jsx)(n.pd,{label:"Base URL",value:i.baseUrl,onChange:e=>l({...i,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>u(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||x||!i.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:x?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!i.name.trim()||!i.prefix.trim()||!i.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function $({isOpen:e,onClose:t,onCreated:s}){let[i,l]=(0,a.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(g(null),m(""),u(""),v(""))},[e]);let y=async()=>{if(i.name.trim()&&i.prefix.trim()&&i.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.name,prefix:i.prefix,baseUrl:i.baseUrl,type:"anthropic-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),l({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating Anthropic Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:i.baseUrl,apiKey:c,type:"anthropic-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:i.name,onChange:e=>l({...i,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:i.prefix,onChange:e=>l({...i,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.pd,{label:"Base URL",value:i.baseUrl,onChange:e=>l({...i,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>u(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||x||!i.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:x?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!i.name.trim()||!i.prefix.trim()||!i.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function R({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:s}=e,a=e.results||[];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[s]||s," Test"]}),(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),a.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]}),!e.valid&&(e.diagnosis?.message||e.error)&&(0,r.jsx)("span",{className:"block truncate text-[11px] text-red-400/90",title:String(e.diagnosis?.message||e.error),children:String(e.diagnosis?.message||e.error)})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===a.length&&(0,r.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}k.propTypes={icon:l().string.isRequired,title:l().string.isRequired,description:l().string.isRequired,count:l().number.isRequired,collapsed:l().bool.isRequired,onToggle:l().func.isRequired,children:l().node},C.propTypes={providerId:l().string.isRequired,provider:l().shape({id:l().string.isRequired,name:l().string.isRequired,color:l().string,textIcon:l().string}).isRequired,stats:l().shape({connected:l().number,error:l().number,errorCode:l().string,errorTime:l().string,total:l().number,allDisabled:l().bool}).isRequired,onToggle:l().func},A.propTypes={providerId:l().string.isRequired,hasConnections:l().bool.isRequired,active:l().bool.isRequired,onToggle:l().func.isRequired},T.propTypes={providerId:l().string.isRequired,provider:l().shape({id:l().string.isRequired,name:l().string.isRequired,color:l().string,textIcon:l().string,apiType:l().string}).isRequired,stats:l().shape({connected:l().number,error:l().number,errorCode:l().string,errorTime:l().string,total:l().number,allDisabled:l().bool}).isRequired,onToggle:l().func},S.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onCreated:l().func.isRequired},$.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onCreated:l().func.isRequired},R.propTypes={results:l().shape({mode:l().string,results:l().array,summary:l().shape({total:l().number,passed:l().number,failed:l().number}),error:l().string}).isRequired}},28915:(e,t,s)=>{"use strict";s.d(t,{x6:()=>r.fetchJson,E2:()=>a,gs:()=>i});var r=s(68211);function a(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function i(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let r=Math.floor(s/24);return`${r}d ago`}},31703:(e,t,s)=>{Promise.resolve().then(s.bind(s,20490))},68211:(e,t,s)=>{"use strict";s.d(t,{fetchJson:()=>a});let r={"Content-Type":"application/json"};async function a(e,t={}){let{body:s,headers:i,...l}=t,n={...l,headers:{...r,...i}};void 0!==s&&"string"!=typeof s?n.body=JSON.stringify(s):void 0!==s&&(n.body=s);let o=await fetch(e,n),d=await o.text(),c=null;if(d)try{c=JSON.parse(d)}catch{let t=Error(`Non-JSON response from ${e} (HTTP ${o.status})`);throw t.status=o.status,t.rawBody=d.slice(0,300),t}if(!o.ok){let e=c&&(c.error?.message||c.error||c.message)||`Request failed (HTTP ${o.status})`,t=Error("string"==typeof e?e:`HTTP ${o.status}`);throw t.status=o.status,t.data=c,t}return c}a.get=(e,t)=>a(e,{...t,method:"GET"}),a.post=(e,t,s)=>a(e,{...s,method:"POST",body:t}),a.put=(e,t,s)=>a(e,{...s,method:"PUT",body:t}),a.patch=(e,t,s)=>a(e,{...s,method:"PATCH",body:t}),a.del=(e,t)=>a(e,{...t,method:"DELETE"})}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=31703)),_N_E=e.O()}]);
|