mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(mistral): map tool call ids to Mistral's 9-char shape on Vertex AI and Bedrock Mistral on Vertex AI answers 400 to any tool call id that is not 9 letters or digits, so replayed OpenAI or Anthropic ids fail there. Mistral on Bedrock Converse keeps only an id's last 9 characters, which still fails for short ids like call_abc123 Ids that are not already 9 alphanumeric characters are now hashed to a stable 9-char id, so a call and its tool reply still pair up. Direct Mistral and every other Bedrock model keep the caller's ids * fix(mistral): map tool call ids for Vertex AI Mistral names outside the cost map and Bedrock Mantle Mistral Vertex AI routes every model name holding mistral to its Mistral handler, so the id mapping now runs for @version names and models the cost map lacks. Bedrock Mantle maps chat tool call ids for mistral.* models * test(mistral): check every Vertex AI Mistral name gets the body a listed Mistral model gets A Vertex AI name outside the cost map, @version names included, now sends the same request body as mistral-medium-3 for tool_choice, seed, a user name, reasoning_content and content lists. * fix(vertex_ai): send several Mistral text parts as separate parts * fix(vertex_ai): send Mistral text parts without extra keys when a message carries an image * fix(vertex_ai): send presence_penalty, frequency_penalty and n to Vertex AI Mistral Vertex AI Mistral names outside the cost map used to get the Llama config, which sent these three, and Vertex accepts all three on every Mistral model it serves. Listed names now send them too. The direct Mistral API still leaves them out. A tool call id that is not a string now goes to the provider as it came, which answers 422, where the id mapping raised a 500 --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| audio_speech | ||
| audio_transcription | ||
| batches | ||
| count_tokens | ||
| files | ||
| __init__.py | ||
| test_mistral_chat_transformation.py | ||
| test_mistral_completion.py | ||
| test_mistral_embedding.py | ||