Issue Description
Stalwart’s AI integration always includes a numeric temperature in completion requests. Claude Haiku 5.5 rejects this parameter, preventing its use through an otherwise compatible OpenAI-style endpoint.
Relevant implementation
In crates/common/src/enterprise/llm.rs, both ChatCompletionRequest and TextCompletionRequest define temperature as f64. Request construction uses:
temperature: temperature.unwrap_or(self.default_temperature),
Anthropic’s Haiku 5.5 migration guidance requires omitting temperature, top_p, and top_k.
Expected Behavior
Allow temperature to be omitted from requests for models that do not support it, while preserving existing behavior for other models.
Actual Behavior
Stalwart always sends a temperature parameter, the API call is rejected by Anthropic.
Reproduction Steps
- Configure an AiModel using an OpenAI-compatible endpoint routing to Claude Haiku 5.5.
- Invoke it with a synthetic prompt.
- The request includes temperature, and the provider rejects it.
Omitting temperature at the call site does not help: Stalwart substitutes the configured default. Setting it to 0 still sends the parameter.
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
PostgreSQL
Blob Storage
Filesystem
Search Engine
Meilisearch
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on