Skip to content

fix(parser): record the model on vscode-copilot assistant messages - #1778

Merged
mariusvniekerk merged 1 commit into
kenn-io:mainfrom
tunglambk:fix/vscode-copilot-message-model
Sep 17, 2026
Merged

mariusvniekerk merged 1 commit into
kenn-io:mainfrom
tunglambk:fix/vscode-copilot-message-model

Conversation

@tunglambk

Copy link
Copy Markdown
Contributor

VS Code Copilot chat sessions persist the serving model per request, in modelId and in result.metadata.resolvedModel, but only the per-turn usage event read it. Assistant messages were appended without a Model even though the provider advertises per-message model support, so mirrored message rows carried an empty model column.

Both consumers now resolve the model through one helper: result.metadata.resolvedModel when the request carries metadata, otherwise the request's prefixed modelId, normalized the same way the usage event already normalized it. The token columns are unaffected and stay empty by design for this format: it records only per-turn token totals, which the parser emits as usage events rather than per-message values.

The test covers a turn whose model comes from metadata, a turn whose model falls back to modelId, and a per-turn switch between two models, which is why the value belongs on the message and not on the session.

Locally, one unrelated parser test fails on the branch base in this sandbox (TestParseWorkBuddySessionUsesCwdProjectAndFileSessionID).

Fixes #1777

@roborev-ci

roborev-ci Bot commented Sep 15, 2026

Copy link
Copy Markdown

roborev: Combined Review (9b13d0b)

Verdict: No findings at or above medium severity.


Reviewers: 2 done | Synthesis: codex | Total: 1m50s

@mariusvniekerk mariusvniekerk self-assigned this Sep 17, 2026
VS Code Copilot chat sessions persist the serving model per request, in modelId and in result.metadata.resolvedModel, but only the per-turn usage event consumed it. Assistant messages were appended without a Model, so mirrored message rows carried an empty model column even though the provider advertises per-message model support. Resolve the model through one helper used by both the usage event and the message.
@mariusvniekerk
mariusvniekerk force-pushed the fix/vscode-copilot-message-model branch from 9b13d0b to 8bdb327 Compare September 17, 2026 18:25
@roborev-ci

roborev-ci Bot commented Sep 17, 2026

Copy link
Copy Markdown

roborev: Combined Review (8bdb327)

Verdict: No findings at or above medium severity.


Reviewers: 2 done | Synthesis: codex | Total: 1m24s

@mariusvniekerk
mariusvniekerk merged commit 800230f into kenn-io:main Sep 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Cannot push model and token data into message table with "pg push" when using vscode copilot as AI asistant

2 participants