fix: tool-result message for non-vision tools (KeyError on width); polza provider verified end-to-end (vision + mission on first attempt)

This commit is contained in:
opencode
2026-08-08 20:18:43 +03:00
parent 54ee734ab5
commit c33452edf8
4 changed files with 164 additions and 1 deletions
+8 -1
View File
@@ -516,7 +516,7 @@ class LLMController:
)
self.messages.append(self._frame_message(frame_b64, frame_note))
self._trim_frames()
else:
elif frame_b64 is not None:
# Fallback channel: the digest (plus frame metadata) for
# text-only models.
content = (
@@ -528,6 +528,13 @@ class LLMController:
self.messages.append(
{"role": "tool", "tool_call_id": tc.id, "content": content}
)
else:
# Any other tool: plain structured result, prefixed with
# the CURRENT STATE note.
content = (hint + "\n" if hint else "") + json.dumps(outcome.output)
self.messages.append(
{"role": "tool", "tool_call_id": tc.id, "content": content}
)
call_result = ToolCallResult(
name=name, args=args, ok=True, output=outcome.output, digest=digest
)