Repository navigation
feat: Bump support for mistral - #2890
Luca Forstner (lforst) wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Confidence Score: 4/5
[Medium impact] The runtime effect is limited to applications using the Mistral JavaScript SDK. The PR appears safe to merge, with a non-blocking loss of transcription token details. Findings
Fix with agent prompt### Issue 1
js/src/auto-instrumentations/configs/mistral.ts:36
Adding Mistral v4 drops audio and cached token counts from transcription spans. The recording includes `audio_tokens: 375` and `cached_tokens: 1`, but both new transcription snapshots lose `prompt_audio_tokens` and `prompt_cached_tokens` compared with v3.
`mistralMediaMetrics` only reads snake-case detail fields, unlike the chat parser, which also handles `promptTokensDetails`. Extend the media parser to read v4's parsed usage fields and retain these counts in the snapshots.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds Mistral v4 support through the existing automatic tracing rules.
Reviews (1) · Last reviewed commit: "feat: Bump support for mistral" · Reviewed by Greptile |
| module: { | ||
| name: "@mistralai/mistralai", | ||
| versionRange: ">=2.0.0 <4.0.0", | ||
| versionRange: ">=2.0.0 <5.0.0", |
There was a problem hiding this comment.
Transcription token details disappear
Adding Mistral v4 drops audio and cached token counts from transcription spans. The recording includes audio_tokens: 375 and cached_tokens: 1, but both new transcription snapshots lose prompt_audio_tokens and prompt_cached_tokens compared with v3.
mistralMediaMetrics only reads snake-case detail fields, unlike the chat parser, which also handles promptTokensDetails. Extend the media parser to read v4's parsed usage fields and retain these counts in the snapshots.
Knowledge Base Used: Provider and framework instrumentation
Prompt To Fix With AI
This is a comment left during a code review.
Path: js/src/auto-instrumentations/configs/mistral.ts
Line: 36
Comment:
**Transcription token details disappear**
Adding Mistral v4 drops audio and cached token counts from transcription spans. The recording includes `audio_tokens: 375` and `cached_tokens: 1`, but both new transcription snapshots lose `prompt_audio_tokens` and `prompt_cached_tokens` compared with v3.
`mistralMediaMetrics` only reads snake-case detail fields, unlike the chat parser, which also handles `promptTokensDetails`. Extend the media parser to read v4's parsed usage fields and retain these counts in the snapshots.
**Knowledge Base Used:** [Provider and framework instrumentation](https://app.greptile.com/-/switch-tenant?tenant=braintrust&next=%2Fcustom-context%2Fknowledge-base%2Fbraintrustdata%2Fbraintrust-sdk-javascript%2F-%2Fdocs%2Fprovider-instrumentation.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
No description provided.