9router-imagefix 0.5.73 → 0.5.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +16 -16
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +16 -16
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +1 -1
- package/app/.next-cli-build/server/chunks/3753.js +1 -1
- package/app/.next-cli-build/server/chunks/4037.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4572.js +1 -1
- package/app/.next-cli-build/server/chunks/4884.js +1 -1
- package/app/.next-cli-build/server/chunks/6197.js +2 -2
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7828.js +1 -1
- package/app/.next-cli-build/server/chunks/8145.js +1 -1
- package/app/.next-cli-build/server/chunks/8236.js +1 -1
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8847.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/929.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-2c0992618a990492.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-039cf1cd76e487af.js +7 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-845172793c286f87.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-90d71f3ac1bc0b2c.js → page-5bac7ad22f86da96.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-35dd98823839303b.js → page-0319f017545b934c.js} +1 -1
- package/app/cli/.build-home/AppData/Roaming/9router/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/9router/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -1
- package/app/src/sse/services/backgroundTokenRefresh.js +30 -46
- package/package.json +2 -2
- package/app/.next-cli-build/static/chunks/1321-87d81e6d953adb71.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-87c75b20890c6e7f.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-f449e0d90b1bc762.js +0 -1
- /package/app/.next-cli-build/static/{MYIahdRWU3z614Afsvc68 → AtxzvUSPGfopEoMvsI-zh}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{MYIahdRWU3z614Afsvc68 → AtxzvUSPGfopEoMvsI-zh}/_ssgManifest.js +0 -0
|
@@ -220,6 +220,6 @@ Respond ONLY with the JSON object, no other text.`,e=Array.isArray(a.messages)?a
|
|
|
220
220
|
|
|
221
221
|
${d}`:Array.isArray(f.content)&&f.content.push({type:"text",text:`
|
|
222
222
|
|
|
223
|
-
${d}`}):e.unshift({role:"system",content:d}),{...a,messages:e,response_format:{type:"json_object"}}}buildUrl(a,b,c=0,d=null){let e=d?.runtimeTransport;if(e?.baseUrl)return e.urlSuffix?`${e.baseUrl}${e.urlSuffix}`:e.baseUrl;if(this.provider?.startsWith?.("openai-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.Es).replace(/\/$/,""),b="responses"===(0,g.jD)(this.provider,d)?"/responses":"/chat/completions";return`${a}${b}`}if(this.provider?.startsWith?.("anthropic-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.ky).replace(/\/$/,"");return`${a}/messages`}if("gemini"===this.config.format)return`${this.config.baseUrl}/${a}:${b?"streamGenerateContent?alt=sse":"generateContent"}`;if(this.config.urlSuffix)return`${this.config.baseUrl}${this.config.urlSuffix}`;let h=this.config.baseUrl;if(h?.includes("{accountId}")){let a=d?.providerSpecificData?.accountId;if(!a)throw Error(`${this.provider} requires accountId in providerSpecificData`);return h.replace("{accountId}",a)}return h}resolveAuthDescriptor(){return this.provider?.startsWith?.("anthropic-compatible-")?{apiKey:{header:"x-api-key",scheme:"raw"},oauth:{header:"Authorization",scheme:"bearer"},anthropicVersion:!0}:this.config?.format==="claude"?{...n,anthropicVersion:!0}:m}buildHeaders(a,b=!0,c,d){let e=a?.runtimeTransport,g={"Content-Type":"application/json",...e?e.headers:this.config.headers},h=e?.auth||o[this.provider]||this.resolveAuthDescriptor();for(let b of h.hooks||[])q[b]?.(g,a)
|
|
223
|
+
${d}`}):e.unshift({role:"system",content:d}),{...a,messages:e,response_format:{type:"json_object"}}}buildUrl(a,b,c=0,d=null){let e=d?.runtimeTransport;if(e?.baseUrl)return e.urlSuffix?`${e.baseUrl}${e.urlSuffix}`:e.baseUrl;if(this.provider?.startsWith?.("openai-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.Es).replace(/\/$/,""),b="responses"===(0,g.jD)(this.provider,d)?"/responses":"/chat/completions";return`${a}${b}`}if(this.provider?.startsWith?.("anthropic-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.ky).replace(/\/$/,"");return`${a}/messages`}if("gemini"===this.config.format)return`${this.config.baseUrl}/${a}:${b?"streamGenerateContent?alt=sse":"generateContent"}`;if(this.config.urlSuffix)return`${this.config.baseUrl}${this.config.urlSuffix}`;let h=this.config.baseUrl;if(h?.includes("{accountId}")){let a=d?.providerSpecificData?.accountId;if(!a)throw Error(`${this.provider} requires accountId in providerSpecificData`);return h.replace("{accountId}",a)}return h}resolveAuthDescriptor(){return this.provider?.startsWith?.("anthropic-compatible-")?{apiKey:{header:"x-api-key",scheme:"raw"},oauth:{header:"Authorization",scheme:"bearer"},anthropicVersion:!0}:this.config?.format==="claude"?{...n,anthropicVersion:!0}:m}buildHeaders(a,b=!0,c,d){let e=a?.runtimeTransport,g={"Content-Type":"application/json",...e?e.headers:this.config.headers},h=e?.auth||o[this.provider]||this.resolveAuthDescriptor();for(let b of h.hooks||[])q[b]?.(g,a);!function(a,b,c){if(b.combined){p(a,b,c.apiKey||c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=f.b8);return}c.apiKey?p(a,b.apiKey,c.apiKey):c.accessToken&&p(a,b.oauth,c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=f.b8)}(g,h,a);let i="string"==typeof d&&/^claude-/.test(d);if(d&&("claude"===this.provider||this.provider?.startsWith?.("anthropic-compatible-")&&i)&&(g["Anthropic-Beta"]=(0,f.d)(d)),this.provider?.startsWith?.("anthropic-compatible-")){let b=a?.providerSpecificData?.baseUrl||"";if(!(""===b||b.includes("api.anthropic.com"))){for(let b of(a.apiKey&&!g.Authorization&&(g.Authorization=`Bearer ${a.apiKey}`),delete g["anthropic-dangerous-direct-browser-access"],delete g["Anthropic-Dangerous-Direct-Browser-Access"],delete g["x-app"],delete g["X-App"],["anthropic-beta","Anthropic-Beta"]))if(g[b]){let a=g[b].split(",").map(a=>a.trim()).filter(a=>a&&"claude-code-20250219"!==a).join(",");a?g[b]=a:delete g[b]}}}return b&&(g.Accept="text/event-stream"),g}refreshFromGrant(a,b){let c=r[this.provider],d={grant_type:"refresh_token",refresh_token:a.refreshToken,...c.params(this)};return"json"===c.encoding?this.refreshWithJSON(c.url(),d,b):this.refreshWithForm(c.url(),d,b)}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;let d={claude:()=>this.refreshFromGrant(a,c),codex:()=>this.refreshFromGrant(a,c),iflow:()=>this.refreshIflow(a.refreshToken,c),gemini:()=>this.refreshFromGrant(a,c),kiro:()=>this.refreshKiro(a.refreshToken,c),cline:()=>this.refreshCline(a.refreshToken,c),clinepass:()=>this.refreshCline(a.refreshToken,c),kimi:()=>this.refreshKimi(a,c),"kimi-coding":()=>this.refreshKimi(a,c),kilocode:()=>this.refreshKilocode(a.refreshToken,c)}[this.provider];if(!d)return null;try{let a=await d();return a&&b?.info?.("TOKEN",`${this.provider} refreshed`),a}catch(a){return b?.error?.("TOKEN",`${this.provider} refresh error: ${a.message}`),null}}async refreshWithJSON(a,b,c=null){let d=await (0,j.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshWithForm(a,b,c=null){let d=await (0,j.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshIflow(a,b=null){let c=btoa(`${e.xq.iflow.clientId}:${e.xq.iflow.clientSecret}`),d=await (0,j.proxyAwareFetch)(h.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.iflow.clientId,client_secret:e.xq.iflow.clientSecret})},b);if(!d.ok)return null;let f=await d.json();return{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}async refreshKiro(a,b=null){let c=await (0,j.proxyAwareFetch)(e.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},b);if(!c.ok)return null;let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken||a,expiresIn:d.expiresIn}}async refreshCline(a,b=null){let c=await (0,j.proxyAwareFetch)(e.xq.cline.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})},b);if(!c.ok)return null;let d=await c.json(),f=d?.data||d,g=f?.expiresAt,h=g?Math.max(1,Math.floor((new Date(g).getTime()-Date.now())/1e3)):void 0,i=f?.accessToken;return i&&!i.startsWith("workos:")&&(i=`workos:${i}`),{accessToken:i,refreshToken:f?.refreshToken||a,expiresIn:h}}async refreshKimi(a,b=null){let c=a.refreshToken,d=e.xq.kimi||e.xq["kimi-coding"];if(!d?.refreshUrl||!d?.clientId)return null;let f=(0,h.buildKimiHeaders)(a?.providerSpecificData?.deviceId),g=await (0,j.proxyAwareFetch)(d.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...f},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:d.clientId})},b);if(!g.ok)return null;let i=await g.json();return{accessToken:i.access_token,refreshToken:i.refresh_token||c,expiresIn:i.expires_in}}async refreshKilocode(a,b=null){return null}}},96760:(a,b,c)=>{c.d(b,{c:()=>g});var d=c(24);let e=[{provider:"cerebras",stripReasoningContent:!0},{match:/claude/i,drop:["temperature"]},{provider:"github",match:/gpt-5\.4/i,drop:["temperature"]},{provider:"github",match:a=>/claude/i.test(a)&&!/claude.*(opus|sonnet).*4\.6/i.test(a),drop:["thinking","reasoning_effort"]},{provider:"cloudflare-ai",flattenContent:!0},{provider:"volcengine-ark",match:/glm-5/i,clampToModelMaxOutput:!0},{provider:"volcengine-ark",match:/kimi/i,maxOutputCap:32768,clampToModelMaxOutput:!0}];function f(a,b,c){"number"==typeof a[b]&&Number.isFinite(a[b])&&a[b]>c&&(a[b]=c)}function g(a,b,c){if(!b||!c||"object"!=typeof c)return c;for(let g of e)if((!g.provider||g.provider===a)&&(!g.match||("function"==typeof g.match?g.match(b):g.match.test(b)))){for(let a of g.drop||[])void 0!==c[a]&&delete c[a];if(g.stripReasoningContent&&Array.isArray(c.messages))for(let a of c.messages)a&&void 0!==a.reasoning_content&&delete a.reasoning_content;if(g.flattenContent&&Array.isArray(c.messages))for(let a of c.messages)a&&Array.isArray(a.content)&&(a.content=a.content.map(a=>a?.type==="text"&&"string"==typeof a.text?a.text:"").join(""));if(g.clampToModelMaxOutput||Number.isFinite(g.maxOutputCap)){let e=(0,d.getCapabilitiesForModel)(a,b).maxOutput,h=[];if(g.clampToModelMaxOutput&&Number.isFinite(e)&&e>0&&h.push(e),Number.isFinite(g.maxOutputCap)&&g.maxOutputCap>0&&h.push(g.maxOutputCap),h.length>0){let a=Math.min(...h);f(c,"max_tokens",a),f(c,"max_completion_tokens",a),f(c,"max_output_tokens",a)}}}return c}},98625:(a,b,c)=>{c.d(b,{P:()=>e});var d=c(96179);class e extends d.L{constructor(){super("azure")}buildUrl(a,b,c=0,d=null){let e=d?.providerSpecificData?.azureEndpoint||process.env.AZURE_ENDPOINT||"https://api.openai.com",f=d?.providerSpecificData?.apiVersion||process.env.AZURE_API_VERSION||"2024-10-01-preview",g=d?.providerSpecificData?.deployment||a||process.env.AZURE_DEPLOYMENT||"gpt-4",h=e.replace(/\/$/,"");return`${h}/openai/deployments/${g}/chat/completions?api-version=${f}`}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers},d=a?.apiKey||a?.accessToken||process.env.OPENAI_API_KEY;d&&(c["api-key"]=d);let e=a?.providerSpecificData?.organization||process.env.AZURE_ORGANIZATION;return e&&(c["OpenAI-Organization"]=e),b&&(c.Accept="text/event-stream"),c}transformRequest(a,b,c,d){return b}}},98665:(a,b,c)=>{c.d(b,{A:()=>u});var d=c(74957),e=c(14170),f=c(36197),g=c(19979),h=c(97102),i=c(65377),j=c(29675),k=c(32546),l=c(4845),m=c(49804);let n="Anthropic",o="OpenAi",p="Google";function q(a,b){let c=String(a||"").toLowerCase();if("anthropic"===c)return n;if("openai"===c||"open_ai"===c)return o;if("google"===c||"gemini"===c)return p;if("xai"===c||"x_ai"===c||"x-ai"===c)return"XAi";let d=String(b||"").toLowerCase();return d.includes("claude")?n:d.includes("gemini")?p:d.includes("grok")||d.includes("xai")?"XAi":o}function r(a,b,c){return a===n?(0,j.P)(b,c):a===p?(0,k.o)(b,c):a===o?(0,l.v)(b,c):b}function s(a,b,c){if(c)for(let d of Array.isArray(c)?c:[c])d&&a.enqueue(b.encode(`data: ${JSON.stringify(d)}
|
|
224
224
|
|
|
225
225
|
`))}class t extends d.H{constructor(){super("zed")}async resolveModel(a,b,c,d){try{let d=await (0,m.w9)(b,{config:this.config,signal:c}),e=d?.rawById?.get(a)??null;if(!e){let d=await (0,m.w9)(b,{config:this.config,signal:c,forceRefresh:!0});e=d?.rawById?.get(a)??null}return{raw:e,provider:q(e?.provider,a)}}catch(c){let b=c instanceof Error?c.message:String(c);return d?.warn?.("ZED",`model catalog unavailable, inferring provider for ${a}: ${b}`),{raw:null,provider:q(null,a)}}}async execute({model:a,body:b,stream:c,credentials:d,signal:j,log:k,proxyOptions:l=null}){let{provider:q}=await this.resolveModel(a,d,j,k),t=q===n?(0,g.p)(a,b,!0):q===p?(0,h.m$)(a,b,!0):q===o?(0,i.h)(a,b,!0,d):{...b||{},model:a,stream:!1!==c},u=b||{},v={thread_id:u.thread_id||d?._clientSessionId,prompt_id:u.prompt_id,provider:q,model:a,provider_request:t},w=await (0,m.zn)(d,"/completions",{config:this.config,signal:j,fetchOptions:{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson, text/event-stream, */*","User-Agent":"9router/zed","x-zed-version":this.config?.appVersion?.toString()||"0.200.0",[m.xK.clientSupportsStatus]:"true",[m.xK.clientSupportsStreamEnded]:"true"},body:JSON.stringify(v)}});return{response:w.ok?function(a,b,c){if(!a.ok||!a.body)return a;let d=new TextDecoder,g=new TextEncoder,h=function(a,b){if(a===n)return(0,f.Ws)(e.h.CLAUDE);if(a===p)return(0,f.Ws)(e.h.GEMINI);if(a===o)return(0,f.Ws)(e.h.OPENAI_RESPONSES);let c=(0,f.Ws)(e.h.OPENAI);return c.model=b,c}(b,c),i="",j=!1,k=a=>{j||(s(a,g,r(b,null,h)),a.enqueue(g.encode("data: [DONE]\n\n")),j=!0)},l=(a,d)=>{if(j)return;let e=function(a){let b=a.replace(/\r$/,"").trim();if(!b)return null;if(b.startsWith("data:")&&(b=b.slice(5).trimStart()),"[DONE]"===b)return{done:!0};try{let a=JSON.parse(b);if(a&&Object.prototype.hasOwnProperty.call(a,"event"))return{event:a.event};if(a&&Object.prototype.hasOwnProperty.call(a,"status"))return{status:a.status};return{event:a}}catch{return null}}(a);if(e){if(e.done)return void k(d);if(e.status){let a=function(a){if(!a)return null;if("string"==typeof a)return{type:a};if("object"==typeof a){let b=Object.keys(a)[0];return b&&"object"==typeof a[b]?{type:b,...a[b]}:a}return null}(e.status);if(a?.type==="failed"||a?.failed){let b=a.failed||a,e=String(b.message||b.error||b.code||"request failed");s(d,g,{id:`chatcmpl-zed-error-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:c,choices:[{index:0,delta:{content:`[Zed error] ${e}`},finish_reason:"stop"}]}),k(d)}else(a?.type==="stream_ended"||"stream_ended"===a)&&k(d);return}s(d,g,r(b,e.event,h))}};return new Response(a.body.pipeThrough(new TransformStream({transform(a,b){let c;for(i+=d.decode(a,{stream:!0});-1!==(c=i.indexOf("\n"));){let a=i.slice(0,c);i=i.slice(c+1),l(a,b)}},flush(a){(i+=d.decode())&&(l(i,a),i=""),k(a)}})),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}(w,q,a):w,url:`${this.config?.llmBaseUrl||"https://cloud.zed.dev"}/completions`,headers:{"Content-Type":"application/json",Authorization:"Bearer <zed-llm-token>"},transformedBody:v}}parseError(a,b){let c=null;try{c=JSON.parse(b||"{}")}catch{c=null}let d=c?.error||void 0,e=c?.code||d?.code||"",f=c?.message||d?.message||b||a.statusText;return"trial_blocked"===e?{status:a.status,message:`Zed trial access is blocked upstream. The account can list hosted models, but Zed is refusing completions until trial/billing access is enabled or unblocked. Zed says: ${f}`}:e?{status:a.status,message:`Zed ${e}: ${f}`}:{status:a.status,message:f||`Zed upstream error: ${a.status}`}}async refreshCredentials(){return null}needsRefresh(){return!1}}let u=t}};
|