Feature request: support standard image and file content blocks in ChatMistralAI (JavaScript)

Hi everyone,

I’d like to propose adding support for LangChain’s standard image and file content blocks to the JavaScript ChatMistralAI integration.

Use Case

Applications that work with multiple model providers benefit from constructing messages in a shared format.
Supporting standard content blocks in ChatMistralAI would let those applications pass images and supported files through the same message interface, with the adapter handling conversion to Mistral’s format.

In @langchain/mistralai 1.2.0, the converter accepts text and image_url blocks.
Applications using standard image or file blocks need to handle that conversion themselves.

Proposed Support

  • Convert standard image blocks into Mistral’s image representation.
  • Convert standard file blocks for formats supported by the Mistral API and selected model.
  • Provide clear validation for unsupported file formats.

The available file formats would depend on Mistral’s capabilities.
The proposal is to add support for the standard block interface within those limits.

A similar feature request exists for Python.
I’d like to discuss the equivalent support in JavaScript, including standard file blocks.

I’d be happy to contribute a PR with regression tests for this support.
Is this already planned or tracked for JavaScript, and would this approach fit the integration?