-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels