sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.4k stars 419 forks source link

Sweep: Claude AI returns error 529 overloaded #3967

Open hellno opened 3 months ago

hellno commented 3 months ago

Details

here are my error logs:

{"client_error":false,"code":529,"detail":"Overloaded"} raise self ._make_status_error_from_response(err.response) from None anthropic. InternalServerError: Error code: 529 I'type, ' error, ' error, I'type, ' overloaded error, ' message, ' Overloaded, 11 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.10/site-packages/sweepai/agents/modify.py" f unction_calls_string chat_gpt. chat_anthropic( File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.1o/site-packages/sweepai/core/chat.py" raise Exception("Anthropic call f ailed" ) from e Exception: Anthropic call f ailed line 583, in modify line 482, in chat_anthropic During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.1o/site-packages/sweepai/agents/modify_f ile.py" new f iles modify( File "/users/hellno/.pyenv/versions/3.10.13/1ib/python3.10/site-packages/sweepai/agents/modify.py" chat_logger. add_chat ( AttributeError: 'NoneType' object has no attribute 'add chat, line 72, in modify_file line 592, in modify

Branch

No response

hellno commented 3 months ago

anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} 2024-06-04 11:06:18.613 | ERROR | sweepai.core.chat:chat_anthropic:478 - Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} Traceback (most recent call last):

File "/Users/hellno/.pyenv/versions/3.10.13/bin/sweep", line 8, in sys.exit(main()) │ │ └ <function main at 0x15c6a44c0> │ └ └ <module 'sys' (built-in)> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/cli.py", line 363, in main app() └ <typer.main.Typer object at 0x100ccc700> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/typer/main.py", line 311, in call return get_command(self)(*args, kwargs) │ │ │ └ {} │ │ └ () │ └ <typer.main.Typer object at 0x100ccc700> └ <function get_command at 0x1026c25f0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) │ │ │ └ {} │ │ └ () │ └ <function TyperGroup.main at 0x1026c0f70> └ File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/typer/core.py", line 783, in main return _main( └ <function _main at 0x1026c0280> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/typer/core.py", line 225, in _main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x15c66bc70> │ └ <function MultiCommand.invoke at 0x1016770a0> └ File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ │ │ └ <click.core.Context object at 0x15c6c1270> │ │ │ └ <function Command.invoke at 0x101676b90> │ │ └ │ └ <click.core.Context object at 0x15c6c1270> └ <function MultiCommand.invoke.._process_result at 0x15c6a67a0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) │ │ │ │ │ └ {'issue_url': 'https://github.com/hero-org/herocast/issues/301'} │ │ │ │ └ <click.core.Context object at 0x15c6c1270> │ │ │ └ <function run at 0x15c6a6710> │ │ └ │ └ <function Context.invoke at 0x101675900> └ <click.core.Context object at 0x15c6c1270> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(args, kwargs) │ └ {'issue_url': 'https://github.com/hero-org/herocast/issues/301'} └ () File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/typer/main.py", line 685, in wrapper return callback(*use_params) # type: ignore │ └ {'issue_url': 'https://github.com/hero-org/herocast/issues/301'} └ <function run at 0x15c6a4310> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/cli.py", line 338, in run on_ticket( └ <function on_ticket at 0x137797910> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/handlers/on_ticket.py", line 1127, in on_ticket for item in generator: └ <generator object create_pr_changes at 0x15fdbef10> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/handlers/create_pr.py", line 102, in create_pr_changes for ( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/sweep_bot.py", line 746, in change_files_in_github_iterator ) = self.handle_modify_file_main( │ └ <function SweepBot.handle_modify_file_main at 0x12787f7f0> └ SweepBot(repo=Repository(full_name="hero-org/herocast"), messages=[Message(role='system', content="You are a brilliant and me... File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/sweep_bot.py", line 791, in handle_modify_file_main ) = self.modify_file( │ └ <function SweepBot.modify_file at 0x12787f6d0> └ SweepBot(repo=Repository(full_name="hero-org/herocast"), messages=[Message(role='system', content="You are a brilliant and me... File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/sweep_bot.py", line 716, in modify_file new_files = modify_file( └ <function file_cache..decorator..wrapper at 0x12787dd80> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(args, **kwargs) │ │ └ {'additional_messages': [Message(role='user', content='# Repo & Issue Metadata\nRepo: herocast: herocast is Farcaster’s leadi... │ └ (ClonedRepo(repo_full_name='hero-org/herocast', installation_id=-1, branch='main', token='ghp_rNKHqqeBJdunnwP0WSvPNGQy11s0wc1... └ <function modify_file at 0x12787dcf0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify_file.py", line 72, in modify_file new_files = modify( └ <function modify at 0x127827370> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 485, in modify function_calls_string = chat_gpt.chat_anthropic( │ └ <function ChatGPT.chat_anthropic at 0x120fca4d0> └ ChatGPT(messages=[Message(role='system', content="You are an expert software developer tasked with editing code to fulfill th...

File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) │ │ │ │ │ │ └ False │ │ │ │ │ └ 'claude-3-opus-20240229' │ │ │ │ └ ChatGPT(messages=[Message(role='system', content="You are an expert software developer tasked with editing code to fulfill th... │ │ │ └ [Message(role='system', content="You are an expert software developer tasked with editing code to fulfill the user's request.... │ │ └ ChatGPT(messages=[Message(role='system', content="You are an expert software developer tasked with editing code to fulfill th... │ └ [{'role': 'user', 'content': 'Here is the intial user request, plan, and state of the code files:\n\nIssue Titl... └ <function file_cache..decorator..wrapper at 0x15e13c1f0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) │ │ └ {'use_openai': False} │ └ ([{'role': 'user', 'content': 'Here is the intial user request, plan, and state of the code files:\n\nIssue Tit... └ <function ChatGPT.chat_anthropic..call_anthropic at 0x15e13c160> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( │ │ └ <function Messages.create at 0x112ab2560> │ └ <anthropic.resources.messages.Messages object at 0x15fd50e50> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(args, **kwargs) │ │ └ {'model': 'claude-3-opus-20240229', 'temperature': 0.1, 'max_tokens': 4096, 'messages': [{'role': 'user', 'content': 'Here is... │ └ (<anthropic.resources.messages.Messages object at 0x15fd50e50>,) └ <function Messages.create at 0x112ab24d0> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( │ └ <bound method SyncAPIClient.post of <anthropic.Anthropic object at 0x15fdcba00>> └ <anthropic.resources.messages.Messages object at 0x15fd50e50> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) │ │ │ │ │ │ │ └ anthropic.Stream[typing.Union[anthropic.types.message_start_event.MessageStartEvent, anthropic.types.message_delta_event.Mess... │ │ │ │ │ │ └ False │ │ │ │ │ └ FinalRequestOptions(method='post', url='/v1/messages', params={}, headers=NOT_GIVEN, max_retries=NOT_GIVEN, timeout=600, file... │ │ │ │ └ <class 'anthropic.types.message.Message'> │ │ │ └ <function SyncAPIClient.request at 0x112a932e0> │ │ └ <anthropic.Anthropic object at 0x15fdcba00> │ └ ~ResponseT └ <function cast at 0x10125c670> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( │ └ <function SyncAPIClient._retry_request at 0x112a93400> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( │ └ <function SyncAPIClient._retry_request at 0x112a93400> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( │ └ <function SyncAPIClient._request at 0x112a93370> └ <anthropic.Anthropic object at 0x15fdcba00> File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None │ └ <function BaseClient._make_status_error_from_response at 0x112a91630> └ <anthropic.Anthropic object at 0x15fdcba00>

anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}} 2024-06-04 11:06:50.640 | ERROR | sweepai.agents.modify:modify:493 - Error in chat_anthropic: Anthropic call failed 2024-06-04 11:06:50.641 | ERROR | sweepai.agents.modify_file:modify_file:80 - Error: 'NoneType' object has no attribute 'add_chat' 2024-06-04 11:06:50.644 | ERROR | sweepai.agents.modify_file:modify_file:81 - Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(args, **kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 485, in modify function_calls_string = chat_gpt.chat_anthropic( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 482, in chat_anthropic raise Exception("Anthropic call failed") from e Exception: Anthropic call failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify_file.py", line 72, in modify_file new_files = modify( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 494, in modify chat_logger.add_chat( AttributeError: 'NoneType' object has no attribute 'add_chat'

2024-06-04 11:06:50.645 | ERROR | sweepai.core.sweep_bot:handle_modify_file_main:799 - 'NoneType' object has no attribute 'add_chat' 2024-06-04 11:06:50.648 | INFO | sweepai.core.sweep_bot:handle_modify_file_main:833 - Error in handle_modify_file: Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 472, in chat_anthropic content = call_anthropic(message_dicts, self.messages[0].content, self.model, use_openai=use_openai) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/logn/cache.py", line 109, in wrapper result = func(*args, *kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 447, in call_anthropic response = client.messages.create( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper return func(args, **kwargs) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/resources/messages.py", line 678, in create return self._post( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1208, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 897, in request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 973, in _request return self._retry_request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 1021, in _retry_request return self._request( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/anthropic/_base_client.py", line 988, in _request raise self._make_status_error_from_response(err.response) from None anthropic.InternalServerError: Error code: 529 - {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/agents/modify.py", line 485, in modify function_calls_string = chat_gpt.chat_anthropic( File "/Users/hellno/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sweepai/core/chat.py", line 482, in chat_anthropic raise Exception("Anthropic call failed") from e Exception: Anthropic call failed

habibregask86 commented 1 month ago

Having the same error in production, exactly the same