mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 17:09:13 -10:00
fix(reviewer): ask DeepSeek for low reasoning effort in the Auto-Review guardian
CW-7450 item 2. consult_reviewer sent reasoning_effort None, temperature 0.0 and a 4,096-token cap. On DeepSeek no reasoning field means the server default applies: thinking on, effort high. Temperature has no effect in thinking mode. High-effort reasoning plus the verdict had to fit in 4,096 tokens together. When it did not, the incomplete stop mapped to Unavailable and auto-approval stalled. On the DeepSeek provider the guardian now sends reasoning_effort "low", which DEEPSEEK_EFFORT_ALIASES maps to the lowest tier that is not off. Every DeepSeek-provider catalog row (deepseek-flash, deepseek-v4-pro, deepseek-v4-flash, deepseek-v4-flash-vision-exp) publishes "low" in its effort options. Other providers keep None. Sending "low" everywhere would fail the route's reasoning_options check where "low" is not listed (for example OpenRouter, Together and Fireworks deepseek-v4-pro), and the guardian would fail closed there. Drafted by Codewhale running DeepSeek-V4.1-Flash-1017; it flagged the cross-provider risk itself. Claude narrowed the change to DeepSeek. Gates: `scripts/dev-test.sh tui reviewer auto_review guardian`: 92 passed, 0 failed; CI-form clippy -p codewhale-tui --all-targets --all-features -D warnings clean; rustfmt clean; sync-changelog run. Refs CW-7450 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
This commit is contained in:
1 parent
42e0c129fe
commit
72c1327be4
3 files changed
+11
-1
No files matched your search
@@ -73,6 +73,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
thinking, because that returns a 400.
|
||||
- A DeepSeek Chat response that ends with `insufficient_system_resource` or
|
||||
`aborted` is now treated as incomplete, not as a finished answer.
|
||||
- On DeepSeek, the Auto-Review guardian now asks for low reasoning effort.
|
||||
It used to leave thinking at DeepSeek's default (high), so the reasoning
|
||||
could use up the guardian's 4,096-token answer budget, report the review
|
||||
as unavailable, and stall auto-approval.
|
||||
- Durability and blocking-call fixes from the #6553 and #6555 audits:
|
||||
- On Windows the updater syncs the staged binary, tries an atomic replace
|
||||
first, and reports where the previous binary is if restoring it fails.
|
||||
|
||||
@@ -73,6 +73,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
thinking, because that returns a 400.
|
||||
- A DeepSeek Chat response that ends with `insufficient_system_resource` or
|
||||
`aborted` is now treated as incomplete, not as a finished answer.
|
||||
- On DeepSeek, the Auto-Review guardian now asks for low reasoning effort.
|
||||
It used to leave thinking at DeepSeek's default (high), so the reasoning
|
||||
could use up the guardian's 4,096-token answer budget, report the review
|
||||
as unavailable, and stall auto-approval.
|
||||
- Durability and blocking-call fixes from the #6553 and #6555 audits:
|
||||
- On Windows the updater syncs the staged binary, tries an atomic replace
|
||||
first, and reports where the previous binary is if restoring it fails.
|
||||
|
||||
@@ -119,6 +119,8 @@ pub(crate) async fn consult_reviewer(
|
||||
None,
|
||||
);
|
||||
}
|
||||
let deepseek = client.provider_name() == crate::config::ProviderKind::Deepseek.as_str();
|
||||
let reasoning_effort = deepseek.then(|| "low".to_string());
|
||||
let request = MessageRequest {
|
||||
model: client.model().to_string(),
|
||||
messages: vec![Message {
|
||||
@@ -134,7 +136,7 @@ pub(crate) async fn consult_reviewer(
|
||||
tool_choice: None,
|
||||
metadata: None,
|
||||
thinking: None,
|
||||
reasoning_effort: None,
|
||||
reasoning_effort,
|
||||
stream: Some(false),
|
||||
temperature: Some(0.0),
|
||||
top_p: None,
|
||||
|
||||
Reference in new issue
Block a user