豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 6cd94dd

Browse files
authored
revert: remove anthropic-beta header merge in Claude streaming endpoint (#310908)
Callers can now opt into Anthropic features (context editing, tool search, etc.) by setting modelCapabilities on the request itself, as introduced in #308387. The base endpoint no longer needs to inject beta headers — the Claude agent controls its own headers. Reverts the merge logic from microsoft/vscode-copilot-chat#4945.
1 parent 104e9ec commit 6cd94dd

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

extensions/copilot/src/extension/chatSessions/claude/node/claudeLanguageModelServer.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -452,17 +452,7 @@ class ClaudeStreamingPassThroughEndpoint implements IChatEndpoint {
452452
if (typeof this.requestHeaders['anthropic-beta'] === 'string') {
453453
const filtered = filterSupportedBetas(this.requestHeaders['anthropic-beta']);
454454
if (filtered) {
455-
if (headers['anthropic-beta']) {
456-
// Merge SDK's filtered betas with base endpoint's betas (e.g. config-driven
457-
// context-management) instead of overwriting, deduplicating exact matches.
458-
const allBetas = new Set([
459-
...headers['anthropic-beta'].split(',').map(b => b.trim()),
460-
...filtered.split(',').map(b => b.trim()),
461-
]);
462-
headers['anthropic-beta'] = [...allBetas].join(',');
463-
} else {
464-
headers['anthropic-beta'] = filtered;
465-
}
455+
headers['anthropic-beta'] = filtered;
466456
}
467457
}
468458
return headers;

0 commit comments

Comments
 (0)