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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user