Affected component
provider
Severity
S2 - degraded behavior
Conservative — would escalate to S1 if confirmed, since it'd block opus-4-7 on the native Anthropic provider exactly the way #6095 blocked it on Bedrock. May also be a non-issue if Anthropic's native API is more permissive than Bedrock's Converse API.
Current behavior
Suspected — needs reproduction. PR #6144 (just merged as 5d31172) fixed crates/zeroclaw-providers/src/bedrock.rs where InferenceConfig.temperature: f64 was always serialized, causing a non-retryable Bedrock 400 (temperature is deprecated for this model) on claude-opus-4-7.
The Anthropic native provider has the structurally identical shape on master at the time of #6144 merge:
// crates/zeroclaw-providers/src/anthropic.rs:32
struct NativeChatRequest {
...
temperature: f64, // not Option, no skip_serializing_if
}
// crates/zeroclaw-providers/src/anthropic.rs:64 — second request struct, same shape
Both are reachable from chat_with_system (anthropic.rs:799) and chat (anthropic.rs:872) production paths via let temperature = temperature.unwrap_or(self.default_temperature()) followed by unconditional inclusion in the request body. There is no code path that can omit temperature for any model.
Unknown: whether the native Anthropic API (api.anthropic.com/v1/messages) actually rejects temperature for claude-opus-4-7 the way Bedrock does. Bedrock and the native API use different infrastructure and may not share the deprecation. Need a live repro to confirm.
Expected behavior
If the native Anthropic API also rejects temperature for claude-opus-4-7:
If the native API accepts temperature for claude-opus-4-7:
- Document the divergence between Bedrock and native (one rejects, one accepts) so future contributors don't get surprised.
- Close this issue as "not a bug, divergence documented".
Steps to reproduce
# 1. Build current master (post-#6144)
cargo build --release
# 2. Configure native Anthropic provider with opus-4-7
# ~/.zeroclaw/config.toml:
# [providers.models.anthropic]
# model = "claude-opus-4-7"
# Set ANTHROPIC_API_KEY in env.
# 3. Send any message
zeroclaw # interactive mode, send "hi"
# 4. Observe whether the request 400s with "temperature is deprecated for this model"
# or completes successfully.
If the request 400s with the temperature-deprecation message, this issue is confirmed at S1 and needs the same fix shape as #6144. If it completes, close as non-issue + add a comment to the divergence (Bedrock rejects, native accepts).
Impact
No response
Logs / stack traces
No response (pending repro)
ZeroClaw version
master post-#6144 (squash commit 5d31172)
Rust version
No response
Operating system
No response (any — bug is in serialization, OS-independent)
Regression?
Unknown
Additional context
Pre-flight checks
Note: first checkbox is technically inaccurate — this is a suspected-issue file, not a confirmed repro. Will edit with confirmed/refuted status once someone runs the repro.
Affected component
provider
Severity
S2 - degraded behavior
Conservative — would escalate to S1 if confirmed, since it'd block opus-4-7 on the native Anthropic provider exactly the way #6095 blocked it on Bedrock. May also be a non-issue if Anthropic's native API is more permissive than Bedrock's Converse API.
Current behavior
Suspected — needs reproduction. PR #6144 (just merged as
5d31172) fixedcrates/zeroclaw-providers/src/bedrock.rswhereInferenceConfig.temperature: f64was always serialized, causing a non-retryable Bedrock 400 (temperature is deprecated for this model) onclaude-opus-4-7.The Anthropic native provider has the structurally identical shape on master at the time of #6144 merge:
Both are reachable from
chat_with_system(anthropic.rs:799) andchat(anthropic.rs:872) production paths vialet temperature = temperature.unwrap_or(self.default_temperature())followed by unconditional inclusion in the request body. There is no code path that can omittemperaturefor any model.Unknown: whether the native Anthropic API (
api.anthropic.com/v1/messages) actually rejectstemperatureforclaude-opus-4-7the way Bedrock does. Bedrock and the native API use different infrastructure and may not share the deprecation. Need a live repro to confirm.Expected behavior
If the native Anthropic API also rejects
temperatureforclaude-opus-4-7:temperature: Option<f64>+#[serde(skip_serializing_if = "Option::is_none")]+ a per-model predicate (anthropic_model_omits_temperature) that returnsNonefor opus-4-7.If the native API accepts
temperatureforclaude-opus-4-7:Steps to reproduce
If the request 400s with the temperature-deprecation message, this issue is confirmed at S1 and needs the same fix shape as #6144. If it completes, close as non-issue + add a comment to the divergence (Bedrock rejects, native accepts).
Impact
No response
Logs / stack traces
No response (pending repro)
ZeroClaw version
master post-#6144 (squash commit
5d31172)Rust version
No response
Operating system
No response (any — bug is in serialization, OS-independent)
Regression?
Unknown
Additional context
#6007as parallel work for the Anthropic side, but#6007does not resolve in the repo (gh pr view 6007→ "Could not resolve to a PullRequest"). No companion PR currently exists.Option<f64>change is backward-compatible regardless of whether the predicate ever fires.Pre-flight checks
Note: first checkbox is technically inaccurate — this is a suspected-issue file, not a confirmed repro. Will edit with confirmed/refuted status once someone runs the repro.