@yina-npm/openrouterx 0.4.22 → 0.4.24
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 +2 -0
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +3 -1
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/routes-manifest.json +12 -0
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js +2 -2
- 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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- 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_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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -12
- 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_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- 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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- 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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page.js +2 -2
- 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_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_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/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/me/route.js +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 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +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/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +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-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/health/route.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/locale/route.js +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/elevenlabs/voices/route.js +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/voices/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/custom/route.js +1 -1
- package/app/.next/server/app/api/models/disabled/route.js +1 -1
- package/app/.next/server/app/api/models/route.js +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/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/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +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-exchange/route.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +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/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/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/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/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]/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/vercel-deploy/route.js +2 -2
- package/app/.next/server/app/api/settings/database/route.js +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/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +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/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +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/chart/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +2 -2
- package/app/.next/server/app/api/users/[id]/route.js +1 -1
- package/app/.next/server/app/api/users/route.js +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/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 +2 -2
- 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/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/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/version/route.js +1 -1
- package/app/.next/server/app/api/version/update/route.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- 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_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/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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +5 -5
- package/app/.next/server/app/landing.segments/_full.segment.rsc +5 -5
- 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 +2 -2
- 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_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/page.js +2 -2
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +3 -1
- package/app/.next/server/chunks/1679.js +1 -0
- package/app/.next/server/chunks/2506.js +2 -2
- package/app/.next/server/chunks/2574.js +1 -0
- package/app/.next/server/chunks/3110.js +14 -0
- package/app/.next/server/chunks/3605.js +1 -0
- package/app/.next/server/chunks/3855.js +1 -1
- package/app/.next/server/chunks/3913.js +1 -1
- package/app/.next/server/chunks/4122.js +1 -1
- package/app/.next/server/chunks/4664.js +1 -1
- package/app/.next/server/chunks/4989.js +2 -2
- package/app/.next/server/chunks/5627.js +6 -4
- package/app/.next/server/chunks/5681.js +1 -1
- package/app/.next/server/chunks/6108.js +1 -1
- package/app/.next/server/chunks/6182.js +5 -4
- package/app/.next/server/chunks/6774.js +1 -1
- package/app/.next/server/chunks/7341.js +1 -1
- package/app/.next/server/chunks/7595.js +1 -1
- package/app/.next/server/chunks/7937.js +7 -16
- package/app/.next/server/chunks/8590.js +1 -1
- package/app/.next/server/chunks/8760.js +1 -1
- package/app/.next/server/chunks/8895.js +1 -1
- package/app/.next/server/chunks/9489.js +1 -1
- package/app/.next/server/chunks/9547.js +4 -14
- package/app/.next/server/chunks/9609.js +1 -1
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/functions-config-manifest.json +1 -0
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/static/SQn85l_D0P4BshNJQkGiZ/_buildManifest.js +1 -0
- package/app/.next/static/chunks/1321-e48fd14f5bef6d7a.js +1 -0
- package/app/.next/static/chunks/2336-36a1f30358e691c6.js +28 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/page-adc5d5e8da3a0761.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-eb5193b550d3e8de.js → page-c77fedcd9ba7bcac.js} +14 -14
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-ceb9bffbc34711bc.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/auth/me/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/health/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/custom/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/disabled/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/disable/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/enable/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/status/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/api-keys/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/users/[id]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/users/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/info/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/search/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/version/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/api/version/update/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/landing/{page-c7ae6a40e2a2228d.js → page-4644660041715534.js} +1 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/app/page-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6ec61ce021cdb9a6.js +1 -0
- package/app/.next/static/css/d726e4e5a2cfbfd1.css +1 -0
- package/app/package.json +1 -1
- package/app/public/providers/commandcode.png +0 -0
- package/app/src/mitm/antigravityAvailableModels.fixture.json +632 -0
- package/app/src/mitm/antigravityModels.js +265 -0
- package/app/src/mitm/cert/install.js +13 -8
- package/app/src/mitm/cert/rootCA.js +20 -5
- package/app/src/mitm/config.js +30 -3
- package/app/src/mitm/dns/dnsConfig.js +115 -2
- package/app/src/mitm/handlers/antigravity.js +29 -2
- package/app/src/mitm/handlers/openrouter.js +82 -3
- package/app/src/mitm/logger.js +1 -1
- package/app/src/mitm/manager.js +11 -3
- package/app/src/mitm/server.js +219 -18
- package/app/src/shared/constants/mitmToolHosts.js +5 -1
- package/package.json +1 -1
- package/src/cli/api/client.js +2 -2
- package/src/cli/terminalUI.js +2 -2
- package/src/cli/tray/autostart.js +25 -24
- package/src/cli/tray/tray.js +3 -3
- package/app/.next/server/chunks/2343.js +0 -1
- package/app/.next/static/5xyYjBoSvv2Kb5BwIi7pF/_buildManifest.js +0 -1
- package/app/.next/static/chunks/1321-8d71ef3958ddd91f.js +0 -1
- package/app/.next/static/chunks/2336-9fd2cc8ed73b0db4.js +0 -38
- package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/page-15091159f6d63fb7.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-6289612ce5f7c181.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/auth/me/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/health/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/custom/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/disabled/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/disable/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/enable/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/status/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/api-keys/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/users/[id]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/users/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/info/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/search/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/version/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/api/version/update/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/app/page-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-e26f08039efe859c.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e26f08039efe859c.js +0 -1
- package/app/.next/static/css/48caf49054c81db9.css +0 -1
- /package/app/.next/static/{5xyYjBoSvv2Kb5BwIi7pF → SQn85l_D0P4BshNJQkGiZ}/_ssgManifest.js +0 -0
|
@@ -4,21 +4,35 @@ const { err } = require("../logger");
|
|
|
4
4
|
const { fetchRouter, pipeSSE } = require("./base");
|
|
5
5
|
|
|
6
6
|
const URL_MAP = {
|
|
7
|
+
"/api/v1/chat/completions": "/v1/chat/completions",
|
|
7
8
|
"/v1/chat/completions": "/v1/chat/completions",
|
|
8
9
|
"/chat/completions": "/v1/chat/completions",
|
|
9
10
|
"/v1/messages": "/v1/messages",
|
|
11
|
+
"/api/v1/responses": "/v1/responses",
|
|
12
|
+
"/v1/responses": "/v1/responses",
|
|
10
13
|
"/responses": "/v1/responses",
|
|
14
|
+
"/api/v1/models": "/v1/models",
|
|
15
|
+
"/v1/models": "/v1/models",
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
function resolveRouterPath(reqUrl) {
|
|
19
|
+
const [pathname, query = ""] = String(reqUrl || "").split("?");
|
|
14
20
|
for (const [pattern, routerPath] of Object.entries(URL_MAP)) {
|
|
15
|
-
if (
|
|
21
|
+
if (pathname === pattern || pathname.endsWith(pattern)) {
|
|
22
|
+
return query ? `${routerPath}?${query}` : routerPath;
|
|
23
|
+
}
|
|
16
24
|
}
|
|
17
25
|
return "/v1/chat/completions";
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
function isModelsRequest(reqUrl) {
|
|
21
|
-
|
|
29
|
+
const pathname = String(reqUrl || "").split("?")[0];
|
|
30
|
+
return pathname === "/models" || pathname === "/v1/models" || pathname === "/api/v1/models" || pathname.endsWith("/models");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function isKeyInfoRequest(reqUrl) {
|
|
34
|
+
const pathname = String(reqUrl || "").split("?")[0];
|
|
35
|
+
return pathname === "/api/v1/key" || pathname === "/api/v1/auth/key";
|
|
22
36
|
}
|
|
23
37
|
|
|
24
38
|
function getLocalModelsPayload() {
|
|
@@ -36,6 +50,52 @@ function sendJsonPayload(res, payload) {
|
|
|
36
50
|
res.end(payload);
|
|
37
51
|
}
|
|
38
52
|
|
|
53
|
+
function sendOptions(res) {
|
|
54
|
+
if (res.writableEnded) return;
|
|
55
|
+
res.writeHead(204, {
|
|
56
|
+
"Access-Control-Allow-Origin": "*",
|
|
57
|
+
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
|
58
|
+
"Access-Control-Allow-Headers": "*",
|
|
59
|
+
});
|
|
60
|
+
res.end();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function buildKeyInfoPayload() {
|
|
64
|
+
return {
|
|
65
|
+
data: {
|
|
66
|
+
label: "openrouterX MITM API Key",
|
|
67
|
+
limit: null,
|
|
68
|
+
usage: 0,
|
|
69
|
+
usage_daily: 0,
|
|
70
|
+
usage_weekly: 0,
|
|
71
|
+
usage_monthly: 0,
|
|
72
|
+
byok_usage: 0,
|
|
73
|
+
byok_usage_daily: 0,
|
|
74
|
+
byok_usage_weekly: 0,
|
|
75
|
+
byok_usage_monthly: 0,
|
|
76
|
+
is_free_tier: false,
|
|
77
|
+
limit_remaining: null,
|
|
78
|
+
limit_reset: null,
|
|
79
|
+
include_byok_in_limit: false,
|
|
80
|
+
is_provisioning_key: false,
|
|
81
|
+
is_management_key: false,
|
|
82
|
+
rate_limit: { interval: "1h", requests: 100000 },
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function sendKeyInfo(res) {
|
|
88
|
+
if (res.writableEnded) return;
|
|
89
|
+
const payload = JSON.stringify(buildKeyInfoPayload());
|
|
90
|
+
res.writeHead(200, {
|
|
91
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
92
|
+
"Access-Control-Allow-Origin": "*",
|
|
93
|
+
"Cache-Control": "no-store",
|
|
94
|
+
"Content-Length": Buffer.byteLength(payload),
|
|
95
|
+
});
|
|
96
|
+
res.end(payload);
|
|
97
|
+
}
|
|
98
|
+
|
|
39
99
|
function buildInjectedModel(publicModelId) {
|
|
40
100
|
const [provider = "openrouter"] = String(publicModelId || "").split("/");
|
|
41
101
|
return {
|
|
@@ -102,6 +162,16 @@ async function handleModelsRequest(req, res, bodyBuffer, passthrough, aliasMappi
|
|
|
102
162
|
*/
|
|
103
163
|
async function intercept(req, res, bodyBuffer, mappedModel, passthrough, aliasMappings = {}) {
|
|
104
164
|
try {
|
|
165
|
+
if (req.method === "OPTIONS") {
|
|
166
|
+
sendOptions(res);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (req.method === "GET" && isKeyInfoRequest(req.url)) {
|
|
171
|
+
sendKeyInfo(res);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
105
175
|
if (isModelsRequest(req.url)) {
|
|
106
176
|
return handleModelsRequest(req, res, bodyBuffer, passthrough, aliasMappings);
|
|
107
177
|
}
|
|
@@ -119,4 +189,13 @@ async function intercept(req, res, bodyBuffer, mappedModel, passthrough, aliasMa
|
|
|
119
189
|
}
|
|
120
190
|
}
|
|
121
191
|
|
|
122
|
-
module.exports = {
|
|
192
|
+
module.exports = {
|
|
193
|
+
intercept,
|
|
194
|
+
resolveRouterPath,
|
|
195
|
+
isModelsRequest,
|
|
196
|
+
isKeyInfoRequest,
|
|
197
|
+
sendKeyInfo,
|
|
198
|
+
buildKeyInfoPayload,
|
|
199
|
+
injectPublicModels,
|
|
200
|
+
buildInjectedModel,
|
|
201
|
+
};
|
package/app/src/mitm/logger.js
CHANGED
|
@@ -14,7 +14,7 @@ const err = (msg) => console.error(`[${time()}] ❌ [MITM] ${msg}`);
|
|
|
14
14
|
function ensureDumpDir() {
|
|
15
15
|
const candidates = [
|
|
16
16
|
path.join(DATA_DIR, "logs", "mitm"),
|
|
17
|
-
path.join(require("os").tmpdir(), "
|
|
17
|
+
path.join(require("os").tmpdir(), "openrouterx", "logs", "mitm"),
|
|
18
18
|
];
|
|
19
19
|
for (const dir of candidates) {
|
|
20
20
|
try {
|
package/app/src/mitm/manager.js
CHANGED
|
@@ -62,7 +62,7 @@ function resolveBundledServerPath() {
|
|
|
62
62
|
|
|
63
63
|
const SERVER_PATH = resolveBundledServerPath();
|
|
64
64
|
const ENCRYPT_ALGO = "aes-256-gcm";
|
|
65
|
-
const ENCRYPT_SALT = "
|
|
65
|
+
const ENCRYPT_SALT = "openrouterx-mitm-pwd";
|
|
66
66
|
|
|
67
67
|
function getProcessUsingPort443() {
|
|
68
68
|
try {
|
|
@@ -524,10 +524,13 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
|
|
|
524
524
|
log(`[MITM] server.js missing at ${effectiveServerPath} → recopying`);
|
|
525
525
|
effectiveServerPath = ensureRuntimeServer(resolveBundledServerPath());
|
|
526
526
|
if (!effectiveServerPath || !fs.existsSync(effectiveServerPath)) {
|
|
527
|
-
throw new Error(`MITM server.js not found at ${effectiveServerPath}. Reinstall
|
|
527
|
+
throw new Error(`MITM server.js not found at ${effectiveServerPath}. Reinstall openrouterX.`);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
const mitmRouterBase = await resolveMitmRouterBaseUrl();
|
|
531
|
+
const mitmServerCwd = MITM_DIR || os.homedir();
|
|
532
|
+
fs.mkdirSync(mitmServerCwd, { recursive: true });
|
|
533
|
+
const agMockBootstrap = process.env.OPENROUTERX_AG_MOCK_BOOTSTRAP === "1" ? "1" : "0";
|
|
531
534
|
log(`🚀 Starting server... (router: ${mitmRouterBase})`);
|
|
532
535
|
if (IS_WIN) {
|
|
533
536
|
// Check port 443 — ask user before killing
|
|
@@ -549,6 +552,7 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
|
|
|
549
552
|
process.execPath,
|
|
550
553
|
[effectiveServerPath],
|
|
551
554
|
{
|
|
555
|
+
cwd: mitmServerCwd,
|
|
552
556
|
detached: false,
|
|
553
557
|
windowsHide: true,
|
|
554
558
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -557,6 +561,7 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
|
|
|
557
561
|
ROUTER_API_KEY: apiKey,
|
|
558
562
|
NODE_ENV: "production",
|
|
559
563
|
MITM_ROUTER_BASE: mitmRouterBase,
|
|
564
|
+
OPENROUTERX_AG_MOCK_BOOTSTRAP: agMockBootstrap,
|
|
560
565
|
},
|
|
561
566
|
}
|
|
562
567
|
);
|
|
@@ -569,19 +574,21 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
|
|
|
569
574
|
`HOME=${shellQuoteSingle(os.homedir())}`,
|
|
570
575
|
`ROUTER_API_KEY=${shellQuoteSingle(apiKey)}`,
|
|
571
576
|
`MITM_ROUTER_BASE=${shellQuoteSingle(mitmRouterBase)}`,
|
|
577
|
+
`OPENROUTERX_AG_MOCK_BOOTSTRAP=${shellQuoteSingle(agMockBootstrap)}`,
|
|
572
578
|
"NODE_ENV=production",
|
|
573
579
|
shellQuoteSingle(process.execPath),
|
|
574
580
|
shellQuoteSingle(effectiveServerPath),
|
|
575
581
|
].join(" ");
|
|
576
582
|
serverProcess = spawn(
|
|
577
583
|
"sudo", ["-S", "-E", "sh", "-c", inlineCmd],
|
|
578
|
-
{ detached: false, windowsHide: true, stdio: ["pipe", "pipe", "pipe"] }
|
|
584
|
+
{ cwd: mitmServerCwd, detached: false, windowsHide: true, stdio: ["pipe", "pipe", "pipe"] }
|
|
579
585
|
);
|
|
580
586
|
serverProcess.stdin.write(`${sudoPassword}\n`);
|
|
581
587
|
serverProcess.stdin.end();
|
|
582
588
|
} else {
|
|
583
589
|
// Docker/minimal images: no sudo — same as Windows-style direct spawn
|
|
584
590
|
serverProcess = spawn(process.execPath, [effectiveServerPath], {
|
|
591
|
+
cwd: mitmServerCwd,
|
|
585
592
|
detached: false,
|
|
586
593
|
windowsHide: true,
|
|
587
594
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -590,6 +597,7 @@ async function startServer(apiKey, sudoPassword, forceKillPort443 = false) {
|
|
|
590
597
|
ROUTER_API_KEY: apiKey,
|
|
591
598
|
NODE_ENV: "production",
|
|
592
599
|
MITM_ROUTER_BASE: mitmRouterBase,
|
|
600
|
+
OPENROUTERX_AG_MOCK_BOOTSTRAP: agMockBootstrap,
|
|
593
601
|
},
|
|
594
602
|
});
|
|
595
603
|
}
|
package/app/src/mitm/server.js
CHANGED
|
@@ -2,10 +2,12 @@ const https = require("https");
|
|
|
2
2
|
const fs = require("fs");
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const dns = require("dns");
|
|
5
|
+
const zlib = require("zlib");
|
|
5
6
|
const { promisify } = require("util");
|
|
6
7
|
const { execSync } = require("child_process");
|
|
7
8
|
const { log, err, dumpRequest, createResponseDumper } = require("./logger");
|
|
8
9
|
const { TARGET_HOSTS, URL_PATTERNS, MODEL_SYNONYMS, getToolForHost } = require("./config");
|
|
10
|
+
const { buildAntigravityAvailableModelsResponse } = require("./antigravityModels");
|
|
9
11
|
const { DATA_DIR, MITM_DIR } = require("./paths");
|
|
10
12
|
const { getCertForDomain } = require("./cert/generate");
|
|
11
13
|
|
|
@@ -19,6 +21,7 @@ const INTERNAL_REQUEST_HEADER = { name: "x-request-source", value: "local" };
|
|
|
19
21
|
// daily-cloudcode-pa (dev endpoint) accepts same body+token. Same trick as open-sse.
|
|
20
22
|
const HOST_REWRITE = {
|
|
21
23
|
"cloudcode-pa.googleapis.com": "daily-cloudcode-pa.googleapis.com",
|
|
24
|
+
"daily-cloudcode-pa.sandbox.googleapis.com": "daily-cloudcode-pa.googleapis.com",
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
// Load handlers — dev/ overrides handlers/ for private implementations
|
|
@@ -73,14 +76,34 @@ try {
|
|
|
73
76
|
const cachedTargetIPs = {};
|
|
74
77
|
const CACHE_TTL_MS = 5 * 60 * 1000;
|
|
75
78
|
|
|
79
|
+
function getLocalIPv4Aliases() {
|
|
80
|
+
if (process.platform !== "darwin") return [];
|
|
81
|
+
try {
|
|
82
|
+
const out = execSync("ifconfig lo0", { encoding: "utf8", windowsHide: true });
|
|
83
|
+
return [...out.matchAll(/^\s+inet\s+(\d+\.\d+\.\d+\.\d+)\s+/gm)].map((m) => m[1]);
|
|
84
|
+
} catch {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
76
89
|
async function resolveTargetIP(hostname) {
|
|
77
90
|
const cached = cachedTargetIPs[hostname];
|
|
78
|
-
|
|
91
|
+
const localAliases = new Set(getLocalIPv4Aliases());
|
|
92
|
+
if (cached && Date.now() - cached.ts < CACHE_TTL_MS && !localAliases.has(cached.ip)) return cached.ip;
|
|
79
93
|
const resolver = new dns.Resolver();
|
|
80
94
|
resolver.setServers(["8.8.8.8"]);
|
|
81
95
|
const resolve4 = promisify(resolver.resolve4.bind(resolver));
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
let addresses;
|
|
97
|
+
try {
|
|
98
|
+
addresses = await resolve4(hostname);
|
|
99
|
+
} catch (primaryError) {
|
|
100
|
+
const lookup = promisify(dns.lookup);
|
|
101
|
+
const records = await lookup(hostname, { family: 4, all: true }).catch(() => []);
|
|
102
|
+
addresses = records.map((record) => record.address).filter((addr) => !localAliases.has(addr));
|
|
103
|
+
if (addresses.length === 0) throw primaryError;
|
|
104
|
+
}
|
|
105
|
+
const ip = addresses.find((addr) => !localAliases.has(addr)) || addresses[0];
|
|
106
|
+
cachedTargetIPs[hostname] = { ip, ts: Date.now() };
|
|
84
107
|
return cachedTargetIPs[hostname].ip;
|
|
85
108
|
}
|
|
86
109
|
|
|
@@ -111,8 +134,10 @@ function getMappedModel(tool, model) {
|
|
|
111
134
|
try {
|
|
112
135
|
if (!fs.existsSync(DB_FILE)) return null;
|
|
113
136
|
const db = JSON.parse(fs.readFileSync(DB_FILE, "utf-8"));
|
|
114
|
-
const aliases =
|
|
115
|
-
|
|
137
|
+
const aliases = {
|
|
138
|
+
...(MODEL_SYNONYMS?.[tool]?.__defaults || {}),
|
|
139
|
+
...(db.mitmAlias?.[tool] || {}),
|
|
140
|
+
};
|
|
116
141
|
// Normalize via synonym map (e.g., gemini-default → gemini-3-flash)
|
|
117
142
|
const lookup = MODEL_SYNONYMS?.[tool]?.[model] || model;
|
|
118
143
|
if (aliases[lookup]) return aliases[lookup];
|
|
@@ -122,17 +147,166 @@ function getMappedModel(tool, model) {
|
|
|
122
147
|
} catch { return null; }
|
|
123
148
|
}
|
|
124
149
|
|
|
150
|
+
function respondJson(res, statusCode, payload) {
|
|
151
|
+
const body = JSON.stringify(payload);
|
|
152
|
+
res.writeHead(statusCode, {
|
|
153
|
+
"Content-Type": "application/json; charset=UTF-8",
|
|
154
|
+
"Content-Length": Buffer.byteLength(body),
|
|
155
|
+
});
|
|
156
|
+
res.end(body);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function shouldDumpRequest(req) {
|
|
160
|
+
if (process.env.OPENROUTERX_MITM_DUMP_ALL === "1") return true;
|
|
161
|
+
return !!getToolForHost(req.headers.host);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function handleLocalAntigravityBootstrap(req, res) {
|
|
165
|
+
if (req.url.includes(":fetchAvailableModels") && process.env.OPENROUTERX_AG_LOCAL_MODELS !== "0") {
|
|
166
|
+
const payload = buildAntigravityAvailableModelsResponse();
|
|
167
|
+
respondJson(res, 200, payload);
|
|
168
|
+
log(`🧩 bootstrap | antigravity | local fetchAvailableModels (${Object.keys(payload.models || {}).length} models)`);
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// The language server refreshes this cache next to the model list. Upstream
|
|
173
|
+
// can reject the MITM-shaped request with INVALID_ARGUMENT, which then marks
|
|
174
|
+
// the whole background cache refresh as failed even when models were local.
|
|
175
|
+
if (req.url.includes(":fetchAdminControls")) {
|
|
176
|
+
respondJson(res, 200, { adminControls: [] });
|
|
177
|
+
log("🧩 bootstrap | antigravity | local fetchAdminControls");
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const localAuthBootstrap = process.env.OPENROUTERX_AG_LOCAL_AUTH !== "0"
|
|
182
|
+
|| process.env.OPENROUTERX_AG_MOCK_BOOTSTRAP === "1";
|
|
183
|
+
|
|
184
|
+
if (!localAuthBootstrap) return false;
|
|
185
|
+
|
|
186
|
+
if (req.url.includes(":loadCodeAssist")) {
|
|
187
|
+
respondJson(res, 200, {
|
|
188
|
+
cloudaicompanionProject: "local-openrouterx",
|
|
189
|
+
allowedTiers: [
|
|
190
|
+
{
|
|
191
|
+
id: "standard-tier",
|
|
192
|
+
name: "OpenRouterX Local",
|
|
193
|
+
description: "Local MITM bootstrap tier",
|
|
194
|
+
isDefault: true,
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
currentTier: {
|
|
198
|
+
id: "standard-tier",
|
|
199
|
+
name: "OpenRouterX Local",
|
|
200
|
+
},
|
|
201
|
+
userTier: {
|
|
202
|
+
id: "standard-tier",
|
|
203
|
+
name: "OpenRouterX Local",
|
|
204
|
+
},
|
|
205
|
+
tosAccepted: true,
|
|
206
|
+
done: true,
|
|
207
|
+
});
|
|
208
|
+
log("🧩 bootstrap | antigravity | local loadCodeAssist");
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (req.url.includes(":onboardUser")) {
|
|
213
|
+
respondJson(res, 200, {
|
|
214
|
+
done: true,
|
|
215
|
+
response: {
|
|
216
|
+
cloudaicompanionProject: "local-openrouterx",
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
log("🧩 bootstrap | antigravity | local onboardUser");
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (req.url.includes("/cascadeNuxes")) {
|
|
224
|
+
respondJson(res, 200, {
|
|
225
|
+
nuxes: [],
|
|
226
|
+
completedNuxes: [],
|
|
227
|
+
});
|
|
228
|
+
log("🧩 bootstrap | antigravity | local cascadeNuxes");
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function decodeResponseBody(buf, headers = {}) {
|
|
236
|
+
if (!buf || buf.length === 0) return buf;
|
|
237
|
+
const enc = String(headers["content-encoding"] || headers["Content-Encoding"] || "").toLowerCase();
|
|
238
|
+
try {
|
|
239
|
+
if (enc.includes("gzip")) return zlib.gunzipSync(buf);
|
|
240
|
+
if (enc.includes("br")) return zlib.brotliDecompressSync(buf);
|
|
241
|
+
if (enc.includes("deflate")) return zlib.inflateSync(buf);
|
|
242
|
+
} catch (e) {
|
|
243
|
+
err(`loadCodeAssist decode failed: ${e.message}`);
|
|
244
|
+
}
|
|
245
|
+
return buf;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function summarizeTier(tier) {
|
|
249
|
+
if (!tier || typeof tier !== "object") return String(tier || "unknown");
|
|
250
|
+
const id = tier.id || tier.tierId || tier.name || tier.displayName || "unknown";
|
|
251
|
+
const name = tier.displayName || tier.name || "";
|
|
252
|
+
const marker = tier.isDefault ? "*" : "";
|
|
253
|
+
return name && name !== id ? `${id}${marker}(${name})` : `${id}${marker}`;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function summarizeIneligibleTier(tier) {
|
|
257
|
+
if (!tier || typeof tier !== "object") return String(tier || "unknown");
|
|
258
|
+
const id = tier.id || tier.tierId || tier.name || tier.displayName || "unknown";
|
|
259
|
+
const reason = tier.ineligibilityReason || tier.reason || tier.reasonCode || tier.code || "unknown";
|
|
260
|
+
const message = tier.message || tier.ineligibilityMessage || tier.description || "";
|
|
261
|
+
return message ? `${id}:${reason}:${message}` : `${id}:${reason}`;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function inspectAntigravityLoadCodeAssist(rawBuffer, headers) {
|
|
265
|
+
const text = decodeResponseBody(rawBuffer, headers).toString("utf8");
|
|
266
|
+
try {
|
|
267
|
+
const payload = JSON.parse(text);
|
|
268
|
+
const allowed = Array.isArray(payload.allowedTiers)
|
|
269
|
+
? payload.allowedTiers.map(summarizeTier)
|
|
270
|
+
: [];
|
|
271
|
+
const ineligible = Array.isArray(payload.ineligibleTiers)
|
|
272
|
+
? payload.ineligibleTiers.map(summarizeIneligibleTier)
|
|
273
|
+
: [];
|
|
274
|
+
const project = payload.cloudaicompanionProject || payload.cloudaicompanionProjectId || payload.project || "";
|
|
275
|
+
const validationUrl = /https?:\/\/\S+/i.test(text) ? "present" : "none";
|
|
276
|
+
|
|
277
|
+
log(
|
|
278
|
+
`🧩 loadCodeAssist MITM | status=passthrough | project=${project || "none"} | ` +
|
|
279
|
+
`allowed=${allowed.length ? allowed.join(", ") : "none"} | ` +
|
|
280
|
+
`ineligible=${ineligible.length ? ineligible.join(" | ") : "none"} | validationUrl=${validationUrl}`
|
|
281
|
+
);
|
|
282
|
+
} catch {
|
|
283
|
+
log(`🧩 loadCodeAssist MITM | status=passthrough | non-json response bytes=${rawBuffer.length}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
125
287
|
/**
|
|
126
288
|
* Forward request to real upstream.
|
|
127
|
-
* Optional onResponse(rawBuffer) callback — if provided, tees the response
|
|
289
|
+
* Optional onResponse(rawBuffer, headers) callback — if provided, tees the response
|
|
128
290
|
* so it's both forwarded to client AND passed to the callback for inspection.
|
|
291
|
+
* Optional transformResponse(rawBuffer, headers) callback — if provided, buffers
|
|
292
|
+
* the full response, passes it to the callback, and sends the returned buffer
|
|
293
|
+
* to the client instead of the original response.
|
|
129
294
|
* Also tees full stream into a dump file when ENABLE_FILE_LOG is on.
|
|
130
295
|
*/
|
|
131
|
-
async function passthrough(req, res, bodyBuffer, onResponse) {
|
|
296
|
+
async function passthrough(req, res, bodyBuffer, onResponse, transformResponse) {
|
|
132
297
|
const originalHost = (req.headers.host || TARGET_HOSTS[0]).split(":")[0];
|
|
133
298
|
const targetHost = HOST_REWRITE[originalHost] || originalHost;
|
|
134
|
-
const
|
|
135
|
-
|
|
299
|
+
const dumper = ENABLE_FILE_LOG && shouldDumpRequest(req) ? createResponseDumper(req, "passthrough") : null;
|
|
300
|
+
let targetIP;
|
|
301
|
+
try {
|
|
302
|
+
targetIP = await resolveTargetIP(targetHost);
|
|
303
|
+
} catch (e) {
|
|
304
|
+
err(`Passthrough resolve error for ${targetHost}: ${e.code || e.message}`);
|
|
305
|
+
if (dumper) { dumper.writeChunk(`\n[ERROR] resolve ${targetHost}: ${e.message}\n`); dumper.end(); }
|
|
306
|
+
if (!res.headersSent) res.writeHead(502, { "Content-Type": "application/json" });
|
|
307
|
+
res.end(JSON.stringify({ error: { message: `DNS resolve failed for ${targetHost}`, type: "mitm_dns_error" } }));
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
136
310
|
|
|
137
311
|
const forwardReq = https.request({
|
|
138
312
|
hostname: targetIP,
|
|
@@ -143,25 +317,46 @@ async function passthrough(req, res, bodyBuffer, onResponse) {
|
|
|
143
317
|
servername: targetHost,
|
|
144
318
|
rejectUnauthorized: false
|
|
145
319
|
}, (forwardRes) => {
|
|
146
|
-
|
|
147
|
-
|
|
320
|
+
// When transformResponse is provided, buffer the full response so we can
|
|
321
|
+
// modify it before sending to the client.
|
|
322
|
+
const shouldBuffer = transformResponse != null;
|
|
323
|
+
if (!shouldBuffer) res.writeHead(forwardRes.statusCode, forwardRes.headers);
|
|
148
324
|
|
|
149
|
-
if (!onResponse && !dumper) {
|
|
325
|
+
if (!onResponse && !dumper && !shouldBuffer) {
|
|
150
326
|
forwardRes.pipe(res);
|
|
151
327
|
return;
|
|
152
328
|
}
|
|
153
329
|
|
|
154
|
-
// Tee: forward to client AND optionally buffer + dump
|
|
155
330
|
const chunks = [];
|
|
156
331
|
forwardRes.on("data", chunk => {
|
|
157
332
|
if (dumper) dumper.writeChunk(chunk);
|
|
158
|
-
if (onResponse) chunks.push(chunk);
|
|
159
|
-
res.write(chunk);
|
|
333
|
+
if (onResponse || shouldBuffer) chunks.push(chunk);
|
|
334
|
+
if (!shouldBuffer) res.write(chunk);
|
|
160
335
|
});
|
|
161
336
|
forwardRes.on("end", () => {
|
|
337
|
+
const rawBuffer = Buffer.concat(chunks);
|
|
338
|
+
|
|
339
|
+
if (shouldBuffer) {
|
|
340
|
+
try {
|
|
341
|
+
const modified = transformResponse(rawBuffer, forwardRes.headers);
|
|
342
|
+
// Update Content-Length if present to match modified body
|
|
343
|
+
const headers = { ...forwardRes.headers };
|
|
344
|
+
if (headers["content-length"] != null) {
|
|
345
|
+
headers["content-length"] = String(Buffer.byteLength(modified));
|
|
346
|
+
}
|
|
347
|
+
res.writeHead(forwardRes.statusCode, headers);
|
|
348
|
+
res.end(modified);
|
|
349
|
+
} catch (e) {
|
|
350
|
+
err(`transformResponse error: ${e.message}`);
|
|
351
|
+
if (!res.headersSent) res.writeHead(502);
|
|
352
|
+
res.end("Bad Gateway");
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
res.end();
|
|
356
|
+
}
|
|
357
|
+
|
|
162
358
|
if (dumper) dumper.end();
|
|
163
|
-
|
|
164
|
-
if (onResponse) try { onResponse(Buffer.concat(chunks), forwardRes.headers); } catch { /* ignore */ }
|
|
359
|
+
if (onResponse) try { onResponse(rawBuffer, forwardRes.headers); } catch { /* ignore */ }
|
|
165
360
|
});
|
|
166
361
|
});
|
|
167
362
|
|
|
@@ -187,7 +382,7 @@ const server = https.createServer(sslOptions, async (req, res) => {
|
|
|
187
382
|
}
|
|
188
383
|
|
|
189
384
|
const bodyBuffer = await collectBodyRaw(req);
|
|
190
|
-
if (ENABLE_FILE_LOG) dumpRequest(req, bodyBuffer, "raw");
|
|
385
|
+
if (ENABLE_FILE_LOG && shouldDumpRequest(req)) dumpRequest(req, bodyBuffer, "raw");
|
|
191
386
|
|
|
192
387
|
// Anti-loop: skip requests from 9Router
|
|
193
388
|
if (req.headers[INTERNAL_REQUEST_HEADER.name] === INTERNAL_REQUEST_HEADER.value) {
|
|
@@ -197,6 +392,12 @@ const server = https.createServer(sslOptions, async (req, res) => {
|
|
|
197
392
|
const tool = getToolForHost(req.headers.host);
|
|
198
393
|
if (!tool) return passthrough(req, res, bodyBuffer);
|
|
199
394
|
|
|
395
|
+
if (tool === "antigravity" && handleLocalAntigravityBootstrap(req, res)) return;
|
|
396
|
+
if (tool === "antigravity" && req.url.includes(":loadCodeAssist")) {
|
|
397
|
+
log("🧩 loadCodeAssist MITM | passthrough inspect");
|
|
398
|
+
return passthrough(req, res, bodyBuffer, inspectAntigravityLoadCodeAssist);
|
|
399
|
+
}
|
|
400
|
+
|
|
200
401
|
const patterns = URL_PATTERNS[tool] || [];
|
|
201
402
|
const isChat = patterns.some(p => req.url.includes(p));
|
|
202
403
|
if (!isChat) return passthrough(req, res, bodyBuffer);
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Kept in sync with MITM routing; shared by Node (dnsConfig) and dashboard UI.
|
|
4
4
|
*/
|
|
5
5
|
const TOOL_HOSTS = {
|
|
6
|
-
antigravity: [
|
|
6
|
+
antigravity: [
|
|
7
|
+
"daily-cloudcode-pa.googleapis.com",
|
|
8
|
+
"cloudcode-pa.googleapis.com",
|
|
9
|
+
"daily-cloudcode-pa.sandbox.googleapis.com",
|
|
10
|
+
],
|
|
7
11
|
copilot: ["api.individual.githubcopilot.com"],
|
|
8
12
|
kiro: ["q.us-east-1.amazonaws.com", "codewhisperer.us-east-1.amazonaws.com"],
|
|
9
13
|
cursor: ["api2.cursor.sh"],
|
package/package.json
CHANGED
package/src/cli/api/client.js
CHANGED
|
@@ -10,8 +10,8 @@ const DEFAULT_CONFIG = {
|
|
|
10
10
|
protocol: "http:",
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const CLI_TOKEN_HEADER = "x-
|
|
14
|
-
const CLI_TOKEN_SALT = "
|
|
13
|
+
const CLI_TOKEN_HEADER = "x-openrouterx-cli-token";
|
|
14
|
+
const CLI_TOKEN_SALT = "openrouterx-cli-auth";
|
|
15
15
|
|
|
16
16
|
let config = { ...DEFAULT_CONFIG };
|
|
17
17
|
let cachedCliToken = null;
|
package/src/cli/terminalUI.js
CHANGED
|
@@ -57,11 +57,11 @@ async function startTerminalUI(port) {
|
|
|
57
57
|
// Configure API client
|
|
58
58
|
api.configure({ port });
|
|
59
59
|
|
|
60
|
-
const basePath = ["
|
|
60
|
+
const basePath = ["openrouterX"];
|
|
61
61
|
|
|
62
62
|
// Main menu
|
|
63
63
|
await showMenuWithBack({
|
|
64
|
-
title: "📡
|
|
64
|
+
title: "📡 openrouterX Terminal UI",
|
|
65
65
|
breadcrumb: basePath,
|
|
66
66
|
headerContent: async () => await buildHeaderContent(port),
|
|
67
67
|
refresh: async () => ({}), // Refresh header on each loop
|