Skip to content

chat: show agent host model pricing in turn details#315159

Merged
roblourens merged 11 commits into
mainfrom
agents/944c6bd9-457f-4a9d-9f2b-9917f8f26384
May 12, 2026
Merged

chat: show agent host model pricing in turn details#315159
roblourens merged 11 commits into
mainfrom
agents/944c6bd9-457f-4a9d-9f2b-9917f8f26384

Conversation

@roblourens
Copy link
Copy Markdown
Member

@roblourens roblourens commented May 8, 2026

Fix #315160

Summary

  • Include model pricing/multiplier text in Agent Host per-turn response details.
  • Include pricing for restored active-turn response placeholders.
  • Cover per-turn and fallback model pricing in Agent Host chat history tests.

Validation

  • npm run compile-check-ts-native
  • node --experimental-strip-types build/hygiene.ts src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts --grep history requests get per-turn modelId

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 02:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Base: 123d29a0 Current: 8ca25b8f

No screenshot changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances Agent Host chat session history so each response can display the selected model’s pricing/multiplier (when available) in the response footer details, including for restored “active turn” placeholder responses after reconnect/restore. It also extends the Agent Host chat history tests to validate the per-turn model + pricing details behavior.

Changes:

  • Populate details for restored active-turn placeholder responses using the per-turn model lookup.
  • Extend model display formatting to append pricing (e.g. Opus 4.7 · 15x) when present.
  • Update Agent Host chat history tests to stub language model metadata and assert per-response details values.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts Adds model pricing to the per-response details display string and ensures restored active-turn placeholder responses include details.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Injects stub model metadata via ILanguageModelsService.lookupLanguageModel and asserts response details includes model name + pricing across history and active turn.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

roblourens and others added 8 commits May 8, 2026 17:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…917f8f26384' into agents/944c6bd9-457f-4a9d-9f2b-9917f8f26384

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens
Copy link
Copy Markdown
Member Author

roblourens commented May 11, 2026

/requires-eval-assessment vscbench,terminalbench2 gpt-5.4,claude-opus-4.6

@roblourens roblourens added the ~requires-eval-assessment Evals will be run and will generate a report upon completion label May 11, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

⏳ Queued vscode build for a2faabd06a8e6d50be4d0e75dcd9a3a75664570d (step 1/2).

@vs-code-engineering vs-code-engineering Bot removed the ~requires-eval-assessment Evals will be run and will generate a report upon completion label May 11, 2026
roblourens and others added 2 commits May 11, 2026 19:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens roblourens marked this pull request as ready for review May 12, 2026 02:56
@roblourens roblourens enabled auto-merge (squash) May 12, 2026 02:56
@roblourens roblourens merged commit d079656 into main May 12, 2026
25 checks passed
@roblourens roblourens deleted the agents/944c6bd9-457f-4a9d-9f2b-9917f8f26384 branch May 12, 2026 03:23
@vs-code-engineering vs-code-engineering Bot added this to the 1.121.0 milestone May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentHost: Show credit usage info

3 participants