mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-31 19:18:08 -05:00
Anthropic responses echo the same logical model with a different separator (e.g. request 'claude-opus-4.6' resolves to 'claude-opus-4-6'), causing GROUP BY / DISTINCT on gen_ai.response.model to produce duplicate rows. Add normalizeResponseModel(requestModel, responseModel) that echoes the request value when the two strings only differ in '.' vs '-', and returns the resolved value unchanged when it adds real specificity (e.g. 'gpt-5.4-mini' -> 'gpt-5.4-mini-2026-03-17'). Wire into the three call sites that set gen_ai.response.model: chatMLFetcher (chat spans), toolCallingLoop (foreground invoke_agent), and claudeOTelTracker (Claude invoke_agent). Fixes #318805