Skip to content

[BUG MODEL]: Confusing 404 error when sending document_url to mistral-vibe-cli-latest #441

@bilelomrani1

Description

@bilelomrani1

Model

mistral-vibe-cli-latest

Request Payload

import asyncio
import os
from mistralai.client import Mistral

PDF_B64 = (
    "JVBERi0xLjAKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUj4+ZW5kb2JqCjIg"
    "MCBvYmo8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PmVuZG9iagozIDAgb2Jq"
    "PDwvVHlwZS9QYWdlL01lZGlhQm94WzAgMCAzIDNdL1BhcmVudCAyIDAgUj4+ZW5kb2JqCnhy"
    "ZWYKMCA0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAw"
    "MDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKdHJhaWxlcjw8L1NpemUgNC9Sb290"
    "IDEgMCBSPj4Kc3RhcnR4cmVmCjE5MAolJUVPRg=="
)

async def main():
    client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
    resp = await client.chat.complete_async(
        model="mistral-vibe-cli-latest",
        messages=[{
            "role": "user",
            "content": [
                {
                    "type": "document_url",
                    "document_url": f"data:application/pdf;base64,{PDF_B64}",
                },
                {"type": "text", "text": "What is in this document?"},
            ],
        }],
        max_tokens=16,
    )

asyncio.run(main())

Output

{
  "object": "error",
  "message": "The model `mistral-ocr-2411` does not exist for router `ocr`.",
  "type": "model_not_found",
  "param": null,
  "code": "3040",
  "raw_status_code": 404
}

Expected Behavior

document_url is (as far as I know) not documented for mistral-vibe-cli so I'm not sure whether or not it's expected to work, but even if it's not, I think the API should return a clear 400 error indicating the content type is unsupported for this model (similar to how image_url validation works for non-vision models).

Instead, the server currently silently routes the request to an OCR model (mistral-ocr-2411) that does not exist. The 404 status code and model_not_found type are a bit misleading.

Additional Context

No response

Suggested Solutions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions