…afety net
When a model newly rejects the `temperature` parameter, the provider now
records it and retries the request once without temperature, instead of
400ing until the catalog static set is updated by hand. This class of bug
hit users twice (gpt-5.5, then Opus 4.8).
- new `src/duh/providers/temperature.py`: runtime-learned `_LEARNED_NO_TEMPERATURE`
set + `omit_temperature` / `record_no_temperature` / `is_temperature_error`
- OpenAI + Anthropic `send()`: temperature decision uses the learned set; on a
temperature-related 400 (BadRequest), record the model and retry once without
temperature. `stream()` honors the learned set.
- Static catalog sets remain the fast path for known models; this only adds
self-correction for unknown/new ones.
Live-verified: with Opus 4.8 temporarily removed from the static set, send()
hit a real Anthropic 400, retried without temperature, succeeded, and recorded
the model. 1681 Python tests pass, mypy + ruff clean.
Closes the open follow-up; memory bank updated to reflect it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EkrekgzMAQko92UkjnXhHL
Closes the open follow-up. This class of bug bit users twice — gpt-5.5, then Opus 4.8 — when a model dropped temperature before our catalog knew about it. Now the providers self-correct.
How
Validation
Docs
Memory bank updated (task doc + activeContext/progress/README/toc); the open follow-up is marked resolved.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EkrekgzMAQko92UkjnXhHL