Skip to content

Prompt caching and transcription language

Latest

Choose a tag to compare

@Elijaht-dev Elijaht-dev released this 18 Nov 20:33
50064c6

What's new

  • Automatic prompt caching for Conversation entities. A stable key per account entry, Conversation entity and model helps Mistral reuse matching prefixes across conversations. No setting is needed. Home Assistant supplies the complete prompt, tools and history on every request. See the reused token count as cached_input_tokens in traces and integration debug logs.
  • Transcription language selection for Batch and Realtime. Follow the Assist pipeline, detect automatically, or choose a fixed language. New STT entities follow the pipeline. Existing entities preserve their previous behavior until their language setting is changed.
  • Change the account API key from Reconfigure. Open the account entry's menu under Settings > Devices & services > Mistral AI Conversation, select Reconfigure, and enter a new key. Validation happens before saving. Successful changes keep the existing entities and settings; failed validation preserves the active key. Check model and voice access when switching Mistral accounts.

Compatibility and dependencies

The minimum supported Home Assistant remains 2026.7.4, and the runtime Mistral SDK remains 3.7.0. The primary test baseline is updated to Home Assistant 2026.11.1 with matching fixtures. Test dependencies include mypy 2.4.1, Ruff 0.17.5 and Mutagen 1.48.1. Home Assistant's HTTPX2 2.14.0 constraint is preserved, with 2.16.0 also tested on older supported versions.

Validation

  • All five complete pinned compatibility suites passed: 732 tests on HA 2026.11.1 and 689 tests on each older combination, plus 43 expected evaluation skips. Branch coverage is 87.68–91.55%. Formatting, lint, strict typing, dependency checks and offline HACS validation passed.
  • A backed-up HA 2026.11.2 instance passed the six STT language cases, Realtime STT cancellation/recovery, account reconfiguration, fresh conversations and local-intent follow-ups, read-only tools, structured AI Task and evaluation with images/PDFs.
  • Standard TTS with normalization and Realtime TTS passed audio retrieval/decoding, early download closure/recovery and native Assist streaming using the saved voice. Image generation, reference-image retrieval and private synthetic file deletion also passed. Temporary test entities, pipelines and image files were removed; settings were preserved and final integration logs were clean.
  • The subscribed account now accepts the audio requests that blocked prerelease validation. Live audio checks used synthetic recordings and retrieved generated audio without physical playback.

Full details: QUALITY.md. Public validation run. Release pull request.