Repository navigation
[cherry-pick] agentHost: attribute edits to the HydraFusion model - #341180
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The attribution data is consistently validated, propagated, grouped, and covered by focused tests.
0 open findings
What changed in this PR
Adds HydraFusion model-specific edit attribution across Agent Host telemetry and workbench reload correlation.
Changes:
- Captures runtime-reported HydraFusion routing and concrete source models.
- Propagates
fusionModelthrough edit markers and telemetry while preserving source caps. - Adds focused coverage for attribution, survival telemetry, and reload correlation.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Screenshot ChangesBase: Changed (1)
|
Connor Peet (connor4312)
left a comment
There was a problem hiding this comment.
Reviewed the changes and relevant runtime, attribution, reload-correlation, and telemetry tests for security and correctness. No actionable P1 or P2 issues found. The implementation restricts runtime routing IDs to known HydraFusion models, snapshots attribution per tool call, clears phase state between turns, and preserves source-cap grouping and cleaned telemetry keys. Existing compile/hygiene and Linux unit checks pass; some other checks remain pending. Read-only inspection only; tests were not run locally.
Written by Connor's agent running GPT-6.1 Sol

Cherry-pick of #341165 from
main.Follow-up to #340437, which added the committed Auto tier to Agent Host edit attribution. This change records which HydraFusion model routed an edit, so HydraFusion (
hydrafusion) and HydraFusion Max (hydrafusion-max) edits can be told apart.tool.execution_startfusion.syntheticModel). Only the known HydraFusion models are accepted. Selecting HydraFusion in the picker doesn't tag anything by itself, so turns that fell back to another model aren't tagged. A tool call inside a running HydraFusion phase that has no attribution of its own uses the HydraFusion model the runtime reported for the turn.modelId: for HydraFusion edits,modelIdis now the concrete model the runtime attributed the call to (fusion.sourceModel), instead of the last model the session reported.editTelemetry.editSources.details(Microsoft and GitHub): addsfusionModeland a$fusionModel:<id>segment insourceKey, after$autoTier.sourceKeyCleanedand the edit-arc event leave it out. HydraFusion rows are split out only after the 30-source cap is applied, as with Auto tiers, so they can't push other sources out of the report.agentHost.trackEditSurvival: addsfusionModel, omitted for non-HydraFusion edits.Test:
"chat.copilot.hydraFusion.enabled": "v2"and run with--log trace.agentHostTelemetry.logshould showfusionModel: hydrafusion/hydrafusion-max, orautoTier: intelligencefor the Auto edit, on bothtrackEditSurvivalandeditSources.details.Known issue, not addressed here: when an existing chat switches from HydraFusion to Auto, the chosen Auto tier is dropped. The switch restarts the session, and the resume only passes an admin-overridden tier, not the user's selection. Neither the runtime's
session.model_changenorsession.resumecarries a tier, so the tier is correctly left out of telemetry. Auto may also be routing on the default tier in that case.