Repository navigation
Agent Host: add a setting to enable HydraFusion plan v2 - #340114
Andy Salerno (andysalerno) wants to merge 2 commits into
Conversation
When HydraFusion is enabled, also set the HYDRAFUSION_PLAN_V2 session feature flag, alongside HYDRAFUSION and HYDRAFUSION_ROLLOUT. Strip it from inherited environment and COPILOT_CLI_ENABLED_FEATURE_FLAGS like the other HydraFusion flags, so only the VS Code setting controls it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0989298f-fa64-4508-8489-a89196c7c0c8
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation consistently extends the existing HydraFusion gating and includes focused coverage for both affected paths.
Review effort: Balanced
Findings: None
What changed in this PR
Extends the existing HydraFusion opt-in to enable plan v2 while preventing inherited environment variables from bypassing VS Code configuration.
Changes:
- Adds
HYDRAFUSION_PLAN_V2to enabled session feature flags. - Sanitizes the flag from inherited environment configuration.
- Updates unit-test expectations.
| File | Description |
|---|---|
copilotSessionLauncher.ts |
Passes the plan-v2 flag to the runtime. |
copilotCliEnvironment.ts |
Removes inherited plan-v2 activation. |
copilotSessionLauncher.test.ts |
Verifies session feature flags. |
copilotAgent.test.ts |
Verifies environment sanitization. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add chat.copilot.hydraFusion.planV2.enabled (default off, experiment mode startup), forwarded to the agent host as the hydraFusionPlanV2 root config key. The launcher sends HYDRAFUSION_PLAN_V2 only when both it and HydraFusion are enabled, and omits it otherwise so the runtime's enable-only experiment still decides. Like HydraFusion, it is forced off when the account disables preview features. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0989298f-fa64-4508-8489-a89196c7c0c8
|
Andy Salerno (@andysalerno) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
|
Andy Salerno (@andysalerno) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
When HydraFusion is enabled, the agent host already sends the
HYDRAFUSIONandHYDRAFUSION_ROLLOUTsession feature flags to the Copilot runtime. The runtime recently addedHYDRAFUSION_PLAN_V2, which makes HydraFusion request v2 plans from CAPI and makes the separate HydraFusion Max model available. This PR adds a VS Code setting so plan v2 can be turned on separately from HydraFusion itself.Changes
chat.copilot.hydraFusion.planV2.enabled: defaults tofalse,experiment: { mode: 'startup' }, machine-scoped, tagged preview/experimental. It applies to sessions created or resumed after the setting changes.AgentHostCopilotCliSettingsContributionforwards the setting to the agent host as the newhydraFusionPlanV2key. Like HydraFusion, it's forced tofalsewhen the account disables preview features (chat_preview_features_enabled === false).CopilotSessionLaunchersendsHYDRAFUSION_PLAN_V2: trueonly when both HydraFusion and plan v2 are enabled.false. The runtime'scopilot_cli_hydrafusion_plan_v2experiment can only turn the flag on, and a staticfalsedoesn't override it, so leaving the flag out lets that experiment still decide. As a result, turning this setting off doesn't stop the runtime experiment from turning plan v2 on.createCopilotCliEnvironmentremovesHYDRAFUSION_PLAN_V2from the inherited environment and fromCOPILOT_CLI_ENABLED_FEATURE_FLAGS, as it already does for the other HydraFusion flags. This way only the VS Code settings control it.How to test
HYDRAFUSION_PLAN_V2and pointchat.agentHost.copilot.runtimePathat itscopilot-runtimeexecutable.chat.copilot.hydraFusion.enabledon (the default) and setchat.copilot.hydraFusion.planV2.enabledtotrue.HYDRAFUSION,HYDRAFUSION_ROLLOUT, andHYDRAFUSION_PLAN_V2. With plan v2 off, only the first two are sent.Validation:
npm run compile-client: passed (0 errors)npm run test-node -- --run src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts: passed (623 passing)scripts/test.bat --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCopilotCliSettingsContribution.test.ts: passed (8 passing)npx eslinton the changed files: passed