fix: honor telemetry for Cloudflare attribution headers

This commit is contained in:
Mario Zechner
2026-04-27 23:49:14 +02:00
parent d6e08b3da0
commit fbb5eed191
5 changed files with 27 additions and 24 deletions

View File

@@ -64,10 +64,6 @@ const KIMI_STATIC_HEADERS = {
"User-Agent": "KimiCLI/1.5",
} as const;
const CLOUDFLARE_STATIC_HEADERS = {
"User-Agent": "pi-coding-agent",
} as const;
const AI_GATEWAY_MODELS_URL = "https://ai-gateway.vercel.sh/v1";
const AI_GATEWAY_BASE_URL = "https://ai-gateway.vercel.sh";
const ZAI_TOOL_STREAM_UNSUPPORTED_MODELS = new Set(["glm-4.5", "glm-4.5-air", "glm-4.5-flash", "glm-4.5v"]);
@@ -403,7 +399,6 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
},
contextWindow: m.limit?.context || 4096,
maxTokens: m.limit?.output || 4096,
headers: { ...CLOUDFLARE_STATIC_HEADERS },
compat: { sendSessionAffinityHeaders: true },
});
}