fix(gateway): include history_offset in error return path
The error return (no final_response) was missing history_offset, falling back to len(history) which has the same session_meta offset bug fixed in PR #395. Now both return paths include the correct filtered history length.
This commit is contained in:
@@ -2031,6 +2031,7 @@ class GatewayRunner:
|
||||
"messages": result.get("messages", []),
|
||||
"api_calls": result.get("api_calls", 0),
|
||||
"tools": tools_holder[0] or [],
|
||||
"history_offset": len(agent_history),
|
||||
}
|
||||
|
||||
# Scan tool results for MEDIA:<path> tags that need to be delivered
|
||||
|
||||
Reference in New Issue
Block a user