Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[bot] Mistral Batch API (`client.batch.jobs`) is not instrumented

Ouverte
#2,685 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, typescript

Piste de recherche

Start by reading js/src/instrumentation/plugins/mistral-interceptors.ts to see how existing Mistral channels are declared, then mistral-plugin.ts to see how they are subscribed. Compare js/src/wrappers/mistral.ts and js/src/vendor-sdk-types/mistral.ts to understand how the batch namespace is currently unwrapped and typed. Done means client.batch.jobs.create/get/list and result download produce spans consistent with the existing chat and embeddings instrumentation, with tests covering the batch lifecycle.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Summary

Mistral's official TypeScript SDK exposes a documented Batch API (client.batch.jobs.create()/.get()/.list(), plus client.files.download() for results) for submitting large-scale async chat, embeddings, FIM, moderation, classification, OCR, and conversation jobs. This repo instruments every one of Mistral's synchronous execution surfaces but has zero coverage of the batch lifecycle — no channel, no plugin logic, no vendor type.

What's missing

  • js/src/instrumentation/plugins/mistral-plugin.ts — MistralPlugin.onEnable()/subscribeToMistralChannels() (lines 24-277) subscribes to exactly ten channels: chatComplete, chatStream, embeddingsCreate, classifiersModerate, classifiersModerateChat, classifiersClassify, classifiersClassifyChat, fimComplete, fimStream, agentsComplete, agentsStream. There is no batch-related channel anywhere in the file.
  • js/src/instrumentation/plugins/mistral-interceptors.ts — grepped for batch/Batch (case-insensitive): zero matches. No mistralChannels.batch* exists for the plugin to subscribe to in the first place.
  • js/src/vendor-sdk-types/mistral.ts — MistralClient (lines 222-229) is typed as { chat?, fim?, agents?, embeddings?, classifiers?, [key: string]: unknown }. There is no batch namespace type at all (no MistralBatch, MistralBatchJob, etc.), so even an untyped passthrough isn't modeled.
  • js/src/wrappers/mistral.ts — wrapMistral()/mistralProxy() (lines 85-108) proxies only chat, fim, agents, embeddings, classifiers. A client's batch property is returned as-is via the proxy's default branch (Reflect.get, line 104) — fully unwrapped, so client.batch.jobs.create(...) produces no span of any kind: no submission span, no status/polling span, no per-request result spans.

This means a customer submitting client.batch.jobs.create({ endpoint: "/v1/chat/completions", inputFiles: [...] }) — a fully supported, documented Mistral API call — gets no trace in Braintrust whatsoever, while the same customer's synchronous chat.complete/embeddings.create calls are fully traced with input, output, and token metrics.

Braintrust docs status

not_found. https://www.braintrust.dev/docs/providers/mistral documents only synchronous spans: "Chat completion spans (mistral.chat.complete...)", "Embedding spans (mistral.embeddings.create)", "Fill-in-the-middle completion spans", "Audio transcription spans." The page's "All call types support sync and async variants" line refers to Python's asyncio client variants, not batch jobs. No batch/async-job tracing is mentioned anywhere on the page.

Upstream sources

  • https://docs.mistral.ai/capabilities/batch/ — Batch API guide: client.batch.jobs.create() accepts input_files (file-based, up to 1,000,000 requests) or inline requests (up to 10,000); supports endpoint values /v1/embeddings, /v1/chat/completions, /v1/fim/completions, /v1/moderations, /v1/chat/moderations, /v1/ocr, /v1/classifications, /v1/conversations, /v1/audio/transcriptions; status via client.batch.jobs.get()/.list(); results retrieved via client.files.download().

Braintrust docs sources checked

Local repo files inspected

  • js/src/instrumentation/plugins/mistral-plugin.ts — subscribeToMistralChannels() (lines 24-277), full enumerated channel list
  • js/src/instrumentation/plugins/mistral-interceptors.ts — grepped for batch/Batch, zero matches
  • js/src/vendor-sdk-types/mistral.ts — MistralClient type (lines 222-229)
  • js/src/wrappers/mistral.ts — mistralProxy() (lines 85-108), proxy coverage limited to chat/fim/agents/embeddings/classifiers
Langage dominant
TypeScript
Étoiles
29
Forks
21
Merge moyen
1 j 15 h
PR mergées (30 j)
76

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de braintrustdata/braintrust-sdk-javascript

Toutes les issues de braintrustdata/braintrust-sdk-javascript

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.