mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
fix(codebuddy): only send reasoning params when client requests reasoning
Forcing reasoning_effort:"medium" + reasoning_summary:"auto" on plain requests tripped CodeBuddy's content filter and returned an error (#2071). Make reasoning params opt-in: only set reasoning_summary when the client sent an explicit reasoning_effort; none/off still drops it. Fixes #2071 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
77b3856402
commit
d1e98d9a60
@@ -25,10 +25,14 @@ export class CodeBuddyExecutor extends DefaultExecutor {
|
||||
const eff = transformed.reasoning_effort;
|
||||
if (eff === "none" || eff === "off") {
|
||||
delete transformed.reasoning_effort; // gateway has no "none" — just omit
|
||||
} else {
|
||||
if (!eff) transformed.reasoning_effort = "medium";
|
||||
} else if (eff) {
|
||||
// Client explicitly asked for reasoning — mirror the CLI's reasoning_summary
|
||||
// so CodeBuddy surfaces the model's reasoning.
|
||||
transformed.reasoning_summary = "auto";
|
||||
}
|
||||
// No reasoning requested: leave both unset. Forcing reasoning_effort:"medium"
|
||||
// + reasoning_summary on plain requests makes CodeBuddy trip its content
|
||||
// filter and return an error (#2071).
|
||||
return transformed;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user