diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-08-12 00:21:23 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-08-12 00:21:23 +0900 |
| commit | 98b6a2aeedd591058c1d81e401d24f3ded162926 (patch) | |
| tree | 74cbb38af825526e4fc90b150feed14426d727b4 /tests/Agent.Core.Tests/ObservabilityTests.cs | |
| parent | ce550a127b7dc972651bd15b9f09979a2c38688f (diff) | |
fix: implement native Ollama thinking semantics
Model Ollama chat thinking separately from final content, preserve it only across assistant tool-call continuation, and keep private reasoning out of user results, session context, and logs.
Accept native boolean and low/medium/high/max think values, normalize YAML booleans, and serialize explicit overrides using the native top-level chat field.
Stop forcing think=false for structured planning, skill selection, and context summaries; corrected retries now retain the configured thinking mode.
Update the specification, design, audit report, and requirement traceability for OLL-14.
Add request/response, configuration, observability, retry, and tool-continuation coverage. Verified with 92 passing Agent.Core tests and a deepseek-v4-flash:cloud think:true MCP operational run.
Diffstat (limited to 'tests/Agent.Core.Tests/ObservabilityTests.cs')
| -rw-r--r-- | tests/Agent.Core.Tests/ObservabilityTests.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Agent.Core.Tests/ObservabilityTests.cs b/tests/Agent.Core.Tests/ObservabilityTests.cs index 8231ab9..3dcfdf6 100644 --- a/tests/Agent.Core.Tests/ObservabilityTests.cs +++ b/tests/Agent.Core.Tests/ObservabilityTests.cs @@ -23,8 +23,8 @@ public sealed class ObservabilityTests var context = new AgentLlmCallContext(callId, sessionId, taskId, plannerTaskId, "replan", 7, 2, "model-a"); using (var observer = new JsonLinesRuntimeObserver(directory.Path, 1024 * 1024, 2)) { - observer.LlmRequest(context, [new OllamaMessage("user", "request")]); - observer.LlmResponse(context, new OllamaResult("response", 11, 13)); + observer.LlmRequest(context, [new OllamaMessage("assistant", "request", Thinking: "private request reasoning")]); + observer.LlmResponse(context, new OllamaResult("response", 11, 13, Thinking: "private response reasoning")); observer.ToolResult(context, "file_read", new ToolExecutionResult(true, "ok", false)); observer.LlmFailure(context, "planning_failed", "invalid plan"); } @@ -45,6 +45,9 @@ public sealed class ObservabilityTests Assert.Equal("file_read", entries[2].GetProperty("tool_name").GetString()); Assert.Equal("llm.failure", entries[3].GetProperty("event_name").GetString()); Assert.Equal("planning_failed", entries[3].GetProperty("error_code").GetString()); + string log = File.ReadAllText(Path.Combine(directory.Path, "llm.jsonl")); + Assert.DoesNotContain("private request reasoning", log, StringComparison.Ordinal); + Assert.DoesNotContain("private response reasoning", log, StringComparison.Ordinal); } [Fact] |
