Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7b2ec61
Remove upgrade and plan branching
cwebster-99 Apr 22, 2026
aca2ea5
Try better approach to ensuring webview service worker is up to date
mjbvz Apr 22, 2026
e0687d3
Fix OutputMonitor leak when foreground terminal is reused after `inpu…
meganrogge Apr 22, 2026
407bd5a
Enable controller API in insiders (#312014)
DonJayamanne Apr 22, 2026
246a575
Cache auth tokens client-side to dedupe agent host authenticate RPCs …
roblourens Apr 22, 2026
e64dce3
agentHost: add url permission request handling and refine confirmatio…
connor4312 Apr 22, 2026
17f555f
fix(build): use Bearer auth for GitHub API requests in fetch.ts (#312…
Yoyokrazy Apr 22, 2026
d4da5f2
Add missing sessionStart hook properties (#311109)
pwang347 Apr 22, 2026
67f69ba
Merge pull request #312005 from microsoft/integrated-sailfish
cwebster-99 Apr 22, 2026
d00e135
Revert "ci: switch PR workflows back to 1ES self-hosted runners with …
Yoyokrazy Apr 22, 2026
207d977
feat(copilotcli): Perf improvement via resolveChatSessionItem API (#…
DonJayamanne Apr 22, 2026
067270d
Fix nonce
mjbvz Apr 22, 2026
98839ce
Strip redundant `cd <workingDirectory> &&` prefix from agent host she…
roblourens Apr 22, 2026
ba66c95
agentHost: improve shell tool descriptions for LLM clarity (#312035)
connor4312 Apr 22, 2026
cdb3b86
Revert "fix(build): use Bearer auth for GitHub API requests in fetch.…
Yoyokrazy Apr 22, 2026
f224646
sessions: simplify titlebar session actions (#311778)
hawkticehurst Apr 22, 2026
92c0a0f
sessions: increase GitHub profile image size in titlebar account widg…
hawkticehurst Apr 22, 2026
5151ae6
Try avoiding extra refreshes of github repos
mjbvz Apr 22, 2026
01ae82d
feat(copilot): enable external sessions in CLI configuration for vsco…
DonJayamanne Apr 22, 2026
c56018b
Merge pull request #312040 from mjbvz/dev/mjbvz/key-warbler
mjbvz Apr 23, 2026
3edb169
Enable testing (#312029)
vijayupadya Apr 23, 2026
1579516
Remove fallback for anchor positioning
mjbvz Apr 23, 2026
7126b66
Merge pull request #312020 from mjbvz/dev/mjbvz/weak-bobolink
mjbvz Apr 23, 2026
8c4616c
feat(copilotcli): Perf impromvent by lazy loading chat session items …
DonJayamanne Apr 23, 2026
1bad831
Fix reasoning effort handling in Claude (#312041)
TylerLeonhardt Apr 23, 2026
217fbd2
Merge pull request #312044 from mjbvz/dev/mjbvz/renewed-elk
mjbvz Apr 23, 2026
1a7db07
sessions: restore terminal after editor maximize (#311961)
hawkticehurst Apr 23, 2026
0a8abf6
sessions: show pointer cursor on new session button (#312046)
hawkticehurst Apr 23, 2026
b88dca1
feat(claude): implement workspace folder service for tracking file ch…
TylerLeonhardt Apr 23, 2026
b646274
[Feature] Execution Subagent Custom Model (#311602)
vikramnitin9 Apr 23, 2026
f67b297
Account policy access restrictions: gate AI features behind approved-…
joshspicer Apr 23, 2026
85a0e01
Launch agent host terminals as login shells on macOS (#312057)
anthonykim1 Apr 23, 2026
1a25e30
Distinguish local agent host harness in customizations view (#312064)
roblourens Apr 23, 2026
1febee7
Gray out remembered folders for offline agent hosts (#312063)
roblourens Apr 23, 2026
9a4bb70
Add 'Collapse All Groups' action to sessions filter menu (#312056)
osortega Apr 23, 2026
54cc74d
chat: don't restore input focus on touch-tap confirmation clicks (#31…
rebornix Apr 23, 2026
ea9b0f1
less auto expand on mobile (#312067)
rebornix Apr 23, 2026
f9eafcd
Show line range in agent host file-read tool display (#312062)
roblourens Apr 23, 2026
515c4fb
SSH agent host: add agent forwarding setting & fix encrypted key fail…
joshspicer Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/skills/add-policy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,7 @@ See `chat.tools.global.autoApprove` and `chat.useHooks` in `src/vs/workbench/con
## Examples

Search the codebase for `policy:` to find all the examples of different policy configurations.

## Learnings

* Never hand-edit `build/lib/policies/policyData.jsonc` (its header explicitly forbids it). If `npm run export-policy-data` is failing, fix the script — don't patch the JSON. Common cause: running it in the wrong working directory (e.g. main repo instead of a worktree), which silently exports the wrong source tree.
2 changes: 1 addition & 1 deletion .github/workflows/pr-linux-cli-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
linux-cli-test:
name: ${{ inputs.job_name }}
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=linux-cli-test-${{ inputs.job_name }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
env:
RUSTUP_TOOLCHAIN: ${{ inputs.rustup_toolchain }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-node-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: {}
jobs:
compile:
name: Compile
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=compile-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
steps:
- name: Checkout microsoft/vscode
uses: actions/checkout@v6
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

linux:
name: Linux
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=linux-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
env:
NPM_ARCH: x64
VSCODE_ARCH: x64
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:

windows:
name: Windows
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-windows-2022-x64, "JobId=windows-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-windows-2022-x64 ]
env:
NPM_ARCH: x64
VSCODE_ARCH: x64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-win32-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
windows-test:
name: ${{ inputs.job_name }}
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-windows-2022-x64, "JobId=windows-test-${{ inputs.job_name }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: windows-2022
env:
ARTIFACT_NAME: ${{ (inputs.electron_tests && 'electron') || (inputs.browser_tests && 'browser') || (inputs.remote_tests && 'remote') || 'unknown' }}
NPM_ARCH: x64
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
compile:
name: Compile & Hygiene
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=compile-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
steps:
- name: Checkout microsoft/vscode
uses: actions/checkout@v6
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:

copilot-check-test-cache:
name: Copilot - Check Test Cache
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=copilot-check-test-cache-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: read
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:

copilot-check-telemetry:
name: Copilot - Check Telemetry
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=copilot-check-telemetry-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
Expand All @@ -224,7 +224,7 @@ jobs:

copilot-linux-tests:
name: Copilot - Test (Linux)
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=copilot-linux-tests-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:

copilot-windows-tests:
name: Copilot - Test (Windows)
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-windows-2022-x64, "JobId=copilot-windows-tests-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
runs-on: windows-2022
permissions:
contents: read
steps:
Expand Down
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@
"name": "vs/workbench/services/language",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/policies",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/progress",
"project": "vscode-workbench"
Expand Down
15 changes: 15 additions & 0 deletions build/lib/policies/policyData.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@
"default": "",
"included": false
},
{
"key": "chat.approvedAccountOrganizations",
"name": "ChatApprovedAccountOrganizations",
"category": "InteractiveSession",
"minimumVersion": "1.118",
"localization": {
"description": {
"key": "chat.approvedAccountOrganizations.policy.description",
"value": "Setting this policy to a non-empty list activates the Approved Account gate: all AI features are disabled until the user signs into a GitHub account whose organizations intersect this list AND the account-side policy data has resolved. Comparison is case-insensitive. Use '*' as a wildcard to accept any signed-in GitHub or GHE account (use this for GHE deployments where the organization list is not surfaced)."
}
},
"type": "array",
"default": [],
"included": false
},
{
"key": "extensions.allowed",
"name": "AllowedExtensions",
Expand Down
22 changes: 20 additions & 2 deletions extensions/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4385,6 +4385,16 @@
"onExp"
]
},
"github.copilot.chat.executionSubagent.useAgenticProxy": {
"type": "boolean",
"default": false,
"markdownDescription": "%github.copilot.config.executionSubagent.useAgenticProxy%",
"tags": [
"advanced",
"experimental",
"onExp"
]
},
"github.copilot.chat.executionSubagent.toolCallLimit": {
"type": "number",
"default": 10,
Expand Down Expand Up @@ -4574,7 +4584,7 @@
},
"github.copilot.chat.cli.showExternalSessions": {
"type": "boolean",
"default": false,
"default": true,
"markdownDescription": "%github.copilot.config.cli.showExternalSessions%",
"tags": [
"advanced"
Expand Down Expand Up @@ -4604,6 +4614,14 @@
"advanced"
]
},
"github.copilot.chat.cli.lazyLoadSessionItem.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "%github.copilot.config.cli.lazyLoadSessionItem.enabled%",
"tags": [
"advanced"
]
},
"github.copilot.chat.cli.aiGenerateBranchNames.enabled": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -4639,7 +4657,7 @@
},
"github.copilot.chat.cli.sessionController.enabled": {
"type": "boolean",
"default": false,
"default": true,
"markdownDescription": "%github.copilot.config.cli.sessionController.enabled%",
"tags": [
"advanced"
Expand Down
4 changes: 3 additions & 1 deletion extensions/copilot/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@
"github.copilot.config.cli.planExitMode.enabled": "Enable Plan Mode exit handling in Copilot CLI.",
"github.copilot.config.cli.autoModel.enabled": "Enable the Auto model option in Copilot CLI, which automatically selects the best model for each request. Requires VS Code reload.",
"github.copilot.config.cli.planCommand.enabled": "Enable the /plan command in Copilot CLI to create implementation plans before coding.",
"github.copilot.config.cli.lazyLoadSessionItem.enabled": "Enable lazy loading of session items in Copilot CLI. Requires VS Code reload.",
"github.copilot.config.cli.aiGenerateBranchNames.enabled": "Enable AI-generated branch names in Copilot CLI.",
"github.copilot.config.cli.isolationOption.enabled": "Enable the isolation mode option for Copilot CLI. When enabled, users can choose between Worktree and Workspace modes.",
"github.copilot.config.cli.autoCommit.enabled": "Enable automatic commit for Copilot CLI. When enabled, changes made by Copilot CLI will be automatically committed to the repository at the end of each turn.",
Expand Down Expand Up @@ -492,7 +493,8 @@
"copilot.tools.executionSubagent.name": "Execution Subagent",
"copilot.tools.executionSubagent.description": "Launch an execution-focused subagent that runs one or more terminal commands to accomplish a task. It is designed to select an efficient summary of the terminal outputs to return to the main agent context.",
"github.copilot.config.executionSubagent.enabled": "Enable the Execution Subagent tool in Copilot Chat. The Execution Subagent is designed to run terminal commands to accomplish an execution-based task.",
"github.copilot.config.executionSubagent.model": "The model to use for the Execution Subagent tool in Copilot Chat. Leave empty to use the default model.",
"github.copilot.config.executionSubagent.useAgenticProxy": "Use the agentic proxy endpoint for the execution subagent.",
"github.copilot.config.executionSubagent.model": "The model to use for the Execution Subagent tool in Copilot Chat. When useAgenticProxy is enabled, defaults to 'exec-subagent-router-a'. Otherwise defaults to the main agent model.",
"github.copilot.config.executionSubagent.toolCallLimit": "Maximum number of tool calls the Execution Subagent can make during execution.",
"github.copilot.session.providerDescription.claude": "Delegate tasks to the Claude SDK running locally on your machine. The agent iterates via chat and works asynchronously to implement changes.",
"github.copilot.session.providerDescription.cloud": "Delegate tasks to the GitHub Copilot coding agent. The agent iterates via chat and works asynchronously in the cloud to implement changes and pull requests as needed.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ In multi-root and empty workspaces, a folder picker option appears in the chat s
### Key Files

- **`common/claudeFolderInfo.ts`**: `ClaudeFolderInfo` interface
- **`../../chatSessions/common/claudeWorkspaceFolderService.ts`**: `IClaudeWorkspaceFolderService` interface — computes git diff changes for session items
- **`../../chatSessions/vscode-node/claudeWorkspaceFolderServiceImpl.ts`**: Implementation — diffs the session's branch against its base branch, caches results, and maps changes to `ChatSessionChangedFile[]` for display in the Sessions view
- **`../../chatSessions/vscode-node/claudeChatSessionContentProvider.ts`**: Folder resolution, picker options, and handler integration
- **`../../chatSessions/vscode-node/folderRepositoryManagerImpl.ts`**: `FolderRepositoryManager` (abstract base) with `ClaudeFolderRepositoryManager` subclass — the Claude subclass does not depend on `ICopilotCLISessionService` (CopilotCLI has its own subclass `CopilotCLIFolderRepositoryManager`)
- **`node/claudeCodeAgent.ts`**: Consumes `ClaudeFolderInfo` in `ClaudeCodeSession._startSession()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Each session in the list displays:
| **Blue dot** | Indicates an unread or recently active session |
| **Status icon** | Shows whether the session is completed, in progress, needs input, or failed |
| **Folder badge** | In multi-root or empty workspaces, shows which folder the session ran in |
| **Change stats** | Shows lines added and removed (e.g., `+584 -17`) — a quick summary of the session's code impact, computed by diffing the session's branch against its base branch |

Sessions are sorted by recency — the most recent session appears at the top. In the dedicated sidebar, they're also grouped by time period.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { PermissionMode } from '@anthropic-ai/claude-agent-sdk';
import { EffortLevel, PermissionMode } from '@anthropic-ai/claude-agent-sdk';
import type * as vscode from 'vscode';
import { CapturingToken } from '../../../../platform/requestLogger/common/capturingToken';
import { createServiceIdentifier } from '../../../../util/common/services';
Expand All @@ -22,7 +22,7 @@ export interface SessionState {
capturingToken: CapturingToken | undefined;
folderInfo: ClaudeFolderInfo | undefined;
usageHandler: UsageHandler | undefined;
reasoningEffort: string | undefined;
reasoningEffort: EffortLevel | undefined;
}

/**
Expand Down Expand Up @@ -96,12 +96,12 @@ export interface IClaudeSessionStateService {
/**
* Gets the reasoning effort for a session (user's per-request selection from the model picker).
*/
getReasoningEffortForSession(sessionId: string): string | undefined;
getReasoningEffortForSession(sessionId: string): EffortLevel | undefined;

/**
* Sets the reasoning effort for a session.
*/
setReasoningEffortForSession(sessionId: string, effort: string | undefined): void;
setReasoningEffortForSession(sessionId: string, effort: EffortLevel | undefined): void;
}

export const IClaudeSessionStateService = createServiceIdentifier<IClaudeSessionStateService>('IClaudeSessionStateService');
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { McpServerConfig, Options, PermissionMode, Query, SDKUserMessage } from '@anthropic-ai/claude-agent-sdk';
import { EffortLevel, McpServerConfig, Options, PermissionMode, Query, SDKUserMessage } from '@anthropic-ai/claude-agent-sdk';
import Anthropic from '@anthropic-ai/sdk';
import * as l10n from '@vscode/l10n';
import type * as vscode from 'vscode';
Expand Down Expand Up @@ -161,6 +161,7 @@ export class ClaudeCodeSession extends Disposable {
private _settingsChangeTracker: ClaudeSettingsChangeTracker;
private _currentModelId: ParsedClaudeModelId;
private _currentPermissionMode: PermissionMode;
private _currentEffort: EffortLevel | undefined;
private _isResumed: boolean;
private _yieldInProgress = false;
private _sessionStarting: Promise<void> | undefined;
Expand Down Expand Up @@ -337,7 +338,15 @@ export class ClaudeCodeSession extends Disposable {
// Do this BEFORE starting a session so the Options are correct from the start
const modelId = this.sessionStateService.getModelIdForSession(this.sessionId);
const permissionMode = this.sessionStateService.getPermissionModeForSession(this.sessionId);
const effortLevel = this.sessionStateService.getReasoningEffortForSession(this.sessionId);

if (effortLevel !== this._currentEffort) {
this._currentEffort = effortLevel;
// Effort doesn't have a direct setter on the query generator, so we need to restart the session
if (this._queryGenerator) {
this._restartSession();
}
}
// Update model and permission mode on active session if they changed
if (modelId) {
await this._setModel(modelId);
Expand Down Expand Up @@ -427,6 +436,7 @@ export class ClaudeCodeSession extends Disposable {
// the permission mode ourselves in the options
allowDangerouslySkipPermissions: true,
abortController: this._abortController,
effort: this._currentEffort,
executable: process.execPath as 'node', // get it to fork the EH node process
// TODO: CAPI does not yet support the WebSearch tool
// Once it does, we can re-enable it.
Expand Down Expand Up @@ -662,6 +672,7 @@ export class ClaudeCodeSession extends Disposable {
this._queryGenerator = undefined;
this._abortController = new AbortController();
this._currentRequest = undefined;
this._currentEffort = undefined;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Emitter } from '../../../../util/vs/base/common/event';
import { Disposable } from '../../../../util/vs/base/common/lifecycle';
import type { ParsedClaudeModelId } from '../common/claudeModelId';
import { tryParseClaudeModelId } from './claudeModelId';
import { EffortLevel } from '@anthropic-ai/claude-agent-sdk';

export const CLAUDE_REASONING_EFFORT_PROPERTY = 'reasoningEffort';

Expand All @@ -24,7 +25,13 @@ export interface IClaudeCodeModels {
* then to the newest Sonnet, newest Haiku, or any Claude endpoint.
* Returns `undefined` if no Claude endpoint can be found.
*/
resolveEndpoint(requestedModel: string | undefined, fallbackModelId: ParsedClaudeModelId | undefined): Promise<IChatEndpoint | undefined>;
resolveEndpoint(requestedModel: ParsedClaudeModelId | string | undefined, fallbackModelId: ParsedClaudeModelId | undefined): Promise<IChatEndpoint | undefined>;

/**
* Resolves the reasoning effort level for the given requested model ID and requested reasoning effort.
*/
resolveReasoningEffort(requestedModel: ParsedClaudeModelId | string | undefined, requestedReasoningEffort: string | undefined): Promise<EffortLevel | undefined>;

/**
* Registers a LanguageModelChatProvider so that Claude models appear in
* VS Code's built-in model picker for the claude-code session type.
Expand Down Expand Up @@ -101,12 +108,32 @@ export class ClaudeCodeModels extends Disposable implements IClaudeCodeModels {
});
}

public async resolveEndpoint(requestedModel: string | undefined, fallbackModelId: ParsedClaudeModelId | undefined): Promise<IChatEndpoint | undefined> {
public async resolveReasoningEffort(requestedModel: ParsedClaudeModelId | string | undefined, requestedReasoningEffort: string | undefined): Promise<EffortLevel | undefined> {
const endpoint = await this.resolveEndpoint(requestedModel, undefined);
if (!endpoint || !endpoint.supportsReasoningEffort || endpoint.supportsReasoningEffort.length === 0) {
return undefined;
}
if (requestedReasoningEffort && isEffortLevel(requestedReasoningEffort) && endpoint.supportsReasoningEffort.includes(requestedReasoningEffort)) {
return requestedReasoningEffort;
}
if (endpoint.supportsReasoningEffort.length === 1 && isEffortLevel(endpoint.supportsReasoningEffort[0])) {
return endpoint.supportsReasoningEffort[0];
}
return undefined;
}

public async resolveEndpoint(requestedModel: ParsedClaudeModelId | string | undefined, fallbackModelId: ParsedClaudeModelId | undefined): Promise<IChatEndpoint | undefined> {
const endpoints = await this._getEndpoints();

// 1. Exact match for the requested model
if (requestedModel) {
const mappedModel = tryParseClaudeModelId(requestedModel)?.toEndpointModelId() ?? requestedModel;
let parsedModel: ParsedClaudeModelId | undefined;
if (typeof requestedModel === 'string') {
parsedModel = tryParseClaudeModelId(requestedModel);
} else {
parsedModel = requestedModel;
}
const mappedModel = parsedModel?.toEndpointModelId() ?? requestedModel;
const exact = endpoints.find(e => e.family === mappedModel || e.model === mappedModel);
if (exact) {
return exact;
Expand Down Expand Up @@ -163,14 +190,18 @@ export class ClaudeCodeModels extends Disposable implements IClaudeCodeModels {
}
}

const SUPPORTED_EFFORT_LEVELS = ['low', 'medium', 'high'] as const;
const SUPPORTED_EFFORT_LEVELS: EffortLevel[] = ['low', 'medium', 'high'];

export function isEffortLevel(value: string): value is EffortLevel {
return SUPPORTED_EFFORT_LEVELS.includes(value as EffortLevel);
}

function buildConfigurationSchema(endpoint: IChatEndpoint): vscode.LanguageModelConfigurationSchema | undefined {
const effortLevels = endpoint.supportsReasoningEffort?.filter(
(level): level is typeof SUPPORTED_EFFORT_LEVELS[number] =>
(SUPPORTED_EFFORT_LEVELS as readonly string[]).includes(level)
);
if (!effortLevels || effortLevels.length <= 1) {
if (!effortLevels) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ export class ClaudeLanguageModelServer extends Disposable {
}

const capturingToken = sessionId ? this.sessionStateService.getCapturingTokenForSession(sessionId) : undefined;
const reasoningEffort = sessionId ? this.sessionStateService.getReasoningEffortForSession(sessionId) : undefined;
const sessionReasoningEffort = sessionId ? this.sessionStateService.getReasoningEffortForSession(sessionId) : undefined;
const reasoningEffort = sessionReasoningEffort && selectedEndpoint.supportsReasoningEffort?.includes(sessionReasoningEffort)
? sessionReasoningEffort
: undefined;

const doRequest = () => streamingEndpoint.makeChatRequest2({
debugName: 'Claude Copilot Proxy',
Expand Down
Loading
Loading