fix: honor telemetry for Cloudflare attribution headers
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Removed generated Cloudflare Workers AI `User-Agent` model headers so attribution can be controlled by callers.
|
||||
|
||||
## [0.70.5] - 2026-04-27
|
||||
|
||||
## [0.70.4] - 2026-04-27
|
||||
|
||||
@@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15381,7 +15381,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
@@ -15400,7 +15399,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: false,
|
||||
input: ["text", "image"],
|
||||
@@ -15419,7 +15417,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
@@ -15438,7 +15435,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
@@ -15457,7 +15453,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
@@ -15476,7 +15471,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
@@ -15495,7 +15489,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
@@ -15514,7 +15507,6 @@ export const MODELS = {
|
||||
api: "openai-completions",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
||||
headers: {"User-Agent":"pi-coding-agent"},
|
||||
compat: {"sendSessionAffinityHeaders":true},
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
|
||||
Reference in New Issue
Block a user