Merge pull request #1130 from NousResearch/hermes/hermes-c877bdeb

fix(anthropic): skip thinking params for Haiku models
This commit is contained in:
Teknium 2026-03-12 19:35:13 -07:00 committed by GitHub
commit 6ceae61a56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -414,8 +414,9 @@ def build_anthropic_kwargs(
# Map reasoning_config to Anthropic's thinking parameter.
# Claude 4.6 models use adaptive thinking + output_config.effort.
# Older models use manual thinking with budget_tokens.
# Haiku models do NOT support extended thinking at all — skip entirely.
if reasoning_config and isinstance(reasoning_config, dict):
if reasoning_config.get("enabled") is not False:
if reasoning_config.get("enabled") is not False and "haiku" not in model.lower():
effort = str(reasoning_config.get("effort", "medium")).lower()
budget = THINKING_BUDGET.get(effort, 8000)
if _supports_adaptive_thinking(model):