@yina-npm/openrouterx 0.4.56 → 0.4.71
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 +1 -1
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +7 -13
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/routes-manifest.json +15 -51
- 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 +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/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.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/media-providers/[kind]/[id]/page.js +3 -3
- 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/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 +3 -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_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/me/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js +4 -4
- 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/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/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +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/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- 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 +3 -3
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +3 -3
- package/app/.next/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-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/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/mcp/[plugin]/message/route.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +1 -4
- 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/minimax/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/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/oauth/[provider]/[action]/route.js +1 -6
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/codex/import-token/route.js +1 -0
- package/app/.next/server/app/api/{cli-tools/antigravity-mitm/test → oauth/codex/import-token}/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -0
- 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/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/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/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]/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/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/cloudflare-deploy/route.js +43 -0
- package/app/.next/server/app/api/{tunnel/tailscale-login → proxy-pools/cloudflare-deploy}/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/proxy-pools/deno-deploy/route.js +40 -0
- package/app/.next/server/app/api/{tunnel/tailscale-start-daemon → proxy-pools/deno-deploy}/route.js.nft.json +1 -1
- package/app/.next/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -0
- 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/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/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/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/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 +3 -3
- package/app/.next/server/app/api/tunnel/tailscale-install/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/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/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/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/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/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 +7 -13
- package/app/.next/server/chunks/1172.js +1 -0
- package/app/.next/server/chunks/1350.js +2 -2
- package/app/.next/server/chunks/1476.js +1 -1
- package/app/.next/server/chunks/1531.js +1 -0
- package/app/.next/server/chunks/1900.js +1 -0
- package/app/.next/server/chunks/1998.js +1 -0
- package/app/.next/server/chunks/2409.js +1 -0
- package/app/.next/server/chunks/2574.js +1 -1
- package/app/.next/server/chunks/2722.js +2 -7
- package/app/.next/server/chunks/3104.js +43 -0
- package/app/.next/server/chunks/3110.js +10 -8
- package/app/.next/server/chunks/3205.js +1 -0
- package/app/.next/server/chunks/365.js +1 -0
- package/app/.next/server/chunks/3913.js +2 -2
- package/app/.next/server/chunks/412.js +2 -2
- package/app/.next/server/chunks/4177.js +1 -0
- package/app/.next/server/chunks/4404.js +1 -0
- package/app/.next/server/chunks/4922.js +9 -0
- package/app/.next/server/chunks/4989.js +1 -1
- package/app/.next/server/chunks/5217.js +1 -1
- package/app/.next/server/chunks/5681.js +1 -1
- package/app/.next/server/chunks/6001.js +1 -1
- package/app/.next/server/chunks/6096.js +1 -0
- package/app/.next/server/chunks/6108.js +1 -1
- package/app/.next/server/chunks/6457.js +4 -0
- package/app/.next/server/chunks/7341.js +1 -1
- package/app/.next/server/chunks/7879.js +10 -0
- package/app/.next/server/chunks/7937.js +186 -0
- package/app/.next/server/chunks/8220.js +1 -0
- package/app/.next/server/chunks/8279.js +1 -0
- package/app/.next/server/chunks/8473.js +8 -0
- package/app/.next/server/chunks/8750.js +1 -1
- package/app/.next/server/chunks/8895.js +8 -6
- package/app/.next/server/chunks/9203.js +1 -0
- package/app/.next/server/chunks/9259.js +3 -0
- package/app/.next/server/chunks/9460.js +1 -0
- package/app/.next/server/chunks/9489.js +1 -1
- package/app/.next/server/chunks/9501.js +63 -0
- package/app/.next/server/chunks/{9095.js → 9713.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 +0 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +1 -1
- 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/chunks/1321-9d7d6181b08dfcf4.js +1 -0
- package/app/.next/static/chunks/4072-e3cbc885320b3535.js +3 -0
- package/app/.next/static/chunks/5497-41bb54893ac4e384.js +7 -0
- package/app/.next/static/chunks/{6069-7c51e16aef293430.js → 6069-27d1adb0dbf83385.js} +9 -14
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-ba3be29df191769b.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-a0eaec978d93b101.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-57065ce85ec52703.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-e0f570e37fcc4d53.js → page-b52d2279e8eff62d.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-011af574663dfa07.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-7cd7e81cc32bcf4d.js +3 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-77e1358581cbeecd.js +4 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-5f1623351681fa43.js +2 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/user/{page-614eca0369bfff22.js → page-12765c664b3c1f6d.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/layout-2b26025389c75878.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/me/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/auth/status/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/health/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/custom/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/disabled/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/disable/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/enable/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/status/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/api-keys/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/users/[id]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/users/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/info/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/search/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/version/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/version/shutdown/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/api/version/update/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/login/page-bf4ffdfcf4ec19bf.js +1 -0
- package/app/.next/static/chunks/app/manifest.webmanifest/route-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/app/page-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-739dde37665780bc.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-739dde37665780bc.js +1 -0
- package/app/.next/static/css/16b3fb40c238dedb.css +1 -0
- package/app/.next/static/jssxgK5Jb3snQyFlT_oQ6/_buildManifest.js +1 -0
- package/app/package.json +2 -2
- package/app/public/i18n/literals/ar.json +1 -27
- package/app/public/i18n/literals/bn.json +1 -27
- package/app/public/i18n/literals/cs.json +1 -27
- package/app/public/i18n/literals/da.json +1 -27
- package/app/public/i18n/literals/de.json +1 -27
- package/app/public/i18n/literals/el.json +1 -27
- package/app/public/i18n/literals/es.json +1 -27
- package/app/public/i18n/literals/fi.json +1 -27
- package/app/public/i18n/literals/fr.json +1 -27
- package/app/public/i18n/literals/he.json +1 -27
- package/app/public/i18n/literals/hi.json +1 -27
- package/app/public/i18n/literals/hu.json +1 -27
- package/app/public/i18n/literals/id.json +1 -27
- package/app/public/i18n/literals/it.json +1 -27
- package/app/public/i18n/literals/ja.json +1 -27
- package/app/public/i18n/literals/ko.json +1 -27
- package/app/public/i18n/literals/nl.json +1 -27
- package/app/public/i18n/literals/no.json +1 -27
- package/app/public/i18n/literals/pl.json +1 -27
- package/app/public/i18n/literals/pt-BR.json +1 -27
- package/app/public/i18n/literals/pt-PT.json +1 -27
- package/app/public/i18n/literals/ro.json +1 -27
- package/app/public/i18n/literals/ru.json +1 -27
- package/app/public/i18n/literals/sv.json +1 -27
- package/app/public/i18n/literals/th.json +1 -27
- package/app/public/i18n/literals/tl.json +1 -27
- package/app/public/i18n/literals/tr.json +1 -27
- package/app/public/i18n/literals/uk.json +1 -27
- package/app/public/i18n/literals/ur.json +1 -27
- package/app/public/i18n/literals/vi.json +1 -27
- package/app/public/i18n/literals/zh-CN.json +4 -28
- package/app/public/i18n/literals/zh-TW.json +1 -27
- package/app/public/providers/qoder.png +0 -0
- package/app/server.js +1 -1
- package/app/src/lib/oauth/services/qoder.js +216 -0
- package/app/src/lib/oauth/services/xai.js +238 -0
- package/app/src/lib/updater/updater.js +3 -4
- package/app/src/mitm/antigravityIdeVersion.js +50 -0
- package/app/src/mitm/cert/install.js +45 -21
- package/app/src/mitm/cert/rootCA.js +5 -20
- package/app/src/mitm/config.js +38 -39
- package/app/src/mitm/dns/dnsConfig.js +10 -162
- package/app/src/mitm/handlers/antigravity.js +2 -29
- package/app/src/mitm/handlers/base.js +164 -17
- package/app/src/mitm/handlers/copilot.js +2 -2
- package/app/src/mitm/handlers/kiro.js +242 -117
- package/app/src/mitm/logger.js +2 -15
- package/app/src/mitm/manager.js +78 -91
- package/app/src/mitm/paths.js +19 -8
- package/app/src/mitm/server.js +199 -292
- package/app/src/shared/constants/mitmToolHosts.js +1 -6
- package/hooks/postinstall.js +0 -92
- package/package.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js +0 -2
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js.nft.json +0 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page_client-reference-manifest.js +0 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js +0 -2
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js.nft.json +0 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js.nft.json +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js.nft.json +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route.js +0 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/network-analysis/route.js +0 -2
- package/app/.next/server/app/api/network-analysis/route.js.nft.json +0 -1
- package/app/.next/server/app/api/network-analysis/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/startup-notices/route.js +0 -2
- package/app/.next/server/app/api/startup-notices/route.js.nft.json +0 -1
- package/app/.next/server/app/api/startup-notices/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route.js +0 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +0 -1
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +0 -2
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +0 -1
- package/app/.next/server/chunks/2415.js +0 -17
- package/app/.next/server/chunks/2506.js +0 -4
- package/app/.next/server/chunks/2560.js +0 -1
- package/app/.next/server/chunks/3245.js +0 -1
- package/app/.next/server/chunks/3493.js +0 -2
- package/app/.next/server/chunks/4394.js +0 -1
- package/app/.next/server/chunks/4664.js +0 -1
- package/app/.next/server/chunks/5330.js +0 -162
- package/app/.next/server/chunks/6182.js +0 -50
- package/app/.next/server/chunks/6393.js +0 -1
- package/app/.next/server/chunks/7177.js +0 -1
- package/app/.next/server/chunks/7568.js +0 -1
- package/app/.next/server/chunks/7595.js +0 -1
- package/app/.next/server/chunks/7828.js +0 -1
- package/app/.next/server/chunks/7930.js +0 -6
- package/app/.next/server/chunks/8574.js +0 -1
- package/app/.next/server/chunks/8590.js +0 -1
- package/app/.next/server/chunks/8651.js +0 -9
- package/app/.next/server/chunks/8760.js +0 -1
- package/app/.next/server/chunks/9609.js +0 -1
- package/app/.next/static/AygZAfUJH9o858u8mFQv5/_buildManifest.js +0 -1
- package/app/.next/static/chunks/1321-d35114032a6899dd.js +0 -1
- package/app/.next/static/chunks/4072-fdb34c3bf82582e6.js +0 -6
- package/app/.next/static/chunks/5095-47fe70cd930f3c59.js +0 -2
- package/app/.next/static/chunks/5497-b59396fb56e7b9b1.js +0 -7
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-efbd0b93d35d25cc.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-acbac7a67319955a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-55598932923e41ce.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/focus-ui/page-329b3a170ddd28c6.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/network-analysis/page-0ad4db60f9d14f60.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-f005d7a30159ce4f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c3234f9c82b1a78e.js +0 -3
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-5040868a50d977bf.js +0 -4
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-e089ffa4138753d7.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/layout-00b66bc0e6b38a14.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/me/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/auth/status/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/health/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/custom/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/disabled/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/network-analysis/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/startup-notices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/disable/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/enable/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/status/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/api-keys/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/users/[id]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/users/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/info/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/search/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/version/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/version/shutdown/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/api/version/update/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/login/page-ef8d8c379c2ef99b.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/app/page-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-814b95c8fc310a6a.js +0 -1
- package/app/.next/static/css/9b92fc8235e99d1e.css +0 -1
- package/app/src/mitm/antigravityAvailableModels.fixture.json +0 -632
- package/app/src/mitm/antigravityBootstrap.js +0 -53
- package/app/src/mitm/antigravityModels.js +0 -265
- package/app/src/mitm/handlers/openrouter.js +0 -201
- package/app/src/mitm/models.json +0 -244
- package/app/src/mitm/upstreamResolver.js +0 -123
- /package/app/.next/static/{AygZAfUJH9o858u8mFQv5 → jssxgK5Jb3snQyFlT_oQ6}/_ssgManifest.js +0 -0
|
@@ -1,39 +1,28 @@
|
|
|
1
1
|
const { log, err } = require("../logger");
|
|
2
2
|
|
|
3
|
-
const DEFAULT_LOCAL_ROUTER = "http://localhost:
|
|
3
|
+
const DEFAULT_LOCAL_ROUTER = "http://localhost:20128";
|
|
4
4
|
const ROUTER_BASE = String(process.env.MITM_ROUTER_BASE || DEFAULT_LOCAL_ROUTER)
|
|
5
5
|
.trim()
|
|
6
|
-
.replace(/^(['"])(.*)\1$/, "$2")
|
|
7
6
|
.replace(/\/+$/, "") || DEFAULT_LOCAL_ROUTER;
|
|
8
|
-
const API_KEY =
|
|
9
|
-
.trim()
|
|
10
|
-
.replace(/^(['"])(.*)\1$/, "$2");
|
|
7
|
+
const API_KEY = process.env.ROUTER_API_KEY;
|
|
11
8
|
|
|
12
|
-
// Headers that must not be forwarded to
|
|
9
|
+
// Headers that must not be forwarded to 9Router
|
|
13
10
|
const STRIP_HEADERS = new Set([
|
|
14
11
|
"host", "content-length", "connection", "transfer-encoding",
|
|
15
12
|
"content-type", "authorization"
|
|
16
13
|
]);
|
|
17
14
|
|
|
18
|
-
function normalizeRouterPath(path) {
|
|
19
|
-
const rawPath = String(path || "").trim() || "/v1/chat/completions";
|
|
20
|
-
if (rawPath === "/v1") return "/api/v1";
|
|
21
|
-
if (rawPath.startsWith("/v1/")) return `/api${rawPath}`;
|
|
22
|
-
return rawPath;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
15
|
/**
|
|
26
|
-
* Send body to
|
|
16
|
+
* Send body to 9Router at the given path and return the fetch Response object.
|
|
27
17
|
* Optionally forwards client headers (stripped of hop-by-hop / overridden keys).
|
|
28
18
|
*/
|
|
29
19
|
async function fetchRouter(openaiBody, path = "/v1/chat/completions", clientHeaders = {}) {
|
|
30
|
-
const routerPath = normalizeRouterPath(path);
|
|
31
20
|
const forwarded = {};
|
|
32
21
|
for (const [k, v] of Object.entries(clientHeaders)) {
|
|
33
22
|
if (!STRIP_HEADERS.has(k.toLowerCase())) forwarded[k] = v;
|
|
34
23
|
}
|
|
35
24
|
|
|
36
|
-
const response = await fetch(`${ROUTER_BASE}${
|
|
25
|
+
const response = await fetch(`${ROUTER_BASE}${path}`, {
|
|
37
26
|
method: "POST",
|
|
38
27
|
headers: {
|
|
39
28
|
...forwarded,
|
|
@@ -76,4 +65,162 @@ async function pipeSSE(routerRes, res, dumper) {
|
|
|
76
65
|
}
|
|
77
66
|
}
|
|
78
67
|
|
|
79
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Pipe SSE stream from router, transforming each chunk through a user function.
|
|
70
|
+
* Reads SSE data: lines, parses JSON, calls transformFn(parsed, state),
|
|
71
|
+
* and writes returned SSE strings to the client response.
|
|
72
|
+
*
|
|
73
|
+
* @param {Response} routerRes - Fetch Response from 9Router
|
|
74
|
+
* @param {http.ServerResponse} res - Client response
|
|
75
|
+
* @param {Function} transformFn - (parsedChunk, state) => string|string[]|null
|
|
76
|
+
* @param {object} state - Mutable state object shared across chunks and flush
|
|
77
|
+
*/
|
|
78
|
+
async function pipeTransformedSSE(routerRes, res, transformFn, state) {
|
|
79
|
+
const ct = routerRes.headers.get("content-type") || "application/json";
|
|
80
|
+
const resHeaders = { "Content-Type": ct, "Cache-Control": "no-cache", "Connection": "keep-alive" };
|
|
81
|
+
if (ct.includes("text/event-stream")) resHeaders["X-Accel-Buffering"] = "no";
|
|
82
|
+
res.writeHead(200, resHeaders);
|
|
83
|
+
|
|
84
|
+
if (!routerRes.body) {
|
|
85
|
+
res.end(await routerRes.text().catch(() => ""));
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const reader = routerRes.body.getReader();
|
|
90
|
+
const decoder = new TextDecoder("utf-8", { fatal: false });
|
|
91
|
+
let buffer = "";
|
|
92
|
+
|
|
93
|
+
while (true) {
|
|
94
|
+
const { done, value } = await reader.read();
|
|
95
|
+
if (done) break;
|
|
96
|
+
|
|
97
|
+
buffer += decoder.decode(value, { stream: true });
|
|
98
|
+
const lines = buffer.split("\n");
|
|
99
|
+
buffer = lines.pop() || "";
|
|
100
|
+
|
|
101
|
+
for (const line of lines) {
|
|
102
|
+
const trimmed = line.trim();
|
|
103
|
+
if (!trimmed || !trimmed.startsWith("data:")) continue;
|
|
104
|
+
|
|
105
|
+
const data = trimmed.slice(5).trim();
|
|
106
|
+
if (data === "[DONE]") continue;
|
|
107
|
+
|
|
108
|
+
if (process.env.DEBUG_MITM) {
|
|
109
|
+
log(`[SSE in] ${data.slice(0, 200)}`);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
const parsed = JSON.parse(data);
|
|
114
|
+
const result = transformFn(parsed, state);
|
|
115
|
+
if (result != null) {
|
|
116
|
+
const outputs = Array.isArray(result) ? result : [result];
|
|
117
|
+
for (const output of outputs) {
|
|
118
|
+
if (process.env.DEBUG_MITM) {
|
|
119
|
+
const len = output.length || output.byteLength || 0;
|
|
120
|
+
log(`[write binary frame] (${len}B) first 20B: ${Array.from(output.slice(0, 20)).join(',')}`);
|
|
121
|
+
}
|
|
122
|
+
res.write(Buffer.from(output));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
} catch {
|
|
126
|
+
// Skip unparseable lines
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Flush: pass null to signal stream end
|
|
132
|
+
try {
|
|
133
|
+
const flushed = transformFn(null, state);
|
|
134
|
+
if (flushed != null) {
|
|
135
|
+
const outputs = Array.isArray(flushed) ? flushed : [flushed];
|
|
136
|
+
for (const output of outputs) {
|
|
137
|
+
res.write(output);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} catch { /* ignore flush errors */ }
|
|
141
|
+
|
|
142
|
+
res.end();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Pipe SSE stream from router, transforming each chunk through a user function,
|
|
147
|
+
* and writing binary EventStream frames to the client.
|
|
148
|
+
*
|
|
149
|
+
* Reads SSE data: lines, parses JSON, calls transformFn(parsed, state),
|
|
150
|
+
* and writes returned Uint8Array frames to the client response.
|
|
151
|
+
*
|
|
152
|
+
* @param {Response} routerRes - Fetch Response from 9Router
|
|
153
|
+
* @param {http.ServerResponse} res - Client response
|
|
154
|
+
* @param {Function} transformFn - (parsedChunk, state) => Uint8Array|Uint8Array[]|null
|
|
155
|
+
* @param {object} state - Mutable state object shared across chunks and flush
|
|
156
|
+
*/
|
|
157
|
+
async function pipeTransformedEventStream(routerRes, res, transformFn, state) {
|
|
158
|
+
const resHeaders = {
|
|
159
|
+
"Content-Type": "application/vnd.amazon.eventstream",
|
|
160
|
+
"Cache-Control": "no-cache",
|
|
161
|
+
"Connection": "keep-alive"
|
|
162
|
+
};
|
|
163
|
+
res.writeHead(200, resHeaders);
|
|
164
|
+
|
|
165
|
+
if (!routerRes.body) {
|
|
166
|
+
res.end(await routerRes.text().catch(() => ""));
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const reader = routerRes.body.getReader();
|
|
171
|
+
const decoder = new TextDecoder("utf-8", { fatal: false });
|
|
172
|
+
let buffer = "";
|
|
173
|
+
|
|
174
|
+
while (true) {
|
|
175
|
+
const { done, value } = await reader.read();
|
|
176
|
+
if (done) break;
|
|
177
|
+
|
|
178
|
+
buffer += decoder.decode(value, { stream: true });
|
|
179
|
+
const lines = buffer.split("\n");
|
|
180
|
+
buffer = lines.pop() || "";
|
|
181
|
+
|
|
182
|
+
for (const line of lines) {
|
|
183
|
+
const trimmed = line.trim();
|
|
184
|
+
if (!trimmed || !trimmed.startsWith("data:")) continue;
|
|
185
|
+
|
|
186
|
+
const data = trimmed.slice(5).trim();
|
|
187
|
+
if (data === "[DONE]") continue;
|
|
188
|
+
|
|
189
|
+
if (process.env.DEBUG_MITM) {
|
|
190
|
+
log(`[SSE in] ${data.slice(0, 200)}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
const parsed = JSON.parse(data);
|
|
195
|
+
const result = transformFn(parsed, state);
|
|
196
|
+
if (result != null) {
|
|
197
|
+
const outputs = Array.isArray(result) ? result : [result];
|
|
198
|
+
for (const output of outputs) {
|
|
199
|
+
if (process.env.DEBUG_MITM) {
|
|
200
|
+
const len = output.length || output.byteLength || 0;
|
|
201
|
+
log(`[write binary frame] (${len}B) first 20B: ${Array.from(output.slice(0, 20)).join(',')}`);
|
|
202
|
+
}
|
|
203
|
+
res.write(Buffer.from(output));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
} catch {
|
|
207
|
+
// Skip unparseable lines
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Flush: pass null to signal stream end
|
|
213
|
+
try {
|
|
214
|
+
const flushed = transformFn(null, state);
|
|
215
|
+
if (flushed != null) {
|
|
216
|
+
const outputs = Array.isArray(flushed) ? flushed : [flushed];
|
|
217
|
+
for (const output of outputs) {
|
|
218
|
+
res.write(output);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} catch { /* ignore flush errors */ }
|
|
222
|
+
|
|
223
|
+
res.end();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
module.exports = { fetchRouter, pipeSSE, pipeTransformedSSE, pipeTransformedEventStream };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { err } = require("../logger");
|
|
2
2
|
const { fetchRouter, pipeSSE } = require("./base");
|
|
3
3
|
|
|
4
|
-
// Map Copilot endpoint
|
|
4
|
+
// Map Copilot endpoint → 9Router path
|
|
5
5
|
const URL_MAP = {
|
|
6
6
|
"/chat/completions": "/v1/chat/completions",
|
|
7
7
|
"/v1/messages": "/v1/messages",
|
|
@@ -16,7 +16,7 @@ function resolveRouterPath(reqUrl) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Intercept Copilot request — replace model and forward to matching
|
|
19
|
+
* Intercept Copilot request — replace model and forward to matching 9Router endpoint
|
|
20
20
|
*/
|
|
21
21
|
async function intercept(req, res, bodyBuffer, mappedModel) {
|
|
22
22
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { err } = require("../logger");
|
|
2
2
|
const { IS_DEV } = require("../config");
|
|
3
|
-
const { fetchRouter } = require("./base");
|
|
3
|
+
const { fetchRouter, pipeTransformedEventStream } = require("./base");
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
|
|
@@ -32,6 +32,76 @@ function crc32(buf) {
|
|
|
32
32
|
return (crc ^ 0xffffffff) >>> 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Initialize state for the Kiro response translator
|
|
37
|
+
*/
|
|
38
|
+
function initKiroState(modelId) {
|
|
39
|
+
return {
|
|
40
|
+
modelId: modelId || null, // Model name from first chunk
|
|
41
|
+
toolCallInit: {}, // { [index]: { id, name } } — tracks seen tools
|
|
42
|
+
hasToolCalls: false, // Whether this response uses tool calls
|
|
43
|
+
finishSent: false, // Whether termination has been emitted
|
|
44
|
+
usage: null, // Accumulated usage from usage-only chunks
|
|
45
|
+
inThink: false, // Whether inside a <thinking> block
|
|
46
|
+
thinkBuf: "" // Buffer for partial thinking content
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Extract thinking blocks from text content.
|
|
52
|
+
* Handles both <thinking>...</thinking> and <think>...</think> tags,
|
|
53
|
+
* including partial tags split across SSE chunks.
|
|
54
|
+
*/
|
|
55
|
+
function extractThinking(text, state) {
|
|
56
|
+
if (!text) return { thinking: null, text: null };
|
|
57
|
+
|
|
58
|
+
let working = text;
|
|
59
|
+
|
|
60
|
+
// Prepend buffered partial thinking from previous chunk
|
|
61
|
+
if (state.inThink && state.thinkBuf) {
|
|
62
|
+
working = state.thinkBuf + working;
|
|
63
|
+
state.thinkBuf = "";
|
|
64
|
+
state.inThink = false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Match <thinking> or <think> opening tags
|
|
68
|
+
const startRe = /<thinking>|<think>/i;
|
|
69
|
+
const startMatch = working.match(startRe);
|
|
70
|
+
|
|
71
|
+
if (!startMatch) {
|
|
72
|
+
return { thinking: null, text: working };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const tag = startMatch[0].toLowerCase();
|
|
76
|
+
const closeTag = tag === "<think>" ? "</think>" : "</thinking>";
|
|
77
|
+
const startIdx = startMatch.index;
|
|
78
|
+
const endIdx = working.indexOf(closeTag, startIdx + tag.length);
|
|
79
|
+
|
|
80
|
+
if (endIdx === -1) {
|
|
81
|
+
// Opening tag without closing — buffer for next chunk
|
|
82
|
+
state.inThink = true;
|
|
83
|
+
state.thinkBuf = working.slice(startIdx);
|
|
84
|
+
const before = working.slice(0, startIdx).trim();
|
|
85
|
+
return { thinking: null, text: before || null };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Complete block found
|
|
89
|
+
const thinking = working.slice(startIdx + tag.length, endIdx);
|
|
90
|
+
const before = working.slice(0, startIdx).trim();
|
|
91
|
+
const after = working.slice(endIdx + closeTag.length).trim();
|
|
92
|
+
const rest = [before, after].filter(Boolean).join("");
|
|
93
|
+
|
|
94
|
+
// Recursively process for more blocks
|
|
95
|
+
const recurse = rest
|
|
96
|
+
? extractThinking(rest, { inThink: false, thinkBuf: "" })
|
|
97
|
+
: { thinking: null, text: null };
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
thinking: thinking || null,
|
|
101
|
+
text: recurse.text || null
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
35
105
|
// ─── AWS EventStream frame builder ────────────────────────────────────────────
|
|
36
106
|
/**
|
|
37
107
|
* Encode a single string header into the AWS EventStream binary format.
|
|
@@ -233,132 +303,173 @@ function extractTools(body) {
|
|
|
233
303
|
}
|
|
234
304
|
|
|
235
305
|
// ─── OpenAI SSE → EventStream binary conversion ───────────────────────────────
|
|
306
|
+
|
|
236
307
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
308
|
+
* Convert an OpenAI SSE chunk to AWS EventStream binary frame(s)
|
|
309
|
+
* This replaces pipeOpenAIasEventStream and works with pipeTransformedEventStream
|
|
239
310
|
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
* toolUseEvent { toolUseId, name, input } — for tool calls
|
|
244
|
-
* messageStopEvent {} — on finish
|
|
311
|
+
* @param {object|null} chunk - Parsed OpenAI chat.completion.chunk, or null for flush
|
|
312
|
+
* @param {object} state - Mutable state object
|
|
313
|
+
* @returns {Uint8Array|Uint8Array[]|null} Binary EventStream frame(s) or null to skip
|
|
245
314
|
*/
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return;
|
|
315
|
+
function convertOpenAIToKiro(chunk, state) {
|
|
316
|
+
// Flush: ensure clean stream termination
|
|
317
|
+
if (!chunk) {
|
|
318
|
+
if (state.finishSent) return null;
|
|
319
|
+
// Flush any remaining buffered thinking
|
|
320
|
+
if (state.inThink && state.thinkBuf) {
|
|
321
|
+
state.inThink = false;
|
|
322
|
+
const thinking = state.thinkBuf;
|
|
323
|
+
state.thinkBuf = "";
|
|
324
|
+
return buildEventStreamFrame("reasoningContentEvent", {
|
|
325
|
+
content: thinking,
|
|
326
|
+
modelId: state.modelId || "kiro-unknown"
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
return buildEventStreamFrame("messageStopEvent", {});
|
|
250
330
|
}
|
|
251
331
|
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
let stopSent = false;
|
|
332
|
+
const frames = [];
|
|
333
|
+
const choice = chunk.choices?.[0];
|
|
334
|
+
const delta = choice?.delta || {};
|
|
256
335
|
|
|
257
|
-
//
|
|
258
|
-
|
|
336
|
+
// Capture modelId from first chunk (real API includes it in every content frame)
|
|
337
|
+
if (!state.modelId && chunk.model) {
|
|
338
|
+
state.modelId = chunk.model;
|
|
339
|
+
}
|
|
340
|
+
const modelId = state.modelId || "unknown";
|
|
259
341
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
};
|
|
342
|
+
// Handle usage (may arrive standalone or with other chunks)
|
|
343
|
+
if (chunk.usage) {
|
|
344
|
+
state.usage = chunk.usage;
|
|
345
|
+
}
|
|
266
346
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
if (!delta) continue;
|
|
293
|
-
|
|
294
|
-
// ── Text content ───────────────────────────────────────────────────────
|
|
295
|
-
if (delta.content) {
|
|
296
|
-
res.write(buildEventStreamFrame("assistantResponseEvent", { content: delta.content }));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// ── Tool calls (streamed in pieces by OpenAI SSE) ──────────────────────
|
|
300
|
-
if (delta.tool_calls) {
|
|
301
|
-
dbg(`TOOL_CALLS delta: ${JSON.stringify(delta.tool_calls).slice(0, 300)}`);
|
|
302
|
-
for (const tc of delta.tool_calls) {
|
|
303
|
-
const idx = tc.index ?? 0;
|
|
304
|
-
if (!toolCallAccum[idx]) {
|
|
305
|
-
toolCallAccum[idx] = { id: tc.id ?? "", name: "", args: "" };
|
|
306
|
-
}
|
|
307
|
-
const acc = toolCallAccum[idx];
|
|
308
|
-
if (tc.id) acc.id = tc.id;
|
|
309
|
-
if (tc.function?.name) acc.name += tc.function.name;
|
|
310
|
-
// safeArgsString prevents `"" + object` → "[object Object]" corruption
|
|
311
|
-
// when 9router's Anthropic→OpenAI conversion passes a pre-parsed object
|
|
312
|
-
const argType = typeof tc.function?.arguments;
|
|
313
|
-
if (tc.function?.arguments != null) {
|
|
314
|
-
acc.args += safeArgsString(tc.function.arguments);
|
|
315
|
-
}
|
|
316
|
-
dbg(` tc[${idx}] argType=${argType} id=${acc.id} name=${acc.name} args_so_far=${acc.args.slice(0, 100)}`);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// ── Finish ─────────────────────────────────────────────────────────────
|
|
321
|
-
const finish = chunk?.choices?.[0]?.finish_reason;
|
|
322
|
-
if (finish) {
|
|
323
|
-
dbg(`FINISH finish_reason=${finish} toolCallKeys=${JSON.stringify(Object.keys(toolCallAccum))}`);
|
|
324
|
-
// Flush accumulated tool calls before stop
|
|
325
|
-
if (finish === "tool_calls") {
|
|
326
|
-
for (const acc of Object.values(toolCallAccum)) {
|
|
327
|
-
// IMPORTANT: Kiro's internal tool dispatcher expects `input` to be a JSON string
|
|
328
|
-
// (not a parsed object). The real CodeWhisperer server sends:
|
|
329
|
-
// { toolUseId, name, input: "{\"key\":\"value\"}" } ← input is a string
|
|
330
|
-
// Kiro then JSON.parses that string to get the tool arguments.
|
|
331
|
-
// If we send input as a parsed object, Kiro does String(obj) → "[object Object]".
|
|
332
|
-
const inputStr = acc.args || "{}";
|
|
333
|
-
dbg(` toolUseEvent: id=${acc.id} name=${acc.name} inputStr=${inputStr.slice(0, 200)}`);
|
|
334
|
-
res.write(buildEventStreamFrame("toolUseEvent", {
|
|
335
|
-
toolUseId: acc.id,
|
|
336
|
-
name: acc.name,
|
|
337
|
-
input: inputStr, // Must be a JSON STRING, not a parsed object
|
|
338
|
-
}));
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
sendStop();
|
|
342
|
-
}
|
|
347
|
+
// Handle tool calls — stream incrementally, matching real API format
|
|
348
|
+
if (delta.tool_calls) {
|
|
349
|
+
state.hasToolCalls = true;
|
|
350
|
+
for (const tc of delta.tool_calls) {
|
|
351
|
+
const idx = tc.index ?? 0;
|
|
352
|
+
|
|
353
|
+
if (tc.id && tc.function?.name && !state.toolCallInit[idx]) {
|
|
354
|
+
// First appearance: emit frame with name + id, no input
|
|
355
|
+
state.toolCallInit[idx] = { id: tc.id, name: tc.function.name };
|
|
356
|
+
dbg(`toolUseEvent init: ${tc.function.name} (${tc.id})`);
|
|
357
|
+
frames.push(buildEventStreamFrame("toolUseEvent", {
|
|
358
|
+
name: tc.function.name,
|
|
359
|
+
toolUseId: tc.id
|
|
360
|
+
}));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Emit incremental input fragment
|
|
364
|
+
if (tc.function?.arguments) {
|
|
365
|
+
const init = state.toolCallInit[idx];
|
|
366
|
+
dbg(`toolUseEvent fragment: ${tc.function.arguments.slice(0, 100)}`);
|
|
367
|
+
frames.push(buildEventStreamFrame("toolUseEvent", {
|
|
368
|
+
input: tc.function.arguments,
|
|
369
|
+
name: init?.name || tc.function?.name || "",
|
|
370
|
+
toolUseId: init?.id || tc.id || ""
|
|
371
|
+
}));
|
|
343
372
|
}
|
|
344
373
|
}
|
|
345
|
-
} finally {
|
|
346
|
-
sendStop();
|
|
347
|
-
res.end();
|
|
348
374
|
}
|
|
375
|
+
|
|
376
|
+
// Handle explicit reasoning_content (type-specific thinking channel)
|
|
377
|
+
if (delta.reasoning_content) {
|
|
378
|
+
frames.push(buildEventStreamFrame("reasoningContentEvent", {
|
|
379
|
+
content: delta.reasoning_content,
|
|
380
|
+
modelId
|
|
381
|
+
}));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// Handle text content — extract thinking blocks, emit rest as assistantResponseEvent
|
|
385
|
+
if (delta.content) {
|
|
386
|
+
const { thinking, text } = extractThinking(delta.content, state);
|
|
387
|
+
|
|
388
|
+
if (thinking) {
|
|
389
|
+
frames.push(buildEventStreamFrame("reasoningContentEvent", {
|
|
390
|
+
content: thinking,
|
|
391
|
+
modelId
|
|
392
|
+
}));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (text) {
|
|
396
|
+
frames.push(buildEventStreamFrame("assistantResponseEvent", {
|
|
397
|
+
content: text,
|
|
398
|
+
modelId
|
|
399
|
+
}));
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// Handle finish_reason
|
|
404
|
+
if (choice?.finish_reason) {
|
|
405
|
+
const finishFrames = emitFinish(state);
|
|
406
|
+
if (finishFrames) {
|
|
407
|
+
frames.push(...(Array.isArray(finishFrames) ? finishFrames : [finishFrames]));
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if (frames.length === 0) return null;
|
|
412
|
+
return frames.length === 1 ? frames[0] : frames;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Emit termination frames. For tool-call responses, emits stop:true per tool.
|
|
417
|
+
* For text-only responses, emits messageStopEvent.
|
|
418
|
+
*/
|
|
419
|
+
function emitFinish(state) {
|
|
420
|
+
const frames = [];
|
|
421
|
+
|
|
422
|
+
if (state.hasToolCalls) {
|
|
423
|
+
// Tool-call response: emit stop:true for each tool
|
|
424
|
+
for (const idx of Object.keys(state.toolCallInit).sort()) {
|
|
425
|
+
const tc = state.toolCallInit[idx];
|
|
426
|
+
frames.push(buildEventStreamFrame("toolUseEvent", {
|
|
427
|
+
name: tc.name,
|
|
428
|
+
stop: true,
|
|
429
|
+
toolUseId: tc.id
|
|
430
|
+
}));
|
|
431
|
+
}
|
|
432
|
+
} else {
|
|
433
|
+
// Text-only response: emit messageStopEvent
|
|
434
|
+
frames.push(buildEventStreamFrame("messageStopEvent", {}));
|
|
435
|
+
}
|
|
436
|
+
state.finishSent = true;
|
|
437
|
+
|
|
438
|
+
// Emit usage if available
|
|
439
|
+
if (state.usage) {
|
|
440
|
+
frames.push(buildEventStreamFrame("usageEvent", {
|
|
441
|
+
inputTokens: state.usage.prompt_tokens || 0,
|
|
442
|
+
outputTokens: state.usage.completion_tokens || 0
|
|
443
|
+
}));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
state.toolCallInit = {};
|
|
447
|
+
return frames.length > 0 ? frames : null;
|
|
349
448
|
}
|
|
350
449
|
|
|
351
450
|
// ─── MITM intercept entry point ───────────────────────────────────────────────
|
|
352
451
|
/**
|
|
353
|
-
* Intercept Kiro IDE CodeWhisperer request:
|
|
354
|
-
* 1. Parse CodeWhisperer
|
|
355
|
-
* 2. Convert to OpenAI messages[] format
|
|
452
|
+
* Intercept Kiro IDE CodeWhisperer request and convert to EventStream response:
|
|
453
|
+
* 1. Parse CodeWhisperer JSON body (reject binary EventStream formats)
|
|
454
|
+
* 2. Convert CodeWhisperer format to OpenAI messages[] format
|
|
356
455
|
* 3. Forward to 9router /v1/chat/completions (OpenAI SSE)
|
|
357
456
|
* 4. Convert OpenAI SSE response → AWS EventStream binary frames
|
|
358
|
-
* 5. Stream
|
|
457
|
+
* 5. Stream EventStream frames back to Kiro IDE
|
|
458
|
+
*
|
|
459
|
+
* @param {http.IncomingMessage} req - HTTP request from Kiro IDE
|
|
460
|
+
* @param {http.ServerResponse} res - HTTP response to Kiro IDE
|
|
461
|
+
* @param {Buffer} bodyBuffer - Request body buffer
|
|
462
|
+
* @param {string} mappedModel - Model name after MITM alias mapping
|
|
359
463
|
*/
|
|
360
464
|
async function intercept(req, res, bodyBuffer, mappedModel) {
|
|
361
465
|
try {
|
|
466
|
+
// Detect and handle binary data (e.g., continuation requests with EventStream frames)
|
|
467
|
+
if (isBinaryEventStream(bodyBuffer)) {
|
|
468
|
+
// Binary EventStream requests are typically continuation/streaming frames
|
|
469
|
+
// that don't contain model info - pass them through directly to avoid JSON.parse crash
|
|
470
|
+
throw new Error(`Binary EventStream format detected (${bodyBuffer.length}B) - request should use passthrough instead of intercept`);
|
|
471
|
+
}
|
|
472
|
+
|
|
362
473
|
const body = JSON.parse(bodyBuffer.toString());
|
|
363
474
|
|
|
364
475
|
// 1 + 2: CodeWhisperer → OpenAI messages + tools
|
|
@@ -380,22 +491,36 @@ async function intercept(req, res, bodyBuffer, mappedModel) {
|
|
|
380
491
|
// 3: Forward to 9router
|
|
381
492
|
const routerRes = await fetchRouter(openaiBody, "/v1/chat/completions", req.headers);
|
|
382
493
|
|
|
383
|
-
// 4 + 5: Re-encode response as AWS EventStream binary
|
|
384
|
-
|
|
385
|
-
"Content-Type": "application/vnd.amazon.eventstream",
|
|
386
|
-
"x-amzn-requestid": `mitm-${Date.now()}`,
|
|
387
|
-
"x-amz-id-2": "mitm",
|
|
388
|
-
"Transfer-Encoding": "chunked",
|
|
389
|
-
});
|
|
494
|
+
// 4 + 5: Re-encode response as AWS EventStream binary using standard pipeline
|
|
495
|
+
const state = initKiroState(mappedModel);
|
|
390
496
|
|
|
391
|
-
await
|
|
497
|
+
await pipeTransformedEventStream(routerRes, res, convertOpenAIToKiro, state);
|
|
392
498
|
} catch (error) {
|
|
393
|
-
err(`[Kiro] ${error.message}`);
|
|
499
|
+
err(`[Kiro MITM] Request processing failed: ${error.message}`);
|
|
394
500
|
if (!res.headersSent) {
|
|
395
501
|
res.writeHead(500, { "Content-Type": "application/json" });
|
|
396
502
|
}
|
|
397
|
-
res.end(JSON.stringify({
|
|
503
|
+
res.end(JSON.stringify({
|
|
504
|
+
error: {
|
|
505
|
+
message: error.message,
|
|
506
|
+
type: "mitm_error",
|
|
507
|
+
handler: "kiro"
|
|
508
|
+
}
|
|
509
|
+
}));
|
|
398
510
|
}
|
|
399
511
|
}
|
|
400
512
|
|
|
513
|
+
// Detect AWS EventStream binary format
|
|
514
|
+
function isBinaryEventStream(buffer) {
|
|
515
|
+
if (!buffer || buffer.length < 12) return false;
|
|
516
|
+
// AWS EventStream signature:
|
|
517
|
+
// - First 4 bytes: total frame length (big-endian)
|
|
518
|
+
// - Bytes 4-8: headers length (big-endian)
|
|
519
|
+
// - Typical frame length: 100-10000 bytes
|
|
520
|
+
const totalLen = buffer.readUInt32BE(0);
|
|
521
|
+
const headersLen = buffer.readUInt32BE(4);
|
|
522
|
+
// Sanity checks: frame length should be reasonable and headers should fit
|
|
523
|
+
return totalLen > 12 && totalLen < 1000000 && headersLen < totalLen - 12;
|
|
524
|
+
}
|
|
525
|
+
|
|
401
526
|
module.exports = { intercept };
|
package/app/src/mitm/logger.js
CHANGED
|
@@ -11,21 +11,8 @@ function time() {
|
|
|
11
11
|
const log = (msg) => console.log(`[${time()}] [MITM] ${msg}`);
|
|
12
12
|
const err = (msg) => console.error(`[${time()}] ❌ [MITM] ${msg}`);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
path.join(DATA_DIR, "logs", "mitm"),
|
|
17
|
-
path.join(require("os").tmpdir(), "openrouterx", "logs", "mitm"),
|
|
18
|
-
];
|
|
19
|
-
for (const dir of candidates) {
|
|
20
|
-
try {
|
|
21
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
22
|
-
return dir;
|
|
23
|
-
} catch { /* try next writable location */ }
|
|
24
|
-
}
|
|
25
|
-
return candidates[1];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const DUMP_DIR = ensureDumpDir();
|
|
14
|
+
const DUMP_DIR = path.join(DATA_DIR, "logs", "mitm");
|
|
15
|
+
if (!fs.existsSync(DUMP_DIR)) fs.mkdirSync(DUMP_DIR, { recursive: true });
|
|
29
16
|
|
|
30
17
|
// Clear all files inside DUMP_DIR (called on MITM server start to avoid unbounded growth)
|
|
31
18
|
function clearDumpDir() {
|