-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit.txt
More file actions
23 lines (18 loc) · 1.27 KB
/
Copy pathcommit.txt
File metadata and controls
23 lines (18 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fix: feed emit_output back to LLM in winding context (2026-06-03)
agent.py — _build_llm_prompt surfaced only verify_output in OBSERVE, never
emit_output. Model never saw actual tool results (file contents, command stdout),
causing infinite retry loops (600+ windings with no information gain).
Fix: add "OBSERVE (result): emit_output[:2000]" before VERIFY line.
---
fix: native OpenAI function-calling replaces text-based tool protocol
json_object mode made things worse — model output {"reasoning":"..."} with no
tool_name key at all. Root cause: text-based protocol is unreliable for any chat
model; the only correct fix is native function calling via the tools API parameter.
- provider.py: LLMProvider.query_with_tools base method (falls back to text query)
- provider.py: HttpProvider.query_with_tools — sends tool schemas via tools= param,
reads tool_calls from response, returns (content, [{name, args},...])
- provider.py: HttpProvider._build_headers extracted; OpenRouterProvider overrides it
- provider.py: removed json_mode flag and DeepSeekProvider json_mode=True
- agent.py: _query_llm now returns (think_text, tool_calls) via query_with_tools
- agent.py: run loop uses native tool_calls when present; falls back to text parsing
- cleared ~/.cache/odot/response_cache.db