fix(providers): disabled ollama thinking for off turns

Propagated explicit thinking-off state through the agent loop so provider requests receive disableReasoning instead of an undefined effort. Added Ollama and agent-session regressions for the :off path.\n\nFixes #2239
This commit is contained in:
roboomp
2026-06-10 07:41:58 +00:00
parent e3501e3f76
commit cafd957f5d
10 changed files with 98 additions and 5 deletions
@@ -239,9 +239,11 @@ describe("AgentSession role model thinking behavior", () => {
expect(session.cycleThinkingLevel()).toBe("off");
expect(session.thinkingLevel).toBe("off");
expect(agent.state.disableReasoning).toBe(true);
expect(session.cycleThinkingLevel()).toBe(AUTO_THINKING);
expect(session.configuredThinkingLevel()).toBe(AUTO_THINKING);
expect(session.thinkingLevel).toBe(resolveProvisionalAutoLevel(model));
expect(agent.state.disableReasoning).toBe(false);
expect(session.cycleThinkingLevel()).toBe(Effort.Minimal);
expect(session.thinkingLevel).toBe(Effort.Minimal);
});