Skip to content

feat: Bump support for mistral - #2890

Open
Luca Forstner (lforst) wants to merge 1 commit into
mainfrom
lforst/dum-e/osaka-ac5d661e31
Open

Luca Forstner (lforst) wants to merge 1 commit into
mainfrom
lforst/dum-e/osaka-ac5d661e31

Conversation

@lforst

Copy link
Copy Markdown
Member

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T11:31:17.647799Z 374f675 PR opened
ℹ️ About Codex in GitHub

Your 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.

@greptile-apps

greptile-apps Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5RetriggerView in Greptile

[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.

FindingsFix All in Cursor

  1. P2 Transcription token details disappear ▶
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.

Summary

Adds Mistral v4 support through the existing automatic tracing rules.

  • Mistral SDK v4 calls can now create Braintrust traces through existing hooks.

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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Fix in Cursor Fix in Claude Code Fix in Codex Fix in Devin

This branch has not been deployed

No deployments
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.

1 participant