fix: removed use_websearch; this parameter was confusing Codex. It started using this to prompt the external model to perform searches! web-search is enabled by Claude / Codex etc by default and the external agent can ask claude to search on its behalf.

This commit is contained in:
Fahad
2025-10-01 18:44:11 +04:00
parent 28cabe0833
commit cff6d8998f
27 changed files with 45 additions and 129 deletions

View File

@@ -97,7 +97,7 @@ class TestChatTool:
@pytest.mark.asyncio
async def test_prompt_preparation(self):
"""Test that prompt preparation works correctly"""
request = ChatRequest(prompt="Test prompt", files=[], use_websearch=True)
request = ChatRequest(prompt="Test prompt", files=[])
# Mock the system prompt and file handling
with patch.object(self.tool, "get_system_prompt", return_value="System prompt"):
@@ -181,7 +181,6 @@ class TestChatRequestModel:
assert hasattr(request, "model")
assert hasattr(request, "temperature")
assert hasattr(request, "thinking_mode")
assert hasattr(request, "use_websearch")
assert hasattr(request, "continuation_id")
assert hasattr(request, "images") # From base model too