mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 14:03:49 +00:00
fix(coding-agent): avoid compaction reasoning for non-reasoning models (#1793)
This commit is contained in:
parent
85d06052fb
commit
d35935200f
2 changed files with 83 additions and 1 deletions
|
|
@ -554,10 +554,14 @@ export async function generateSummary(
|
|||
},
|
||||
];
|
||||
|
||||
const completionOptions = model.reasoning
|
||||
? { maxTokens, signal, apiKey, reasoning: "high" as const }
|
||||
: { maxTokens, signal, apiKey };
|
||||
|
||||
const response = await completeSimple(
|
||||
model,
|
||||
{ systemPrompt: SUMMARIZATION_SYSTEM_PROMPT, messages: summarizationMessages },
|
||||
{ maxTokens, signal, apiKey, reasoning: "high" },
|
||||
completionOptions,
|
||||
);
|
||||
|
||||
if (response.stopReason === "error") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue