@yina-npm/openrouterx 0.4.38 → 0.4.53
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/README.md +89 -396
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +8 -8
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/required-server-files.json +16 -3
- package/app/.next/routes-manifest.json +26 -24
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +24 -0
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -0
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -0
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +10 -10
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/user/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +2 -2
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/me/route.js +1 -1
- package/app/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js +10 -2
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route.js +9 -0
- package/app/.next/server/app/api/{cloud/auth → cli-tools/deepseek-tui-settings}/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/jcode-settings/route.js +3 -0
- package/app/.next/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js +1 -1
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next/server/app/api/locale/route.js +1 -1
- package/app/.next/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/message/route.js +3 -3
- package/app/.next/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +4 -4
- package/app/.next/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js +1 -0
- package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -0
- package/app/.next/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/custom/route.js +1 -1
- package/app/.next/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/disabled/route.js +1 -1
- package/app/.next/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/network-analysis/route.js +2 -2
- package/app/.next/server/app/api/network-analysis/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/database/route.js +1 -1
- package/app/.next/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next/server/app/api/startup-notices/route.js +2 -2
- package/app/.next/server/app/api/startup-notices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-install/route.js +4 -4
- package/app/.next/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/api-keys/route.js +1 -1
- package/app/.next/server/app/api/usage/api-keys/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/chart/route.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/stats/route.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +2 -2
- package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next/server/app/api/users/[id]/route.js +1 -1
- package/app/.next/server/app/api/users/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/users/route.js +1 -1
- package/app/.next/server/app/api/users/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/search/route.js +1 -1
- package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next/server/app/api/version/update/route.js +1 -1
- package/app/.next/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/favicon.ico/route.js +1 -1
- package/app/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +8 -8
- package/app/.next/server/chunks/1350.js +4 -4
- package/app/.next/server/chunks/1476.js +1 -0
- package/app/.next/server/chunks/2415.js +17 -0
- package/app/.next/server/chunks/2506.js +4 -4
- package/app/.next/server/chunks/2560.js +1 -1
- package/app/.next/server/chunks/2574.js +1 -0
- package/app/.next/server/chunks/2722.js +58 -0
- package/app/.next/server/chunks/3110.js +56 -5
- package/app/.next/server/chunks/3493.js +2 -2
- package/app/.next/server/chunks/3593.js +2 -2
- package/app/.next/server/chunks/412.js +5 -5
- package/app/.next/server/chunks/{9641.js → 4565.js} +2 -2
- package/app/.next/server/chunks/4664.js +1 -1
- package/app/.next/server/chunks/5217.js +1 -1
- package/app/.next/server/chunks/5330.js +7 -5
- package/app/.next/server/chunks/5681.js +1 -1
- package/app/.next/server/chunks/6001.js +1 -1
- package/app/.next/server/chunks/6393.js +1 -1
- package/app/.next/server/chunks/7177.js +1 -0
- package/app/.next/server/chunks/7595.js +1 -1
- package/app/.next/server/chunks/7828.js +1 -1
- package/app/.next/server/chunks/7930.js +6 -0
- package/app/.next/server/chunks/8574.js +1 -0
- package/app/.next/server/chunks/8651.js +9 -0
- package/app/.next/server/chunks/8750.js +1 -0
- package/app/.next/server/chunks/8760.js +1 -1
- package/app/.next/server/chunks/8895.js +25 -16
- package/app/.next/server/chunks/9095.js +1 -0
- package/app/.next/server/chunks/9489.js +1 -1
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/chunks/9856.js +1 -1
- package/app/.next/server/functions-config-manifest.json +2 -30
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/4G6rOhJtfkDwKINMqIIf1/_buildManifest.js +1 -0
- package/app/.next/static/chunks/1321-682ad944ed69404c.js +1 -0
- package/app/.next/static/chunks/4072-fdb34c3bf82582e6.js +6 -0
- package/app/.next/static/chunks/{5095-42d435b0583b2f98.js → 5095-47fe70cd930f3c59.js} +2 -2
- package/app/.next/static/chunks/5497-b59396fb56e7b9b1.js +7 -0
- package/app/.next/static/chunks/6069-7c51e16aef293430.js +58 -0
- package/app/.next/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-efbd0b93d35d25cc.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-acbac7a67319955a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-7fabe6d07b1f8823.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/focus-ui/{page-fb59dea0e48968bf.js → page-329b3a170ddd28c6.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-e43ee64cc1f1547c.js +59 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-e0f570e37fcc4d53.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-31a6e1cb19ebc4d8.js → page-c3234f9c82b1a78e.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-979e3e3663264d2b.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-5040868a50d977bf.js +4 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-18d6399108c458a6.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/me/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/status/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/health/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/custom/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/disabled/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/network-analysis/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/startup-notices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/disable/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/enable/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/status/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/api-keys/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/users/[id]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/users/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/info/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/search/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/version/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/version/shutdown/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/api/version/update/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/manifest.webmanifest/route-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/app/page-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/{main-2237af167d2c1c35.js → main-b8d198db3858ff3e.js} +3 -3
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-814b95c8fc310a6a.js +1 -0
- package/app/.next/static/css/9b92fc8235e99d1e.css +1 -0
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/app/node_modules/sql.js/dist/sql-wasm.js +185 -0
- package/app/node_modules/sql.js/dist/sql-wasm.wasm +0 -0
- package/app/node_modules/sql.js/package.json +58 -0
- package/app/package.json +6 -2
- package/app/public/i18n/literals/ar.json +200 -173
- package/app/public/i18n/literals/bn.json +200 -173
- package/app/public/i18n/literals/cs.json +200 -173
- package/app/public/i18n/literals/da.json +200 -173
- package/app/public/i18n/literals/de.json +200 -173
- package/app/public/i18n/literals/el.json +200 -173
- package/app/public/i18n/literals/es.json +200 -173
- package/app/public/i18n/literals/fi.json +200 -173
- package/app/public/i18n/literals/fr.json +200 -173
- package/app/public/i18n/literals/he.json +200 -173
- package/app/public/i18n/literals/hi.json +200 -173
- package/app/public/i18n/literals/hu.json +200 -173
- package/app/public/i18n/literals/id.json +200 -173
- package/app/public/i18n/literals/it.json +200 -173
- package/app/public/i18n/literals/ja.json +200 -173
- package/app/public/i18n/literals/ko.json +200 -173
- package/app/public/i18n/literals/nl.json +200 -173
- package/app/public/i18n/literals/no.json +200 -173
- package/app/public/i18n/literals/pl.json +200 -173
- package/app/public/i18n/literals/pt-BR.json +200 -173
- package/app/public/i18n/literals/pt-PT.json +200 -173
- package/app/public/i18n/literals/ro.json +200 -173
- package/app/public/i18n/literals/ru.json +200 -173
- package/app/public/i18n/literals/sv.json +200 -173
- package/app/public/i18n/literals/th.json +200 -173
- package/app/public/i18n/literals/tl.json +200 -173
- package/app/public/i18n/literals/tr.json +200 -173
- package/app/public/i18n/literals/uk.json +200 -173
- package/app/public/i18n/literals/ur.json +200 -173
- package/app/public/i18n/literals/vi.json +200 -173
- package/app/public/i18n/literals/zh-CN.json +381 -359
- package/app/public/i18n/literals/zh-TW.json +208 -181
- package/app/public/providers/amp.png +0 -0
- package/app/public/providers/deepseek-tui.png +0 -0
- package/app/public/providers/jcode.png +0 -0
- package/app/public/providers/xiaomi-tokenplan.png +0 -0
- package/app/server.js +1 -1
- package/app/src/lib/db/migrate.js +56 -18
- package/app/src/mitm/config.js +16 -1
- package/app/src/mitm/handlers/antigravity.js +2 -1
- package/app/src/mitm/handlers/base.js +4 -1
- package/app/src/mitm/handlers/kiro.js +3 -1
- package/app/src/mitm/logger.js +11 -1
- package/app/src/mitm/server.js +18 -15
- package/package.json +2 -2
- package/app/.next/server/app/api/cloud/auth/route.js +0 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +0 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +0 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +0 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +0 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +0 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +0 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +0 -1
- package/app/.next/server/chunks/2343.js +0 -1
- package/app/.next/server/chunks/3855.js +0 -1
- package/app/.next/server/chunks/4126.js +0 -1
- package/app/.next/server/chunks/4922.js +0 -9
- package/app/.next/server/chunks/5434.js +0 -1
- package/app/.next/server/chunks/5627.js +0 -17
- package/app/.next/server/chunks/723.js +0 -44
- package/app/.next/server/chunks/8866.js +0 -1
- package/app/.next/server/chunks/9300.js +0 -3
- package/app/.next/server/chunks/9460.js +0 -1
- package/app/.next/static/9qtW6KlzV_D2b828CZp1A/_buildManifest.js +0 -1
- package/app/.next/static/chunks/1321-634f2d25db77d618.js +0 -1
- package/app/.next/static/chunks/4072-91de6609dc7e6753.js +0 -3
- package/app/.next/static/chunks/5497-4a0f0c365aea0ea7.js +0 -7
- package/app/.next/static/chunks/5964-08d6048e026d4245.js +0 -44
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-211e322f002d5464.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-69469b6440aff8d0.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-95d31a6372622fcf.js +0 -59
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-7ae37df256035f59.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-9d071b63170b7f71.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-7762d83be0982941.js +0 -4
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-f77dc916ed5a6f99.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/me/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/status/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/health/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/custom/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/disabled/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/network-analysis/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/startup-notices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/disable/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/enable/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/status/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/api-keys/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/users/[id]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/users/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/info/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/search/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/version/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/version/shutdown/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/api/version/update/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/app/page-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1879675a73caf73c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1879675a73caf73c.js +0 -1
- package/app/.next/static/css/f6642f5333f94810.css +0 -1
- /package/app/.next/static/{9qtW6KlzV_D2b828CZp1A → 4G6rOhJtfkDwKINMqIIf1}/_ssgManifest.js +0 -0
|
@@ -14,6 +14,30 @@ const MIGRATED_MARKER = path.join(DB_DIR, ".migrated-from-json");
|
|
|
14
14
|
// Track per-adapter so reusing same adapter skips re-run, but new adapter (after reset) re-runs.
|
|
15
15
|
const _migratedAdapters = new WeakSet();
|
|
16
16
|
|
|
17
|
+
// Thrown when row-count assertion fails. Outer transaction rolls back,
|
|
18
|
+
// legacy db.json kept intact, marker not written → next boot retries.
|
|
19
|
+
export class MigrationAborted extends Error {
|
|
20
|
+
constructor(message, droppedRows) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = "MigrationAborted";
|
|
23
|
+
this.droppedRows = droppedRows;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Insert rows one-by-one, collect failures, then assert COUNT(*) matches input length.
|
|
28
|
+
function importWithAssertion(adapter, tableName, rows, insertFn, rowMeta) {
|
|
29
|
+
const dropped = [];
|
|
30
|
+
for (const row of rows) {
|
|
31
|
+
try { insertFn(row); }
|
|
32
|
+
catch (err) { dropped.push({ ...rowMeta(row), reason: err.message }); }
|
|
33
|
+
}
|
|
34
|
+
const inserted = adapter.get(`SELECT COUNT(*) as c FROM ${tableName}`)?.c ?? 0;
|
|
35
|
+
if (inserted !== rows.length) {
|
|
36
|
+
console.warn(`[DB][migrate] ${tableName} row-count mismatch: expected ${rows.length}, got ${inserted}. Dropped:`, dropped);
|
|
37
|
+
throw new MigrationAborted(`${tableName} row-count mismatch: expected ${rows.length}, got ${inserted}`, dropped);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
17
41
|
function readJsonSafe(file) {
|
|
18
42
|
if (!fs.existsSync(file)) return null;
|
|
19
43
|
try { return JSON.parse(fs.readFileSync(file, "utf-8")); } catch { return null; }
|
|
@@ -91,39 +115,45 @@ function importLegacyMain(adapter, data) {
|
|
|
91
115
|
if (data.settings) {
|
|
92
116
|
adapter.run(`INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data`, [stringifyJson(data.settings)]);
|
|
93
117
|
}
|
|
94
|
-
|
|
118
|
+
|
|
119
|
+
importWithAssertion(adapter, "providerConnections", data.providerConnections || [], (c) => {
|
|
95
120
|
const { id, provider, authType, name, email, priority, isActive, createdAt, updatedAt, ...rest } = c;
|
|
96
121
|
adapter.run(
|
|
97
122
|
`INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
98
123
|
[id, provider, authType || "oauth", name || null, email || null, priority || null, isActive === false ? 0 : 1, stringifyJson(rest), createdAt || new Date().toISOString(), updatedAt || new Date().toISOString()]
|
|
99
124
|
);
|
|
100
|
-
}
|
|
101
|
-
|
|
125
|
+
}, (c) => ({ id: c.id ?? null, provider: c.provider ?? null, name: c.name ?? null }));
|
|
126
|
+
|
|
127
|
+
importWithAssertion(adapter, "providerNodes", data.providerNodes || [], (n) => {
|
|
102
128
|
const { id, type, name, createdAt, updatedAt, ...rest } = n;
|
|
103
129
|
adapter.run(
|
|
104
130
|
`INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)`,
|
|
105
131
|
[id, type || null, name || null, stringifyJson(rest), createdAt || new Date().toISOString(), updatedAt || new Date().toISOString()]
|
|
106
132
|
);
|
|
107
|
-
}
|
|
108
|
-
|
|
133
|
+
}, (n) => ({ id: n.id ?? null, type: n.type ?? null, name: n.name ?? null }));
|
|
134
|
+
|
|
135
|
+
importWithAssertion(adapter, "proxyPools", data.proxyPools || [], (p) => {
|
|
109
136
|
const { id, isActive, testStatus, createdAt, updatedAt, ...rest } = p;
|
|
110
137
|
adapter.run(
|
|
111
138
|
`INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)`,
|
|
112
139
|
[id, isActive === false ? 0 : 1, testStatus || "unknown", stringifyJson(rest), createdAt || new Date().toISOString(), updatedAt || new Date().toISOString()]
|
|
113
140
|
);
|
|
114
|
-
}
|
|
115
|
-
|
|
141
|
+
}, (p) => ({ id: p.id ?? null }));
|
|
142
|
+
|
|
143
|
+
importWithAssertion(adapter, "apiKeys", data.apiKeys || [], (k) => {
|
|
116
144
|
adapter.run(
|
|
117
145
|
`INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)`,
|
|
118
146
|
[k.id, k.key, k.name || null, k.machineId || null, k.isActive === false ? 0 : 1, k.createdAt || new Date().toISOString()]
|
|
119
147
|
);
|
|
120
|
-
}
|
|
121
|
-
|
|
148
|
+
}, (k) => ({ id: k.id ?? null, name: k.name ?? null }));
|
|
149
|
+
|
|
150
|
+
importWithAssertion(adapter, "combos", data.combos || [], (c) => {
|
|
122
151
|
adapter.run(
|
|
123
152
|
`INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)`,
|
|
124
153
|
[c.id, c.name, c.kind || null, stringifyJson(c.models || []), c.createdAt || new Date().toISOString(), c.updatedAt || new Date().toISOString()]
|
|
125
154
|
);
|
|
126
|
-
}
|
|
155
|
+
}, (c) => ({ id: c.id ?? null, name: c.name ?? null }));
|
|
156
|
+
|
|
127
157
|
for (const [alias, model] of Object.entries(data.modelAliases || {})) {
|
|
128
158
|
adapter.run(`INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)`, [alias, stringifyJson(model)]);
|
|
129
159
|
}
|
|
@@ -210,14 +240,22 @@ export async function runMigrationOnce(adapter) {
|
|
|
210
240
|
const backupDir = makeBackupDir("migrate-from-json");
|
|
211
241
|
for (const f of Object.values(LEGACY_FILES)) backupFile(f, backupDir);
|
|
212
242
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
243
|
+
try {
|
|
244
|
+
adapter.transaction(() => {
|
|
245
|
+
importLegacyMain(adapter, legacyMain);
|
|
246
|
+
importLegacyUsage(adapter, legacyUsage);
|
|
247
|
+
importLegacyDisabled(adapter, legacyDisabled);
|
|
248
|
+
importLegacyDetails(adapter, legacyDetails);
|
|
249
|
+
setMetaSync(adapter, "appVersion", getAppVersion());
|
|
250
|
+
setMetaSync(adapter, "migratedAt", new Date().toISOString());
|
|
251
|
+
});
|
|
252
|
+
} catch (err) {
|
|
253
|
+
if (err instanceof MigrationAborted) {
|
|
254
|
+
console.error(`[DB][migrate] aborted: ${err.message} | legacy JSON kept | backup: ${backupDir}`);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
throw err;
|
|
258
|
+
}
|
|
221
259
|
|
|
222
260
|
try { fs.writeFileSync(MIGRATED_MARKER, new Date().toISOString()); } catch {}
|
|
223
261
|
pruneOldBackups();
|
package/app/src/mitm/config.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// All intercepted domains + URL patterns per tool
|
|
2
2
|
|
|
3
|
+
const IS_DEV = process.env.NODE_ENV === "development";
|
|
4
|
+
|
|
3
5
|
const TARGET_HOSTS = [
|
|
4
6
|
"daily-cloudcode-pa.googleapis.com",
|
|
5
7
|
"cloudcode-pa.googleapis.com",
|
|
@@ -51,6 +53,19 @@ const MODEL_SYNONYMS = {
|
|
|
51
53
|
},
|
|
52
54
|
};
|
|
53
55
|
|
|
56
|
+
// Pattern fallback: rawModel regex → canonical alias key (when exact + prefix match fail)
|
|
57
|
+
// Order matters: more specific patterns first. Catches AG renamed variants (e.g. gemini-pro-agent)
|
|
58
|
+
const MODEL_PATTERNS = {
|
|
59
|
+
antigravity: [
|
|
60
|
+
{ match: /flash/i, alias: "gemini-3-flash" },
|
|
61
|
+
{ match: /pro.*low|low.*pro/i, alias: "gemini-3.1-pro-low" },
|
|
62
|
+
{ match: /gemini.*pro|pro.*gemini/i, alias: "gemini-3.1-pro-high" },
|
|
63
|
+
{ match: /opus/i, alias: "claude-opus-4-6-thinking" },
|
|
64
|
+
{ match: /sonnet|claude/i, alias: "claude-sonnet-4-6" },
|
|
65
|
+
{ match: /gpt.*oss|oss/i, alias: "gpt-oss-120b-medium" },
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
|
|
54
69
|
// URL substrings whose request/response should NOT be dumped to file (telemetry, polling, empty)
|
|
55
70
|
const LOG_BLACKLIST_URL_PARTS = [
|
|
56
71
|
"recordCodeAssistMetrics",
|
|
@@ -70,4 +85,4 @@ function getToolForHost(host) {
|
|
|
70
85
|
return null;
|
|
71
86
|
}
|
|
72
87
|
|
|
73
|
-
module.exports = { TARGET_HOSTS, URL_PATTERNS, MODEL_SYNONYMS, LOG_BLACKLIST_URL_PARTS, getToolForHost };
|
|
88
|
+
module.exports = { IS_DEV, TARGET_HOSTS, URL_PATTERNS, MODEL_SYNONYMS, MODEL_PATTERNS, LOG_BLACKLIST_URL_PARTS, getToolForHost };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { log, err, createResponseDumper } = require("../logger");
|
|
2
|
+
const { IS_DEV } = require("../config");
|
|
2
3
|
const { fetchRouter, pipeSSE } = require("./base");
|
|
3
4
|
|
|
4
5
|
const NO_CREDENTIALS_MARKER = "No active credentials for provider";
|
|
@@ -13,7 +14,7 @@ const NO_CREDENTIALS_MARKER = "No active credentials for provider";
|
|
|
13
14
|
* without requiring a login in the Router dashboard.
|
|
14
15
|
*/
|
|
15
16
|
async function intercept(req, res, bodyBuffer, mappedModel, passthrough) {
|
|
16
|
-
const dumper = createResponseDumper(req, "intercept-antigravity");
|
|
17
|
+
const dumper = IS_DEV ? createResponseDumper(req, "intercept-antigravity") : null;
|
|
17
18
|
const isStream = req.url.includes(":streamGenerateContent");
|
|
18
19
|
try {
|
|
19
20
|
const body = JSON.parse(bodyBuffer.toString());
|
|
@@ -3,8 +3,11 @@ const { log, err } = require("../logger");
|
|
|
3
3
|
const DEFAULT_LOCAL_ROUTER = "http://localhost:20502";
|
|
4
4
|
const ROUTER_BASE = String(process.env.MITM_ROUTER_BASE || DEFAULT_LOCAL_ROUTER)
|
|
5
5
|
.trim()
|
|
6
|
+
.replace(/^(['"])(.*)\1$/, "$2")
|
|
6
7
|
.replace(/\/+$/, "") || DEFAULT_LOCAL_ROUTER;
|
|
7
|
-
const API_KEY = process.env.ROUTER_API_KEY
|
|
8
|
+
const API_KEY = String(process.env.ROUTER_API_KEY || "")
|
|
9
|
+
.trim()
|
|
10
|
+
.replace(/^(['"])(.*)\1$/, "$2");
|
|
8
11
|
|
|
9
12
|
// Headers that must not be forwarded to OpenrouterX
|
|
10
13
|
const STRIP_HEADERS = new Set([
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const { err } = require("../logger");
|
|
2
|
+
const { IS_DEV } = require("../config");
|
|
2
3
|
const { fetchRouter } = require("./base");
|
|
3
4
|
const fs = require("fs");
|
|
4
5
|
const path = require("path");
|
|
5
6
|
|
|
6
|
-
// Debug trace log — written to data/logs/mitm/kiro-debug.log
|
|
7
|
+
// Debug trace log — written to data/logs/mitm/kiro-debug.log (dev only)
|
|
7
8
|
const DEBUG_LOG = path.join(__dirname, "../../../data/logs/mitm/kiro-debug.log");
|
|
8
9
|
function dbg(msg) {
|
|
10
|
+
if (!IS_DEV) return;
|
|
9
11
|
try {
|
|
10
12
|
fs.appendFileSync(DEBUG_LOG, `${new Date().toISOString()} ${msg}\n`);
|
|
11
13
|
} catch {}
|
package/app/src/mitm/logger.js
CHANGED
|
@@ -27,6 +27,16 @@ function ensureDumpDir() {
|
|
|
27
27
|
|
|
28
28
|
const DUMP_DIR = ensureDumpDir();
|
|
29
29
|
|
|
30
|
+
// Clear all files inside DUMP_DIR (called on MITM server start to avoid unbounded growth)
|
|
31
|
+
function clearDumpDir() {
|
|
32
|
+
try {
|
|
33
|
+
if (!fs.existsSync(DUMP_DIR)) return;
|
|
34
|
+
for (const f of fs.readdirSync(DUMP_DIR)) {
|
|
35
|
+
try { fs.rmSync(path.join(DUMP_DIR, f), { recursive: true, force: true }); } catch { /* ignore */ }
|
|
36
|
+
}
|
|
37
|
+
} catch { /* ignore */ }
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
const EMPTY_BODY_RE = /^\s*(\{\s*\}|\[\s*\]|null)?\s*$/;
|
|
31
41
|
|
|
32
42
|
function slugify(s, max = 80) {
|
|
@@ -106,4 +116,4 @@ function createResponseDumper(req, tag = "raw") {
|
|
|
106
116
|
};
|
|
107
117
|
}
|
|
108
118
|
|
|
109
|
-
module.exports = { log, err, dumpRequest, createResponseDumper };
|
|
119
|
+
module.exports = { log, err, dumpRequest, createResponseDumper, clearDumpDir };
|
package/app/src/mitm/server.js
CHANGED
|
@@ -6,8 +6,8 @@ const os = require("os");
|
|
|
6
6
|
const zlib = require("zlib");
|
|
7
7
|
const { promisify } = require("util");
|
|
8
8
|
const { execSync } = require("child_process");
|
|
9
|
-
const { log, err, dumpRequest, createResponseDumper } = require("./logger");
|
|
10
|
-
const { TARGET_HOSTS, URL_PATTERNS, MODEL_SYNONYMS, getToolForHost } = require("./config");
|
|
9
|
+
const { log, err, dumpRequest, createResponseDumper, clearDumpDir } = require("./logger");
|
|
10
|
+
const { IS_DEV, TARGET_HOSTS, URL_PATTERNS, MODEL_SYNONYMS, MODEL_PATTERNS, getToolForHost } = require("./config");
|
|
11
11
|
const { pickReachableAddress, createLocalAliasResolutionError } = require("./upstreamResolver");
|
|
12
12
|
const {
|
|
13
13
|
createLocalAntigravityLoadCodeAssistPayload,
|
|
@@ -19,7 +19,10 @@ const { getCertForDomain } = require("./cert/generate");
|
|
|
19
19
|
const { getMitmAlias } = require("./dbReader");
|
|
20
20
|
const LOCAL_PORT = 443;
|
|
21
21
|
const IS_WIN = process.platform === "win32";
|
|
22
|
-
const ENABLE_FILE_LOG =
|
|
22
|
+
const ENABLE_FILE_LOG = IS_DEV;
|
|
23
|
+
|
|
24
|
+
// Clear stale dump files on every MITM start (prevents unbounded disk usage)
|
|
25
|
+
clearDumpDir();
|
|
23
26
|
const INTERNAL_REQUEST_HEADER = { name: "x-request-source", value: "local" };
|
|
24
27
|
|
|
25
28
|
// Host rewrite for upstream forward: PROD cloudcode-pa is rate-limited (429),
|
|
@@ -29,18 +32,12 @@ const HOST_REWRITE = {
|
|
|
29
32
|
"daily-cloudcode-pa.sandbox.googleapis.com": "daily-cloudcode-pa.googleapis.com",
|
|
30
33
|
};
|
|
31
34
|
|
|
32
|
-
// Load handlers — dev/ overrides handlers/ for private implementations
|
|
33
|
-
function loadHandler(name) {
|
|
34
|
-
try { return require(`./dev/${name}`); } catch {}
|
|
35
|
-
return require(`./handlers/${name}`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
35
|
const handlers = {
|
|
39
|
-
antigravity:
|
|
40
|
-
copilot:
|
|
41
|
-
kiro:
|
|
42
|
-
cursor:
|
|
43
|
-
openrouter:
|
|
36
|
+
antigravity: require("./handlers/antigravity"),
|
|
37
|
+
copilot: require("./handlers/copilot"),
|
|
38
|
+
kiro: require("./handlers/kiro"),
|
|
39
|
+
cursor: require("./handlers/cursor"),
|
|
40
|
+
openrouter: require("./handlers/openrouter"),
|
|
44
41
|
};
|
|
45
42
|
|
|
46
43
|
// ── SSL / SNI ─────────────────────────────────────────────────
|
|
@@ -190,7 +187,13 @@ function getMappedModel(tool, model) {
|
|
|
190
187
|
if (aliases[lookup]) return aliases[lookup];
|
|
191
188
|
// Prefix match fallback
|
|
192
189
|
const prefixKey = Object.keys(aliases).find(k => k && aliases[k] && (lookup.startsWith(k) || k.startsWith(lookup)));
|
|
193
|
-
|
|
190
|
+
if (prefixKey) return aliases[prefixKey];
|
|
191
|
+
// Pattern fallback: catches AG renamed variants (e.g. gemini-pro-agent → gemini-3.1-pro-high)
|
|
192
|
+
const patterns = MODEL_PATTERNS?.[tool] || [];
|
|
193
|
+
for (const { match, alias } of patterns) {
|
|
194
|
+
if (match.test(lookup) && aliases[alias]) return aliases[alias];
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
194
197
|
} catch { return null; }
|
|
195
198
|
}
|
|
196
199
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yina-npm/openrouterx",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "openrouterX CLI -
|
|
3
|
+
"version": "0.4.53",
|
|
4
|
+
"description": "openrouterX CLI - local AI provider router and dashboard",
|
|
5
5
|
"bin": {
|
|
6
6
|
"openrouterX": "./cli.js"
|
|
7
7
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3102,a.ids=[3102],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11259:(a,b,c)=>{"use strict";c.d(b,{Pv:()=>k}),c(73024);var d=c(51455),e=c(76760),f=c(73136);async function g(a,b,c){for(let d=0;d<b;d++)try{return await a()}catch(a){if(d<b-1)await new Promise(a=>setTimeout(a,c));else throw a}}class h{#a;#b;#c=!1;#d=null;#e=null;#f=null;#g=null;#h(a){return this.#g=a,this.#f||=new Promise((a,b)=>{this.#e=[a,b]}),new Promise((a,b)=>{this.#f?.then(a).catch(b)})}async #i(a){this.#c=!0;try{await (0,d.writeFile)(this.#b,a,"utf-8"),await g(async()=>{await (0,d.rename)(this.#b,this.#a)},10,100),this.#d?.[0]()}catch(a){throw a instanceof Error&&this.#d?.[1](a),a}finally{if(this.#c=!1,this.#d=this.#e,this.#e=this.#f=null,null!==this.#g){let a=this.#g;this.#g=null,await this.write(a)}}}constructor(a){this.#a=a,this.#b=function(a){let b=a instanceof URL?(0,f.fileURLToPath)(a):a.toString();return(0,e.join)((0,e.dirname)(b),`.${(0,e.basename)(b)}.tmp`)}(a)}async write(a){return this.#c?this.#h(a):this.#i(a)}}class i{#a;#j;constructor(a){this.#a=a,this.#j=new h(a)}async read(){let a;try{a=await (0,d.readFile)(this.#a,"utf-8")}catch(a){if("ENOENT"===a.code)return null;throw a}return a}write(a){return this.#j.write(a)}}class j{#k;#l;#m;constructor(a,{parse:b,stringify:c}){this.#k=new i(a),this.#l=b,this.#m=c}async read(){let a=await this.#k.read();return null===a?null:this.#l(a)}write(a){return this.#k.write(this.#m(a))}}class k extends j{constructor(a){super(a,{parse:JSON.parse,stringify:a=>JSON.stringify(a,null,2)})}}},12412:a=>{"use strict";a.exports=require("assert")},21820:a=>{"use strict";a.exports=require("os")},24976:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>D,patchFetch:()=>C,routeModule:()=>y,serverHooks:()=>B,workAsyncStorage:()=>z,workUnitAsyncStorage:()=>A});var d={};c.r(d),c.d(d,{POST:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(71998);async function x(a){try{let b=a.headers.get("Authorization");if(!b?.startsWith("Bearer "))return v.NextResponse.json({error:"Missing API key"},{status:401});let c=b.slice(7);if(!await (0,w.ek)(c))return v.NextResponse.json({error:"Invalid API key"},{status:401});let d=(await (0,w.P)({isActive:!0})).map(a=>({provider:a.provider,authType:a.authType,apiKey:a.apiKey||null,accessToken:a.accessToken||null,refreshToken:a.refreshToken||null,projectId:a.projectId||null,expiresAt:a.expiresAt,priority:a.priority,globalPriority:a.globalPriority,defaultModel:a.defaultModel,isActive:a.isActive})),e=await (0,w.OM)();return v.NextResponse.json({connections:d,modelAliases:e})}catch(a){return console.log("Cloud auth error:",a),v.NextResponse.json({error:"Internal error"},{status:500})}}let y=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cloud/auth/route",pathname:"/api/cloud/auth",filename:"route",bundlePath:"app/api/cloud/auth/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/auth/route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:z,workUnitAsyncStorage:A,serverHooks:B}=y;function C(){return(0,g.patchFetch)({workAsyncStorage:z,workUnitAsyncStorage:A})}async function D(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),y.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cloud/auth/route";"/index"===d&&(d="/");let e=await y.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||y.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===y.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await y.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>y.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>y.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await y.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await y.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await y.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49120:(a,b,c)=>{"use strict";c.r(b),c.d(b,{APP_NAME:()=>j,DATA_DIR:()=>p,DB_FILE:()=>q,LEGACY_APP_NAME:()=>k,getDataDir:()=>o,getLegacyDataDir:()=>n,migrateLegacyDataFilesIfNeeded:()=>r});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="openrouterx",k="9router",l=["db.json","usage.json","log.txt","disabledModels.json","request-details.json"];function m(a){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),a):g().join(i().homedir(),`.${a}`)}function n(){return m(k)}function o(){let a=process.env.DATA_DIR;if(!a)return m(j);try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable -> fallback ~/.${j}`),m(j);throw b}}let p=o(),q=g().join(p,"db.json");function r(){if(process.env.DATA_DIR)return!1;let a=n();if(a===p||!e().existsSync(a))return!1;let b=!1;for(let c of(e().existsSync(p)||e().mkdirSync(p,{recursive:!0}),l)){let d=g().join(a,c),f=g().join(p,c);e().existsSync(d)&&!e().existsSync(f)&&(e().copyFileSync(d,f),b=!0)}return b}r()},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.getProviderNodes,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},82996:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});class d{adapter;data;constructor(a,b){!function(a,b){if(void 0===a)throw Error("lowdb: missing adapter");if(void 0===b)throw Error("lowdb: missing default data")}(a,b),this.adapter=a,this.data=b}async read(){let a=await this.adapter.read();a&&(this.data=a)}async write(){this.data&&await this.adapter.write(this.data)}async update(a){a(this.data),await this.write()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7502,9718],()=>b(b.s=24976));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloud/auth/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/auth/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1070,a.ids=[1070],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11259:(a,b,c)=>{"use strict";c.d(b,{Pv:()=>k}),c(73024);var d=c(51455),e=c(76760),f=c(73136);async function g(a,b,c){for(let d=0;d<b;d++)try{return await a()}catch(a){if(d<b-1)await new Promise(a=>setTimeout(a,c));else throw a}}class h{#a;#b;#c=!1;#d=null;#e=null;#f=null;#g=null;#h(a){return this.#g=a,this.#f||=new Promise((a,b)=>{this.#e=[a,b]}),new Promise((a,b)=>{this.#f?.then(a).catch(b)})}async #i(a){this.#c=!0;try{await (0,d.writeFile)(this.#b,a,"utf-8"),await g(async()=>{await (0,d.rename)(this.#b,this.#a)},10,100),this.#d?.[0]()}catch(a){throw a instanceof Error&&this.#d?.[1](a),a}finally{if(this.#c=!1,this.#d=this.#e,this.#e=this.#f=null,null!==this.#g){let a=this.#g;this.#g=null,await this.write(a)}}}constructor(a){this.#a=a,this.#b=function(a){let b=a instanceof URL?(0,f.fileURLToPath)(a):a.toString();return(0,e.join)((0,e.dirname)(b),`.${(0,e.basename)(b)}.tmp`)}(a)}async write(a){return this.#c?this.#h(a):this.#i(a)}}class i{#a;#j;constructor(a){this.#a=a,this.#j=new h(a)}async read(){let a;try{a=await (0,d.readFile)(this.#a,"utf-8")}catch(a){if("ENOENT"===a.code)return null;throw a}return a}write(a){return this.#j.write(a)}}class j{#k;#l;#m;constructor(a,{parse:b,stringify:c}){this.#k=new i(a),this.#l=b,this.#m=c}async read(){let a=await this.#k.read();return null===a?null:this.#l(a)}write(a){return this.#k.write(this.#m(a))}}class k extends j{constructor(a){super(a,{parse:JSON.parse,stringify:a=>JSON.stringify(a,null,2)})}}},12412:a=>{"use strict";a.exports=require("assert")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49120:(a,b,c)=>{"use strict";c.r(b),c.d(b,{APP_NAME:()=>j,DATA_DIR:()=>p,DB_FILE:()=>q,LEGACY_APP_NAME:()=>k,getDataDir:()=>o,getLegacyDataDir:()=>n,migrateLegacyDataFilesIfNeeded:()=>r});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="openrouterx",k="9router",l=["db.json","usage.json","log.txt","disabledModels.json","request-details.json"];function m(a){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),a):g().join(i().homedir(),`.${a}`)}function n(){return m(k)}function o(){let a=process.env.DATA_DIR;if(!a)return m(j);try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable -> fallback ~/.${j}`),m(j);throw b}}let p=o(),q=g().join(p,"db.json");function r(){if(process.env.DATA_DIR)return!1;let a=n();if(a===p||!e().existsSync(a))return!1;let b=!1;for(let c of(e().existsSync(p)||e().mkdirSync(p,{recursive:!0}),l)){let d=g().join(a,c),f=g().join(p,c);e().existsSync(d)&&!e().existsSync(f)&&(e().copyFileSync(d,f),b=!0)}return b}r()},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.getProviderNodes,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},82996:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});class d{adapter;data;constructor(a,b){!function(a,b){if(void 0===a)throw Error("lowdb: missing adapter");if(void 0===b)throw Error("lowdb: missing default data")}(a,b),this.adapter=a,this.data=b}async read(){let a=await this.adapter.read();a&&(this.data=a)}async write(){this.data&&await this.adapter.write(this.data)}async update(a){a(this.data),await this.write()}}},83613:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>D,patchFetch:()=>C,routeModule:()=>y,serverHooks:()=>B,workAsyncStorage:()=>z,workUnitAsyncStorage:()=>A});var d={};c.r(d),c.d(d,{PUT:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(71998);async function x(a){try{let b=a.headers.get("Authorization");if(!b?.startsWith("Bearer "))return v.NextResponse.json({error:"Missing API key"},{status:401});let c=b.slice(7),{provider:d,credentials:e}=await a.json();if(!d||!e)return v.NextResponse.json({error:"Provider and credentials required"},{status:400});if(!await (0,w.ek)(c))return v.NextResponse.json({error:"Invalid API key"},{status:401});let f=(await (0,w.P)({provider:d,isActive:!0}))[0];if(!f)return v.NextResponse.json({error:`No active connection found for provider: ${d}`},{status:404});let g={};return e.accessToken&&(g.accessToken=e.accessToken),e.refreshToken&&(g.refreshToken=e.refreshToken),e.expiresIn&&(g.expiresAt=new Date(Date.now()+1e3*e.expiresIn).toISOString()),await (0,w.rj)(f.id,g),v.NextResponse.json({success:!0,message:`Credentials updated for provider: ${d}`})}catch(a){return console.log("Update credentials error:",a),v.NextResponse.json({error:"Failed to update credentials"},{status:500})}}let y=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cloud/credentials/update/route",pathname:"/api/cloud/credentials/update",filename:"route",bundlePath:"app/api/cloud/credentials/update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/credentials/update/route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:z,workUnitAsyncStorage:A,serverHooks:B}=y;function C(){return(0,g.patchFetch)({workAsyncStorage:z,workUnitAsyncStorage:A})}async function D(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),y.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cloud/credentials/update/route";"/index"===d&&(d="/");let e=await y.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||y.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===y.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await y.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>y.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>y.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await y.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await y.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await y.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7502,9718],()=>b(b.s=83613));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/package.json","../../../../../../../package.json","../../../../../../../src/shared/utils/apiKey.js","../../../../../../package.json","../../../../../chunks/1813.js","../../../../../chunks/4741.js","../../../../../chunks/6844.js","../../../../../chunks/7341.js","../../../../../chunks/7502.js","../../../../../chunks/9718.js","../../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloud/credentials/update/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/credentials/update/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7442,a.ids=[7442],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11259:(a,b,c)=>{"use strict";c.d(b,{Pv:()=>k}),c(73024);var d=c(51455),e=c(76760),f=c(73136);async function g(a,b,c){for(let d=0;d<b;d++)try{return await a()}catch(a){if(d<b-1)await new Promise(a=>setTimeout(a,c));else throw a}}class h{#a;#b;#c=!1;#d=null;#e=null;#f=null;#g=null;#h(a){return this.#g=a,this.#f||=new Promise((a,b)=>{this.#e=[a,b]}),new Promise((a,b)=>{this.#f?.then(a).catch(b)})}async #i(a){this.#c=!0;try{await (0,d.writeFile)(this.#b,a,"utf-8"),await g(async()=>{await (0,d.rename)(this.#b,this.#a)},10,100),this.#d?.[0]()}catch(a){throw a instanceof Error&&this.#d?.[1](a),a}finally{if(this.#c=!1,this.#d=this.#e,this.#e=this.#f=null,null!==this.#g){let a=this.#g;this.#g=null,await this.write(a)}}}constructor(a){this.#a=a,this.#b=function(a){let b=a instanceof URL?(0,f.fileURLToPath)(a):a.toString();return(0,e.join)((0,e.dirname)(b),`.${(0,e.basename)(b)}.tmp`)}(a)}async write(a){return this.#c?this.#h(a):this.#i(a)}}class i{#a;#j;constructor(a){this.#a=a,this.#j=new h(a)}async read(){let a;try{a=await (0,d.readFile)(this.#a,"utf-8")}catch(a){if("ENOENT"===a.code)return null;throw a}return a}write(a){return this.#j.write(a)}}class j{#k;#l;#m;constructor(a,{parse:b,stringify:c}){this.#k=new i(a),this.#l=b,this.#m=c}async read(){let a=await this.#k.read();return null===a?null:this.#l(a)}write(a){return this.#k.write(this.#m(a))}}class k extends j{constructor(a){super(a,{parse:JSON.parse,stringify:a=>JSON.stringify(a,null,2)})}}},12412:a=>{"use strict";a.exports=require("assert")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49120:(a,b,c)=>{"use strict";c.r(b),c.d(b,{APP_NAME:()=>j,DATA_DIR:()=>p,DB_FILE:()=>q,LEGACY_APP_NAME:()=>k,getDataDir:()=>o,getLegacyDataDir:()=>n,migrateLegacyDataFilesIfNeeded:()=>r});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="openrouterx",k="9router",l=["db.json","usage.json","log.txt","disabledModels.json","request-details.json"];function m(a){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),a):g().join(i().homedir(),`.${a}`)}function n(){return m(k)}function o(){let a=process.env.DATA_DIR;if(!a)return m(j);try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable -> fallback ~/.${j}`),m(j);throw b}}let p=o(),q=g().join(p,"db.json");function r(){if(process.env.DATA_DIR)return!1;let a=n();if(a===p||!e().existsSync(a))return!1;let b=!1;for(let c of(e().existsSync(p)||e().mkdirSync(p,{recursive:!0}),l)){let d=g().join(a,c),f=g().join(p,c);e().existsSync(d)&&!e().existsSync(f)&&(e().copyFileSync(d,f),b=!0)}return b}r()},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.getProviderNodes,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78156:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>D,patchFetch:()=>C,routeModule:()=>y,serverHooks:()=>B,workAsyncStorage:()=>z,workUnitAsyncStorage:()=>A});var d={};c.r(d),c.d(d,{POST:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(71998);async function x(a){try{let b=a.headers.get("Authorization");if(!b?.startsWith("Bearer "))return v.NextResponse.json({error:"Missing API key"},{status:401});let c=b.slice(7),{alias:d}=await a.json();if(!d)return v.NextResponse.json({error:"Missing alias"},{status:400});if(!await (0,w.ek)(c))return v.NextResponse.json({error:"Invalid API key"},{status:401});let e=(await (0,w.OM)())[d];if(e){let a=e.indexOf("/");if(a>0)return v.NextResponse.json({alias:d,provider:e.slice(0,a),model:e.slice(a+1)})}return v.NextResponse.json({error:"Alias not found"},{status:404})}catch(a){return console.log("Model resolve error:",a),v.NextResponse.json({error:"Internal error"},{status:500})}}let y=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cloud/model/resolve/route",pathname:"/api/cloud/model/resolve",filename:"route",bundlePath:"app/api/cloud/model/resolve/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/model/resolve/route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:z,workUnitAsyncStorage:A,serverHooks:B}=y;function C(){return(0,g.patchFetch)({workAsyncStorage:z,workUnitAsyncStorage:A})}async function D(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),y.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cloud/model/resolve/route";"/index"===d&&(d="/");let e=await y.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||y.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===y.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await y.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>y.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>y.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await y.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await y.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await y.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},82996:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});class d{adapter;data;constructor(a,b){!function(a,b){if(void 0===a)throw Error("lowdb: missing adapter");if(void 0===b)throw Error("lowdb: missing default data")}(a,b),this.adapter=a,this.data=b}async read(){let a=await this.adapter.read();a&&(this.data=a)}async write(){this.data&&await this.adapter.write(this.data)}async update(a){a(this.data),await this.write()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7502,9718],()=>b(b.s=78156));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/package.json","../../../../../../../package.json","../../../../../../../src/shared/utils/apiKey.js","../../../../../../package.json","../../../../../chunks/1813.js","../../../../../chunks/4741.js","../../../../../chunks/6844.js","../../../../../chunks/7341.js","../../../../../chunks/7502.js","../../../../../chunks/9718.js","../../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloud/model/resolve/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/model/resolve/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=5079,a.ids=[5079],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11259:(a,b,c)=>{"use strict";c.d(b,{Pv:()=>k}),c(73024);var d=c(51455),e=c(76760),f=c(73136);async function g(a,b,c){for(let d=0;d<b;d++)try{return await a()}catch(a){if(d<b-1)await new Promise(a=>setTimeout(a,c));else throw a}}class h{#a;#b;#c=!1;#d=null;#e=null;#f=null;#g=null;#h(a){return this.#g=a,this.#f||=new Promise((a,b)=>{this.#e=[a,b]}),new Promise((a,b)=>{this.#f?.then(a).catch(b)})}async #i(a){this.#c=!0;try{await (0,d.writeFile)(this.#b,a,"utf-8"),await g(async()=>{await (0,d.rename)(this.#b,this.#a)},10,100),this.#d?.[0]()}catch(a){throw a instanceof Error&&this.#d?.[1](a),a}finally{if(this.#c=!1,this.#d=this.#e,this.#e=this.#f=null,null!==this.#g){let a=this.#g;this.#g=null,await this.write(a)}}}constructor(a){this.#a=a,this.#b=function(a){let b=a instanceof URL?(0,f.fileURLToPath)(a):a.toString();return(0,e.join)((0,e.dirname)(b),`.${(0,e.basename)(b)}.tmp`)}(a)}async write(a){return this.#c?this.#h(a):this.#i(a)}}class i{#a;#j;constructor(a){this.#a=a,this.#j=new h(a)}async read(){let a;try{a=await (0,d.readFile)(this.#a,"utf-8")}catch(a){if("ENOENT"===a.code)return null;throw a}return a}write(a){return this.#j.write(a)}}class j{#k;#l;#m;constructor(a,{parse:b,stringify:c}){this.#k=new i(a),this.#l=b,this.#m=c}async read(){let a=await this.#k.read();return null===a?null:this.#l(a)}write(a){return this.#k.write(this.#m(a))}}class k extends j{constructor(a){super(a,{parse:JSON.parse,stringify:a=>JSON.stringify(a,null,2)})}}},12412:a=>{"use strict";a.exports=require("assert")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49120:(a,b,c)=>{"use strict";c.r(b),c.d(b,{APP_NAME:()=>j,DATA_DIR:()=>p,DB_FILE:()=>q,LEGACY_APP_NAME:()=>k,getDataDir:()=>o,getLegacyDataDir:()=>n,migrateLegacyDataFilesIfNeeded:()=>r});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="openrouterx",k="9router",l=["db.json","usage.json","log.txt","disabledModels.json","request-details.json"];function m(a){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),a):g().join(i().homedir(),`.${a}`)}function n(){return m(k)}function o(){let a=process.env.DATA_DIR;if(!a)return m(j);try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable -> fallback ~/.${j}`),m(j);throw b}}let p=o(),q=g().join(p,"db.json");function r(){if(process.env.DATA_DIR)return!1;let a=n();if(a===p||!e().existsSync(a))return!1;let b=!1;for(let c of(e().existsSync(p)||e().mkdirSync(p,{recursive:!0}),l)){let d=g().join(a,c),f=g().join(p,c);e().existsSync(d)&&!e().existsSync(f)&&(e().copyFileSync(d,f),b=!0)}return b}r()},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},68064:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>y,PUT:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(71998);async function x(a){try{let b=a.headers.get("authorization"),c=b?.replace("Bearer ","");if(!c)return v.NextResponse.json({error:"Missing API key"},{status:401});if(!await (0,w.ek)(c))return v.NextResponse.json({error:"Invalid API key"},{status:401});let{model:d,alias:e}=await a.json();if(!d||!e)return v.NextResponse.json({error:"Model and alias required"},{status:400});let f=(await (0,w.OM)())[e];if(f&&f!==d)return v.NextResponse.json({error:`Alias '${e}' already in use for model '${f}'`},{status:400});return await (0,w.o5)(e,d),v.NextResponse.json({success:!0,model:d,alias:e,message:`Alias '${e}' set for model '${d}'`})}catch(a){return console.log("Error updating alias:",a),v.NextResponse.json({error:"Failed to update alias"},{status:500})}}async function y(a){try{let b=a.headers.get("authorization"),c=b?.replace("Bearer ","");if(!c)return v.NextResponse.json({error:"Missing API key"},{status:401});if(!await (0,w.ek)(c))return v.NextResponse.json({error:"Invalid API key"},{status:401});let d=await (0,w.OM)();return v.NextResponse.json({aliases:d})}catch(a){return console.log("Error fetching aliases:",a),v.NextResponse.json({error:"Failed to fetch aliases"},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cloud/models/alias/route",pathname:"/api/cloud/models/alias",filename:"route",bundlePath:"app/api/cloud/models/alias/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/models/alias/route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cloud/models/alias/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.getProviderNodes,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},82996:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});class d{adapter;data;constructor(a,b){!function(a,b){if(void 0===a)throw Error("lowdb: missing adapter");if(void 0===b)throw Error("lowdb: missing default data")}(a,b),this.adapter=a,this.data=b}async read(){let a=await this.adapter.read();a&&(this.data=a)}async write(){this.data&&await this.adapter.write(this.data)}async update(a){a(this.data),await this.write()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7502,9718],()=>b(b.s=68064));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../node_modules/next/package.json","../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../node_modules/react/index.js","../../../../../../../node_modules/react/package.json","../../../../../../../package.json","../../../../../../../src/shared/utils/apiKey.js","../../../../../../package.json","../../../../../chunks/1813.js","../../../../../chunks/4741.js","../../../../../chunks/6844.js","../../../../../chunks/7341.js","../../../../../chunks/7502.js","../../../../../chunks/9718.js","../../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/cloud/models/alias/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/Users/bytedance/Documents/Projects/9router/src/app/api/cloud/models/alias/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=2343,exports.ids=[2343],exports.modules={2574:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>p,OPTIONS:()=>o,buildModelsList:()=>n});var d=c(81329),e=c(75681),f=c(89718),g=c(9132),h=c(38775);let i=/[-_][0-9a-f]{8,}$/i,j={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText"};function k(a){return a?.type&&j[a.type]||"llm"}async function l(a){if(!a?.apiKey)return[];let b="string"==typeof a?.providerSpecificData?.baseUrl?a.providerSpecificData.baseUrl.trim().replace(/\/$/,""):"";if(!b)return[];let c=`${b}/models`,d={"Content-Type":"application/json"};if((0,e.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,e.gb)(a.provider))return[];c.endsWith("/messages/models")?c=c.slice(0,-9):c.endsWith("/messages")&&(c=`${c.slice(0,-9)}/models`),d["x-api-key"]=a.apiKey,d["anthropic-version"]="2023-06-01",d.Authorization=`Bearer ${a.apiKey}`}try{var f;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),e=await fetch(c,{method:"GET",headers:d,cache:"no-store",signal:a.signal});if(clearTimeout(b),!e.ok)return[];let g=(f=await e.json(),Array.isArray(f)?f:f?.data||f?.models||f?.results||[]);return Array.from(new Set(g.map(a=>a?.id||a?.name||a?.model).filter(a=>"string"==typeof a&&""!==a.trim())))}catch{return[]}}function m(a,b){let c=e.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}async function n(a,b=null){let c=b?await (0,g.RG)(b):null,j=[];try{j=(j=await (0,f.getProviderConnections)()).filter(a=>!1!==a.isActive),c&&(j=(0,g.Mv)(j,c))}catch(a){console.log("Could not fetch providers, returning all models")}let o=[];try{o=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let p=[];try{p=await (0,f.uv)()}catch(a){console.log("Could not fetch custom models")}let q={};try{q=await (0,f.OM)()}catch(a){console.log("Could not fetch model aliases")}let r=new Map;for(let a of j)r.has(a.provider)||r.set(a.provider,a);let s=[],t=Math.floor(Date.now()/1e3);for(let b of o){if(!function(a,b){let c=a?.kind||"llm";return b.includes(c)}(b,a))continue;if(c){let a=!0;for(let d of b.models||[]){let b=await (0,h.mA)(d);if(!b?.provider||!(0,g.iI)(c,b.provider)){a=!1;break}}if(!a)continue}let d={id:b.name,object:"model",created:t,owned_by:"combo"};("webSearch"===b.kind||"webFetch"===b.kind)&&(d.kind=b.kind),s.push(d)}if(0===j.length){let b=Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a]));for(let[e,f]of Object.entries(d.vq)){let d=b[e]||e;if((!c||(0,g.iI)(c,d))&&m(d,a))for(let b of f)a.includes(k(b))&&s.push({id:`${e}/${b.id}`,object:"model",created:t,owned_by:e})}for(let b of p){if(!b?.id||b.type&&"llm"!==b.type||!a.includes("llm"))continue;let d=b.providerAlias;if(!d)continue;let e=String(b.id).trim();if(e){if(c){let a=await (0,h.mA)(`${d}/${e}`);if(!a?.provider||!(0,g.iI)(c,a.provider))continue}s.push({id:`${d}/${e}`,object:"model",created:t,owned_by:d})}}}else for(let[b,f]of r.entries()){if(c&&!(0,g.iI)(c,b)||!m(b,a))continue;let h=d.Xg[b]||b,j=(f?.providerSpecificData?.prefix||(0,e.wG)(b)||h).trim(),n=d.vq[h]||[],o=f?.providerSpecificData?.enabledModels,r=Array.isArray(o)&&o.length>0,u=(0,e.mq)(b)||(0,e.gb)(b),v=new Map(n.map(a=>[a.id,k(a)])),w=r?Array.from(new Set(o.filter(a=>"string"==typeof a&&""!==a.trim()))):n.map(a=>a.id);for(let c of(u&&0===w.length&&!i.test(b)&&(w=await l(f)),Array.from(new Set([...w.map(a=>a.startsWith(`${j}/`)?a.slice(j.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim()),...p.filter(a=>{if(!a?.id||a.type&&"llm"!==a.type)return!1;let c=a.providerAlias;return c===h||c===j||c===b}).map(a=>String(a.id).trim()).filter(a=>""!==a),...Object.values(q||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${j}/`)||a.startsWith(`${h}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${j}/`)?a.slice(j.length+1):a.startsWith(`${h}/`)?a.slice(h.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())])))){let b=v.get(c)||function(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}(c);a.includes(b)&&s.push({id:`${j}/${c}`,object:"model",created:t,owned_by:j})}let x=e.AI_PROVIDERS[b],y=[];if(a.includes("tts")&&Array.isArray(x?.ttsConfig?.models))for(let a of x.ttsConfig.models)a?.id&&y.push(a.id);if(a.includes("embedding")&&Array.isArray(x?.embeddingConfig?.models))for(let a of x.embeddingConfig.models)a?.id&&y.push(a.id);for(let a of y)s.push({id:`${j}/${a}`,object:"model",created:t,owned_by:j});a.includes("webSearch")&&x?.searchConfig&&s.push({id:`${j}/search`,object:"model",kind:"webSearch",created:t,owned_by:j}),a.includes("webFetch")&&x?.fetchConfig&&s.push({id:`${j}/fetch`,object:"model",kind:"webFetch",created:t,owned_by:j})}let u=[],v=new Set;for(let a of s)!a?.id||v.has(a.id)||(v.add(a.id),u.push(a));return u}async function o(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function p(a){try{let b=await (0,g.RG)(a),c=[];try{c=(c=await (0,f.getProviderConnections)()).filter(a=>!1!==a.isActive),b&&(c=(0,g.Mv)(c,b))}catch(a){console.log("Could not fetch providers, returning all models")}let j=[];try{j=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let k=new Map;for(let a of c)k.has(a.provider)||k.set(a.provider,a);let m=[],n=Math.floor(Date.now()/1e3);for(let a of j){if(b){let c=!0;for(let d of a.models||[]){let a=await (0,h.mA)(d);if(!a?.provider||!(0,g.iI)(b,a.provider)){c=!1;break}}if(!c)continue}m.push({id:a.name,object:"model",created:n,owned_by:"combo",permission:[],root:a.name,parent:null})}if(0===c.length)for(let[a,c]of Object.entries(d.vq)){let e=Object.entries(d.Xg).find(([b,c])=>c===a)?.[0]||a;if((0,g.iI)(b,e))for(let b of c)m.push({id:`${a}/${b.id}`,object:"model",created:n,owned_by:a,permission:[],root:b.id,parent:null})}else for(let[a,c]of k.entries()){if(!(0,g.iI)(b,a))continue;let f=d.Xg[a]||a,h=(c?.providerSpecificData?.prefix||(0,e.wG)(a)||f).trim(),j=d.vq[f]||[],k=c?.providerSpecificData?.enabledModels,o=Array.isArray(k)&&k.length>0,p=(0,e.mq)(a)||(0,e.gb)(a),q=o?Array.from(new Set(k.filter(a=>"string"==typeof a&&""!==a.trim()))):j.map(a=>a.id);for(let b of(p&&0===q.length&&!i.test(a)&&(q=await l(c)),q.map(b=>b.startsWith(`${h}/`)?b.slice(h.length+1):b.startsWith(`${f}/`)?b.slice(f.length+1):b.startsWith(`${a}/`)?b.slice(a.length+1):b).filter(a=>"string"==typeof a&&""!==a.trim())))m.push({id:`${h}/${b}`,object:"model",created:n,owned_by:h,permission:[],root:b,parent:null})}return Response.json({object:"list",data:m},{headers:{"Access-Control-Allow-Origin":"*"}})}catch(a){return console.log("Error fetching models:",a),Response.json({error:{message:a.message,type:"server_error"}},{status:500})}}},49120:(a,b,c)=>{c.r(b),c.d(b,{APP_NAME:()=>j,DATA_DIR:()=>p,DB_FILE:()=>q,LEGACY_APP_NAME:()=>k,getDataDir:()=>o,getLegacyDataDir:()=>n,migrateLegacyDataFilesIfNeeded:()=>r});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="openrouterx",k="9router",l=["db.json","usage.json","log.txt","disabledModels.json","request-details.json"];function m(a){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),a):g().join(i().homedir(),`.${a}`)}function n(){return m(k)}function o(){let a=process.env.DATA_DIR;if(!a)return m(j);try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable -> fallback ~/.${j}`),m(j);throw b}}let p=o(),q=g().join(p,"db.json");function r(){if(process.env.DATA_DIR)return!1;let a=n();if(a===p||!e().existsSync(a))return!1;let b=!1;for(let c of(e().existsSync(p)||e().mkdirSync(p,{recursive:!0}),l)){let d=g().join(a,c),f=g().join(p,c);e().existsSync(d)&&!e().existsSync(f)&&(e().copyFileSync(d,f),b=!0)}return b}r()},81329:(a,b,c)=>{c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(44404);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))}};
|