Doriandarko / maestro

A framework for Claude Opus to intelligently orchestrate subagents.
4.13k stars 639 forks source link

Repeated Tavily Bad Gateway URL errors crashing Maestro #34

Open spocksbrain opened 4 months ago

spocksbrain commented 4 months ago

When handing off tasks to Haiku, the following has been occurring repeatedly.

Traceback (most recent call last): File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestro.py", line 246, in sub_task_result = haiku_sub_agent(sub_task_prompt, search_query, haiku_tasks, use_search) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestro.py", line 102, in haiku_sub_agent qna_response = tavily.qna_search(query=search_query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Spocksbrain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\tavily\tavily.py", line 68, in qna_search search_result = self._search(query, search_depth=search_depth, include_answer=True, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Spocksbrain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\tavily\tavily.py", line 42, in _search response.raise_for_status() # Raises a HTTPError if the HTTP request returned an unsuccessful status code ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Spocksbrain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.tavily.com/search PS C:\Users\Spocksbrain\Documents\Code_Projects\maestro>

Sludge2158 commented 4 months ago

I experienced the same thing. I logged in to Tavily via a browser to check if the key was alright. After running the script, the error did not appear again. I'm not sure if there's a consistent connection though.

spocksbrain commented 4 months ago

This may have been caused by vscode/cursor. Adding domain as trusted seems to have fixed the issue.