A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
chore(ai): bump impersonated Claude Code and Copilot client versions (#2069)
Sebastian Müllera062ed221468
diff --git a/packages/ai/.changes/res-1311-bump-impersonated-client-versions.md b/packages/ai/.changes/res-1311-bump-impersonated-client-versions.mdnew file mode 100644index 0000000000..bac7d43a98--- /dev/null+++ b/packages/ai/.changes/res-1311-bump-impersonated-client-versions.md@@ -0,0 +1 @@+- Bumped the impersonated client versions: Claude Code 2.1.257 -> 2.1.261 and GitHub Copilot Chat 0.35.0 -> 0.48.1 on VS Code 1.136.1, keeping OAuth traffic accepted as a current client; the Copilot client identity now has a single owner shared by the OAuth flow and the generated catalog headers.diff --git a/packages/ai/scripts/generate-models.ts b/packages/ai/scripts/generate-models.tsindex d9ef30877f..04c09654c7 100644--- a/packages/ai/scripts/generate-models.ts+++ b/packages/ai/scripts/generate-models.ts@@ -5,6 +5,7 @@ import { homedir } from "os";import { dirname, join } from "path";import { fileURLToPath } from "url";import { getAnthropicCacheCosts } from "../src/cache-pricing.js";+import { COPILOT_CLIENT_HEADERS } from "../src/copilot-client-version.js";import { getOpenRouterReasoningCapabilities } from "../src/openrouter-reasoning.js";import {CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL,@@ -63,12 +64,7 @@ interface AiGatewayModel {};}-const COPILOT_STATIC_HEADERS = {- "User-Agent": "GitHubCopilotChat/0.35.0",- "Editor-Version": "vscode/1.107.0",- "Editor-Plugin-Version": "copilot-chat/0.35.0",- "Copilot-Integration-Id": "vscode-chat",-} as const;+const COPILOT_STATIC_HEADERS = COPILOT_CLIENT_HEADERS;const KIMI_STATIC_HEADERS = {"User-Agent": "KimiCLI/1.5",@@ -787,10 +783,22 @@ async function fetchOpenRouterModels(): Promise<Model<any>[]> {// Convert pricing from $/token to $/million tokens. OpenRouter uses// negative values as a placeholder for unknown pricing (e.g. auto-beta).- const inputCost = Math.max(0, parseFloat(model.pricing?.prompt || "0")) * 1_000_000;- const outputCost = Math.max(0, parseFloat(model.pricing?.completion || "0")) * 1_000_000;- const cacheReadCost = Math.max(0, parseFloat(model.pricing?.input_cache_read || "0")) * 1_000_000;- const cacheWriteCost = Math.max(0, parseFloat(model.pricing?.input_cache_write || "0")) * 1_000_000;+ // Time-windowed tariff overrides (utc_start/utc_end) make the top-level+ // price clock-dependent (e.g. Tencent Hy3 peak/off-peak); commit the peak+ // rate so cost accounting never undercounts and regens stay hour-independent.+ const timeWindowedTariffs = (Array.isArray(model.pricing?.overrides) ? model.pricing.overrides : []).filter(+ (override: any) => typeof override?.utc_start === "number",+ );+ const peakPrice = (field: string): number =>+ Math.max(+ 0,+ parseFloat(model.pricing?.[field] || "0"),+ ...timeWindowedTariffs.map((override: any) => parseFloat(override?.[field] || "0")),+ ) * 1_000_000;+ const inputCost = peakPrice("prompt");+ const outputCost = peakPrice("completion");+ const cacheReadCost = peakPrice("input_cache_read");+ const cacheWriteCost = peakPrice("input_cache_write");const reasoningCapabilities = getOpenRouterReasoningCapabilities(model);const normalizedModel: Model<any> = {diff --git a/packages/ai/src/copilot-client-version.ts b/packages/ai/src/copilot-client-version.tsnew file mode 100644index 0000000000..cc4b06b0be--- /dev/null+++ b/packages/ai/src/copilot-client-version.ts@@ -0,0 +1,13 @@+/**+ * Client identity impersonated on GitHub Copilot requests. The generated+ * catalog bakes these into every Copilot row's headers, and the OAuth flow+ * sends them directly; keep both in sync by editing only this file.+ */+export const COPILOT_CLIENT_USER_AGENT = "GitHubCopilotChat/0.48.1";++export const COPILOT_CLIENT_HEADERS = {+ "User-Agent": COPILOT_CLIENT_USER_AGENT,+ "Editor-Version": "vscode/1.136.1",+ "Editor-Plugin-Version": "copilot-chat/0.48.1",+ "Copilot-Integration-Id": "vscode-chat",+} as const;diff --git a/packages/ai/src/models.generated.ts b/packages/ai/src/models.generated.tsindex 7ce92690f0..ff0f332401 100644--- a/packages/ai/src/models.generated.ts+++ b/packages/ai/src/models.generated.ts@@ -4440,7 +4440,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4459,7 +4459,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4478,7 +4478,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsEagerToolInputStreaming":false},reasoning: true,input: ["text", "image"],@@ -4497,7 +4497,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4516,7 +4516,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4535,7 +4535,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4554,7 +4554,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"max":"max"},input: ["text", "image"],@@ -4573,7 +4573,7 @@ export const MODELS = {api: "anthropic-messages",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"xhigh":"xhigh","max":"max"},input: ["text", "image"],@@ -4592,7 +4592,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4611,7 +4611,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4630,7 +4630,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4649,7 +4649,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4668,7 +4668,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null},input: ["text", "image"],@@ -4687,7 +4687,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh"},input: ["text", "image"],@@ -4706,7 +4706,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh"},input: ["text", "image"],@@ -4725,7 +4725,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh"},input: ["text", "image"],@@ -4744,7 +4744,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh"},input: ["text", "image"],@@ -4763,7 +4763,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh"},input: ["text", "image"],@@ -4782,7 +4782,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh","minimal":null,"max":"max"},input: ["text", "image"],@@ -4801,7 +4801,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh","minimal":null,"max":"max"},input: ["text", "image"],@@ -4820,7 +4820,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"off":null,"xhigh":"xhigh","minimal":null,"max":"max"},input: ["text", "image"],@@ -4839,7 +4839,7 @@ export const MODELS = {api: "openai-responses",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},reasoning: true,thinkingLevelMap: {"minimal":null,"xhigh":"xhigh","max":"max","off":null},input: ["text", "image"],@@ -4858,7 +4858,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4877,7 +4877,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4896,7 +4896,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -4915,7 +4915,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":null,"xhigh":null,"max":"max"},@@ -4935,7 +4935,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text"],@@ -4954,7 +4954,7 @@ export const MODELS = {api: "openai-completions",provider: "github-copilot",baseUrl: "https://api.individual.githubcopilot.com",- headers: {"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},+ headers: {"User-Agent":"GitHubCopilotChat/0.48.1","Editor-Version":"vscode/1.136.1","Editor-Plugin-Version":"copilot-chat/0.48.1","Copilot-Integration-Id":"vscode-chat"},compat: {"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},reasoning: true,input: ["text", "image"],@@ -11402,9 +11402,9 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},input: ["text"],cost: {- input: 0.08274,- output: 0.16548,- cacheRead: 0.016548,+ input: 0.08106,+ output: 0.16212,+ cacheRead: 0.016212,cacheWrite: 0,},contextWindow: 1048576,@@ -11421,13 +11421,13 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},input: ["text"],cost: {- input: 0.065,- output: 0.18,- cacheRead: 0.016,+ input: 0.049980000000000004,+ output: 0.09996000000000001,+ cacheRead: 0.009996000000000001,cacheWrite: 0,},contextWindow: 1310720,- maxTokens: 943718,+ maxTokens: 131072,} satisfies Model<"openai-completions">,"deepseek/deepseek-v4-flash-vision-exp": {id: "deepseek/deepseek-v4-flash-vision-exp",@@ -11440,9 +11440,9 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},input: ["text", "image"],cost: {- input: 0.22,- output: 0.66,- cacheRead: 0.007,+ input: 0.44,+ output: 1.32,+ cacheRead: 0.014,cacheWrite: 0,},contextWindow: 1048576,@@ -11459,9 +11459,9 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},input: ["text"],cost: {- input: 0.788916,- output: 1.577832,- cacheRead: 0.065743,+ input: 0.7078319999999999,+ output: 1.4156639999999998,+ cacheRead: 0.058986000000000004,cacheWrite: 0,},contextWindow: 1048576,@@ -15563,9 +15563,9 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":null,"max":null},input: ["text"],cost: {- input: 0.5,- output: 2,- cacheRead: 0.09999999999999999,+ input: 0.55,+ output: 2.2,+ cacheRead: 0.11,cacheWrite: 0,},contextWindow: 204800,@@ -15860,13 +15860,13 @@ export const MODELS = {thinkingLevelMap: {"minimal":null,"low":null,"medium":null,"high":"high","xhigh":"max","max":null},input: ["text"],cost: {- input: 0.049980000000000004,- output: 0.09996000000000001,- cacheRead: 0.009996000000000001,+ input: 0.045,+ output: 0.09,+ cacheRead: 0.009,cacheWrite: 0,},contextWindow: 1310720,- maxTokens: 131072,+ maxTokens: 943718,} satisfies Model<"openai-completions">,"~google/gemini-flash-latest": {id: "~google/gemini-flash-latest",@@ -16010,7 +16010,7 @@ export const MODELS = {cacheWrite: 0,},contextWindow: 1310720,- maxTokens: 943718,+ maxTokens: 235929,} satisfies Model<"openai-completions">,},"prime-inference": {@@ -16419,7 +16419,7 @@ export const MODELS = {cacheWrite: 0,},contextWindow: 1310720,- maxTokens: 943718,+ maxTokens: 131072,} satisfies Model<"openai-completions">,"deepseek/deepseek-v4-pro": {id: "deepseek/deepseek-v4-pro",diff --git a/packages/ai/src/providers/anthropic.ts b/packages/ai/src/providers/anthropic.tsindex a3fcb41521..4f7bcfed46 100644--- a/packages/ai/src/providers/anthropic.ts+++ b/packages/ai/src/providers/anthropic.ts@@ -77,7 +77,7 @@ function getCacheControl(}// Stealth mode: Mimic Claude Code's tool naming exactly-const claudeCodeVersion = "2.1.257";+const claudeCodeVersion = "2.1.261";// Claude Code 2.x tool names (canonical casing)// Source: https://cchistory.mariozechner.at/data/prompts-2.1.11.mddiff --git a/packages/ai/src/utils/oauth/github-copilot.ts b/packages/ai/src/utils/oauth/github-copilot.tsindex 67263b8420..3ede6d467e 100644--- a/packages/ai/src/utils/oauth/github-copilot.ts+++ b/packages/ai/src/utils/oauth/github-copilot.ts@@ -1,3 +1,4 @@+import { COPILOT_CLIENT_HEADERS, COPILOT_CLIENT_USER_AGENT } from "../../copilot-client-version.js";import { getModels } from "../../models.js";import type { Api, Model } from "../../types.js";import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderInterface } from "./types.js";@@ -9,12 +10,7 @@ type CopilotCredentials = OAuthCredentials & {const decode = (s: string) => atob(s);const CLIENT_ID = decode("SXYxLmI1MDdhMDhjODdlY2ZlOTg=");-const COPILOT_HEADERS = {- "User-Agent": "GitHubCopilotChat/0.35.0",- "Editor-Version": "vscode/1.107.0",- "Editor-Plugin-Version": "copilot-chat/0.35.0",- "Copilot-Integration-Id": "vscode-chat",-} as const;+const COPILOT_HEADERS = COPILOT_CLIENT_HEADERS;const INITIAL_POLL_INTERVAL_MULTIPLIER = 1.2;const SLOW_DOWN_POLL_INTERVAL_MULTIPLIER = 1.4;@@ -100,7 +96,7 @@ async function startDeviceFlow(domain: string): Promise<DeviceCodeResponse> {headers: {Accept: "application/json","Content-Type": "application/x-www-form-urlencoded",- "User-Agent": "GitHubCopilotChat/0.35.0",+ "User-Agent": COPILOT_CLIENT_USER_AGENT,},body: new URLSearchParams({client_id: CLIENT_ID,@@ -184,7 +180,7 @@ async function pollForGitHubAccessToken(headers: {Accept: "application/json","Content-Type": "application/x-www-form-urlencoded",- "User-Agent": "GitHubCopilotChat/0.35.0",+ "User-Agent": COPILOT_CLIENT_USER_AGENT,},body: new URLSearchParams({client_id: CLIENT_ID,