Skip to content
Closed
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
9 changes: 8 additions & 1 deletion src/agents/models/openai_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,16 @@ async def _fetch_response(
if _debug.DONT_LOG_MODEL_DATA:
logger.debug("Calling LLM")
else:
# Combine system and user messages only for logging purposes
combined_prompt_for_logging = (
[{"role": "system", "content": system_instructions}]
if system_instructions
else []
) + list_input

logger.debug(
f"Calling LLM {self.model} with input:\n"
f"{json.dumps(list_input, indent=2, ensure_ascii=False)}\n"
f"{json.dumps(combined_prompt_for_logging, indent=2, ensure_ascii=False)}\n"
f"Tools:\n{json.dumps(converted_tools.tools, indent=2, ensure_ascii=False)}\n"
f"Stream: {stream}\n"
f"Tool choice: {tool_choice}\n"
Expand Down