Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ async def _run_impl(self) -> None:
self._response_completed = False
chat_ctx, _ = self._chat_ctx.to_provider_format(format="openai.responses")

# When using previous_response_id, the server already has function_call
# items from the previous response — don't send them again.
if "previous_response_id" in self._extra_kwargs:
chat_ctx = [
item
for item in chat_ctx
if not (isinstance(item, dict) and item.get("type") == "function_call")
]

self._tool_ctx = llm.ToolContext(self.tools)
tool_schemas = cast(
list[ToolParam],
Expand Down
Loading