Skip to content
Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion apex/services/deep_research/deep_research_langchain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import contextlib
from typing import Any

import tenacity
Expand Down Expand Up @@ -272,7 +273,8 @@ async def invoke(
else:
try:
# PythonREPL returns only printed output (may include trailing newline)
repl_output = self.python_repl.run(code)
with contextlib.redirect_stdout(None):
repl_output = self.python_repl.run(code)
observation_text = repl_output if repl_output else "(no output)"
logger.debug(f"Code execution result:\n{observation_text}")
except Exception as e: # noqa: BLE001
Expand Down