Add-on version: 4.1.1
Provider: Claude API (Anthropic)
Model: claude-sonnet-5
Anthropic changed three API behaviours with Sonnet 5. Two of them make
js/api/anthropic.js build a request body that either fails outright or is much
slower than intended. Both are small fixes.
1. Extended thinking budget 0 no longer disables thinking
js/api/anthropic.js, lines 103-111:
const thinkingBudget = parseInt(this.extended_thinking_budget);
const thinkingEnabled = !Number.isNaN(thinkingBudget) && thinkingBudget > 0;
if (thinkingEnabled) {
claude_body.thinking = { type: 'enabled', budget_tokens: thinkingBudget };
} else {
const tempFloat = parseFloat(this.temperature);
if (this.temperature != '' && !Number.isNaN(tempFloat)) claude_body.temperature = tempFloat;
}
When the budget is 0 the request carries no thinking field at all. On Sonnet 4.6
and earlier that meant no thinking. On Sonnet 5 an omitted thinking field means
adaptive thinking is on by default, at the default effort level of high.
The practical effect is that short editing prompts (proofread, rewrite, clarify) now
spend significant time and tokens reasoning before answering, with no way to switch
it off from the options page. The "Extended thinking budget" field is the only
related control, and setting it to 0 does not do what its label implies.
It also consumes the max_tokens budget, since max_tokens caps thinking plus
response text together. A limit sized for a short email rewrite can now be spent on
thinking and truncate the reply.
Suggested fix — send the explicit disable when the budget is 0:
if (thinkingEnabled) {
claude_body.thinking = { type: 'enabled', budget_tokens: thinkingBudget };
} else {
claude_body.thinking = { type: 'disabled' };
const tempFloat = parseFloat(this.temperature);
if (this.temperature != '' && !Number.isNaN(tempFloat)) claude_body.temperature = tempFloat;
}
Note that thinking: { type: 'enabled', budget_tokens: N } is itself removed on
Sonnet 5 and returns 400, so any non-zero budget now fails on that model. The field
may need to be hidden or ignored for Sonnet 5 and later, or repurposed as described
in section 3.
2. A non-default Temperature returns 400 on Sonnet 5
Line 110 sends temperature whenever the field is non-empty. On Sonnet 5, setting
temperature, top_p or top_k to any non-default value returns a 400 error, so
every request fails until the user finds the field and sets it to 1.0 or clears it.
The options page still describes the range as 0.0 to 1.0 with guidance to use lower
values for analytical tasks, which now leads users straight into a broken
configuration.
Suggested fix: skip temperature for models where it is not accepted, or
validate on the options page and warn when a Sonnet 5 model is selected with a
non-default temperature. A clearer error surfaced from the 400 response would also
help, since the current failure gives no hint about which field caused it.
3. Feature request: expose the effort parameter
Sonnet 5 replaces manual thinking budgets with output_config.effort, accepting
low, medium, high (default), xhigh and max.
claude_body.output_config = { effort: this.effort };
For ThunderAI's use cases this maps well onto the existing per-prompt settings. A
proofread or tone rewrite runs fine at low and returns much faster, while a
summarise or classify prompt might warrant medium. Exposing it globally would help;
exposing it per prompt, alongside the existing type and action fields, would fit the
add-on's design better.
Add-on version: 4.1.1
Provider: Claude API (Anthropic)
Model:
claude-sonnet-5Anthropic changed three API behaviours with Sonnet 5. Two of them make
js/api/anthropic.jsbuild a request body that either fails outright or is muchslower than intended. Both are small fixes.
1. Extended thinking budget 0 no longer disables thinking
js/api/anthropic.js, lines 103-111:When the budget is 0 the request carries no
thinkingfield at all. On Sonnet 4.6and earlier that meant no thinking. On Sonnet 5 an omitted
thinkingfield meansadaptive thinking is on by default, at the default effort level of
high.The practical effect is that short editing prompts (proofread, rewrite, clarify) now
spend significant time and tokens reasoning before answering, with no way to switch
it off from the options page. The "Extended thinking budget" field is the only
related control, and setting it to 0 does not do what its label implies.
It also consumes the
max_tokensbudget, sincemax_tokenscaps thinking plusresponse text together. A limit sized for a short email rewrite can now be spent on
thinking and truncate the reply.
Suggested fix — send the explicit disable when the budget is 0:
Note that
thinking: { type: 'enabled', budget_tokens: N }is itself removed onSonnet 5 and returns 400, so any non-zero budget now fails on that model. The field
may need to be hidden or ignored for Sonnet 5 and later, or repurposed as described
in section 3.
2. A non-default Temperature returns 400 on Sonnet 5
Line 110 sends
temperaturewhenever the field is non-empty. On Sonnet 5, settingtemperature,top_portop_kto any non-default value returns a 400 error, soevery request fails until the user finds the field and sets it to 1.0 or clears it.
The options page still describes the range as 0.0 to 1.0 with guidance to use lower
values for analytical tasks, which now leads users straight into a broken
configuration.
Suggested fix: skip
temperaturefor models where it is not accepted, orvalidate on the options page and warn when a Sonnet 5 model is selected with a
non-default temperature. A clearer error surfaced from the 400 response would also
help, since the current failure gives no hint about which field caused it.
3. Feature request: expose the
effortparameterSonnet 5 replaces manual thinking budgets with
output_config.effort, acceptinglow,medium,high(default),xhighandmax.For ThunderAI's use cases this maps well onto the existing per-prompt settings. A
proofread or tone rewrite runs fine at
lowand returns much faster, while asummarise or classify prompt might warrant
medium. Exposing it globally would help;exposing it per prompt, alongside the existing type and action fields, would fit the
add-on's design better.