Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Update Anthropic effort handling

Abi Raja9c2ff5d0ca5a
diff --git a/backend/agent/providers/anthropic.py b/backend/agent/providers/anthropic.py
index c6e93ac7..262d46ec 100644
--- a/backend/agent/providers/anthropic.py
+++ b/backend/agent/providers/anthropic.py
@@ -252,7 +252,12 @@ class AnthropicProviderSession(ProviderSession):
stream_kwargs["thinking"] = {
"type": "adaptive",
}
- stream_kwargs["output_config"] = {"effort": "max"}
+ effort = (
+ "high"
+ if self._model.value == Llm.CLAUDE_SONNET_4_6.value
+ else "max"
+ )
+ stream_kwargs["output_config"] = {"effort": effort}
elif self._model.value in THINKING_MODELS:
stream_kwargs["thinking"] = {
"type": "enabled",