litellm/tests/unit/llms/mistral
Mateo Wang 73aaf9e3da
fix(mistral): forward prompt_cache_key to the Mistral API (#47432)
* fix(mistral): forward prompt_cache_key to the Mistral API

* fix(mistral): send prompt_cache_key only to Mistral's API and accept reasoning_effort on devstral and code-agent models

* fix(mistral): keep the upstream api_base out of the prompt_cache_key rejection message

* fix(mistral): honor allowed_openai_params for prompt_cache_key and gate codestral async and env hosts

* test(mistral): annotate the new adapter prompt_cache_key tests

* fix(mistral): drop or reject a prompt_cache_key the Mistral API cannot take

A non-ASCII prompt_cache_key gets a 500 from api.mistral.ai, and a non-string
one a 422, so both now drop under drop_params and answer 400 without it, like
any value the provider cannot take. The /v1/messages adapter derives no key
from a non-ASCII Claude Code session for Mistral, and the 400 names the
caller's provider, so a codestral deployment's error says codestral.

* fix(mistral): send a reasoning_effort object as its level and keep UnsupportedParamsError on sync calls

* fix(mistral): keep async codestral file uploads working by not rewriting the caller's file blocks
2026-10-30 08:16:16 +00:00
..
audio_speech chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
audio_transcription test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
batches test: migrate phase 9 legacy llm provider tests to tests/unit 2026-09-20 08:13:11 +00:00
files test: migrate phase 9 legacy llm provider tests to tests/unit 2026-09-20 08:13:11 +00:00
__init__.py test: migrate phase 9 legacy llm provider tests to tests/unit 2026-09-20 08:13:11 +00:00
test_mistral_chat_transformation.py fix(mistral): forward prompt_cache_key to the Mistral API (#47432) 2026-10-30 08:16:16 +00:00
test_mistral_completion.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
test_mistral_embedding.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00