diff options
Diffstat (limited to 'src/Agent.Core/Runtime/PlannerService.cs')
| -rw-r--r-- | src/Agent.Core/Runtime/PlannerService.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Agent.Core/Runtime/PlannerService.cs b/src/Agent.Core/Runtime/PlannerService.cs index bc96ec7..3591259 100644 --- a/src/Agent.Core/Runtime/PlannerService.cs +++ b/src/Agent.Core/Runtime/PlannerService.cs @@ -218,8 +218,7 @@ public sealed class PlannerService(IOllamaClient ollama, AgentRuntimeSettings se OllamaResult? result = null; try { - bool? thinkOverride = attempt == 0 ? null : false; - result = await _ollama.ChatStructuredAsync(attemptMessages, temperature, formatDoc.RootElement.Clone(), thinkOverride, cancellationToken).ConfigureAwait(false); + result = await _ollama.ChatStructuredAsync(attemptMessages, temperature, formatDoc.RootElement.Clone(), null, cancellationToken).ConfigureAwait(false); if (!TryParseSelectedSkills(result.Content, out IReadOnlyList<AgentSkill> selected)) throw new PlannerValidationException("Ollama returned an invalid skill selection object."); observeAttempt?.Invoke("skill_selection", attemptMessages, result, null); @@ -250,8 +249,7 @@ public sealed class PlannerService(IOllamaClient ollama, AgentRuntimeSettings se OllamaResult? result = null; try { - bool? thinkOverride = attempt == 0 ? null : false; - result = await _ollama.ChatStructuredAsync(attemptMessages, temperature, PlanSchema.Element, thinkOverride, cancellationToken).ConfigureAwait(false); + result = await _ollama.ChatStructuredAsync(attemptMessages, temperature, PlanSchema.Element, null, cancellationToken).ConfigureAwait(false); PlanResult? plan = ParsePlan(result.Content); if (plan is null || plan.Tasks.Count == 0) throw new PlannerValidationException("Ollama returned an empty or invalid structured plan."); @@ -274,7 +272,7 @@ public sealed class PlannerService(IOllamaClient ollama, AgentRuntimeSettings se } } } - throw new PlannerValidationException($"Structured {phase} failed after think=false retry: {lastFailure?.Message}"); + throw new PlannerValidationException($"Structured {phase} failed after one corrected retry: {lastFailure?.Message}"); } private bool TryParseSelectedSkills(string content, out IReadOnlyList<AgentSkill> selected) |
