Expected Behavior
The built-in Anthropic Claude API node should run successfully when selecting Opus 4.7.
Actual Behavior
When executing a workflow that uses the built-in Anthropic Claude node with Opus 4.7, the request fails with a 400 invalid request error from Anthropic:
API Error: `temperature` is deprecated for this model. (Type: invalid_request_error)
Relevant Log
2026-05-15 17:04:12.934193 FETCH ComfyRegistry Data [DONE]
[ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
[ComfyUI-Manager] All startup tasks have been completed.
got prompt
!!! Exception during processing !!! API Error: `temperature` is deprecated for this model. (Type: invalid_request_error)
Traceback (most recent call last):
File "C:\Users\V\Documents\ComfyUI\ComfyUI\execution.py", line 454, in execute
raise ex
File "C:\Users\V\Documents\ComfyUI\ComfyUI\execution.py", line 450, in execute
results.append(r.result())
File "C:\Users\V\Documents\ComfyUI\ComfyUI\comfy_api_nodes\nodes_anthropic.py", line 222, in execute
response = await sync_op(
File "C:\Users\V\Documents\ComfyUI\ComfyUI\comfy_api_nodes\util\client.py", line 789, in _request_base
raise Exception(msg)
Exception: API Error: `temperature` is deprecated for this model. (Type: invalid_request_error)
Prompt executed in 21.35 seconds
Cause
comfy_api_nodes/nodes_anthropic.py currently includes Opus 4.7:
CLAUDE_MODELS: dict[str, str] = {
"Opus 4.7": "claude-opus-4-7",
...
}
But the node always sends temperature in the Anthropic request:
temperature = model["temperature"]
...
AnthropicMessagesRequest(
model=CLAUDE_MODELS[model_label],
max_tokens=max_tokens,
messages=[AnthropicMessage(role=AnthropicRole.user, content=content)],
system=system_prompt or None,
temperature=temperature,
)
Anthropic's Claude Opus 4.7 migration docs say that setting temperature, top_p, or top_k to any non-default value returns a 400 error:
https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7#sampling-parameters-removed
Suggested Fix
For claude-opus-4-7, omit the temperature field entirely. For example:
model_id = CLAUDE_MODELS[model_label]
temperature = None if model_id == "claude-opus-4-7" else model["temperature"]
Since the request serializer appears to use exclude_none=True, this should prevent temperature from being sent for Opus 4.7 while preserving the existing behavior for older Claude models.
Alternatively, the UI could hide or disable the temperature input for models that do not support sampling parameters.
Environment
- OS: Windows
- Node: built-in
Anthropic Claude API node
- Model selected:
Opus 4.7
- Local file path in traceback:
ComfyUI/comfy_api_nodes/nodes_anthropic.py
- ComfyUI commit/version: unknown; local install is not a git checkout
Expected Behavior
The built-in Anthropic Claude API node should run successfully when selecting
Opus 4.7.Actual Behavior
When executing a workflow that uses the built-in Anthropic Claude node with
Opus 4.7, the request fails with a 400 invalid request error from Anthropic:Relevant Log
Cause
comfy_api_nodes/nodes_anthropic.pycurrently includesOpus 4.7:But the node always sends
temperaturein the Anthropic request:Anthropic's Claude Opus 4.7 migration docs say that setting
temperature,top_p, ortop_kto any non-default value returns a 400 error:https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7#sampling-parameters-removed
Suggested Fix
For
claude-opus-4-7, omit thetemperaturefield entirely. For example:Since the request serializer appears to use
exclude_none=True, this should preventtemperaturefrom being sent for Opus 4.7 while preserving the existing behavior for older Claude models.Alternatively, the UI could hide or disable the temperature input for models that do not support sampling parameters.
Environment
Anthropic ClaudeAPI nodeOpus 4.7ComfyUI/comfy_api_nodes/nodes_anthropic.py