anthropicBetas.ts ×1

Frontier kind: Code frontier

unlabeled · c_13b98fe54ffd

251 tests · 3417 LOC · 19 files · introduces 0 tests · 39 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range39 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
481 ranges3417 lines · 19 files · Browse complete extent
All tests (intent)
251 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 39 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/anthropicBetas.ts 39 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- anthropicBetas.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > /**
7 > * Mirror of {@link
8 > * file://./../../../../../extensions/copilot/src/extension/chatSessions/claude/node/claudeLanguageModelServer.ts
9 > * `extensions/copilot/.../claudeLanguageModelServer.ts`}'s `filterSupportedBetas`
10 > * + `SUPPORTED_ANTHROPIC_BETAS` allowlist.
11 > *
12 > * **Keep in sync with the extension copy.** When CAPI gains support for
13 > * a new Anthropic beta, add it here. The filter is applied at the
14 > * inbound `POST /v1/messages` boundary on the `anthropic-beta` header
15 > * before forwarding to {@link ICopilotApiService.messages}.
16 > */
17 >
18 > /**
19 > * Beta identifiers (without date suffix) that CAPI is known to honor.
20 > * The match is prefix + `-`, so an entry like `'context-management'`
21 > * accepts `'context-management-2025-06-27'` but rejects
22 > * `'context-management'` (no date) — date-suffix discipline.
23 > */
24 > const SUPPORTED_ANTHROPIC_BETAS: readonly string[] = [
25 > 'interleaved-thinking',
26 > 'context-management',
27 > 'advanced-tool-use',
28 > ];
29 >
30 > /**
31 > * Filters a comma-separated `anthropic-beta` header value to only include
32 > * betas that match {@link SUPPORTED_ANTHROPIC_BETAS}. Entries are matched by
33 > * prefix so that e.g. `'context-management'` allows `'context-management-2025-06-27'`.
34 > *
35 > * Returns the filtered comma-separated string, or `undefined` if no betas matched.
36 > * Callers must omit the outbound header entirely when this returns `undefined`
37 > * — never forward an empty string.
38 > */
39 > export function filterSupportedBetas(headerValue: string): string | undefined {
40 const filtered = headerValue
41 .split(',')