chore: promote staging to staging-promote/4353493a-24449434063 (2026-04-15 11:21 UTC) - #2499
Conversation
#2493) * fix: duplicate reasoning_content fields in chat completions response * fix: resolve comments * style: fix rustfmt and ignore RUSTSEC-2026-{0098,0099} in cargo-deny Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: resolve comments --------- Co-authored-by: serrrfirat <f@nuff.tech> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code reviewFound 5 issues:
The two methods implement subtly different semantics for fallback handling:
This violates the DRY principle and creates a maintainability hazard. Per CLAUDE.md ("extract helpers when logic is reused"), the fallback selection should be extracted to a single source of truth. https://github.com/anthropics/ironclaw/blob/1e16b8085a0a0a37734e76c8a7b09e474aec3ac5/src/llm/nearai_chat.rs#L532-L534
Per CLAUDE.md's "Test Through the Caller, Not Just the Helper" rule, the new test
These gaps should be addressed with integration tests driving the full LLM provider methods.
The fallback precedence ( impl ChatCompletionResponseMessage {
fn get_text_content(&self, include_reasoning_fallback: bool) -> Option<String> {
self.content.clone()
.or_else(|| {
if include_reasoning_fallback {
self.reasoning_content.clone().or(self.reasoning.clone())
} else {
None
}
})
}
}This would unify logic across both methods and make the behavioral difference between
The comment at line 1083-1085 explains that models return reasoning in different field names, but now that the serde alias is removed and |
Auto-promotion from staging CI
Batch range:
a53eac5c2dec6b6cd5c08189086093fde64aa9cb..be0b33b2a373e7b1e66cb9a587c181a19654eedcPromotion branch:
staging-promote/be0b33b2-24451653982Base:
staging-promote/4353493a-24449434063Triggered by: Staging CI batch at 2026-04-15 11:21 UTC
Commits in this batch (46):
ironclaw profile listsubcommand (feat(cli): addironclaw profile listsubcommand #2288)reasoning_contentfields in chat completions response (fix: duplicatereasoning_contentfields in chat completions response #2493)Current commits in this promotion (0)
Current base:
mainCurrent head:
staging-promote/be0b33b2-24451653982Current range:
origin/main..origin/staging-promote/be0b33b2-24451653982Auto-updated by staging promotion metadata workflow
Waiting for gates:
Auto-created by staging-ci workflow