Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
22.07k stars 2.06k forks source link

Uncaught NotFoundError in exception_mapping_utils.py line 845 #2287

Open marking opened 1 week ago

marking commented 1 week ago

I launched aider in architect mode using the following models:

I only chose the main model on the command line and set the Editor and Weak model in the configuration file.

I asked aider to combine and simplify 3 powershell scripts into a single powershell script. The architect suggested good changes and handed them off to the editor. When I confirmed that the editor should make the changes by creating the new file, I was presented with the exception.

Aider version: 0.62.1 Python version: 3.12.7 Platform: Windows-10-10.0.19045-SP0 Python implementation: CPython Virtual environment: No OS: Windows 10 (64bit) Git information unavailable

An uncaught exception occurred:

Traceback (most recent call last):
  File "main.py", line 2582, in completion
    response = bedrock_chat_completion.completion(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "invoke_handler.py", line 811, in completion
    raise BedrockError(
litellm.llms.bedrock.common_utils.BedrockError: Bedrock HTTPX: Unknown provider=us, model=us.anthropic.claude-3-5-haiku-20241022-v1:0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 827, in main
    coder.run()
  File "base_coder.py", line 738, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 781, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1263, in send_message
    self.reply_completed()
  File "architect_coder.py", line 40, in reply_completed
    editor_coder.run(with_message=content, preproc=False)
  File "base_coder.py", line 732, in run
    self.run_one(with_message, preproc)
  File "base_coder.py", line 781, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1278, in send_message
    saved_message = self.auto_commit(edited)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1979, in auto_commit
    res = self.repo.commit(fnames=edited, context=context, aider_edits=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 110, in commit
    commit_message = self.get_commit_message(diffs, context)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "repo.py", line 195, in get_commit_message
    commit_message = simple_send_with_retries(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sendchat.py", line 118, in simple_send_with_retries
    _hash, response = send_completion(**kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sendchat.py", line 98, in send_completion
    res = litellm.completion(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "utils.py", line 1013, in wrapper
    raise e
  File "utils.py", line 903, in wrapper
    result = original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "main.py", line 2999, in completion
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "exception_mapping_utils.py", line 2116, in exception_type
    raise e
  File "exception_mapping_utils.py", line 845, in exception_type
    raise NotFoundError(
litellm.exceptions.NotFoundError: litellm.NotFoundError: BedrockException - Bedrock HTTPX: Unknown provider=us, model=us.anthropic.claude-3-5-haiku-20241022-v1:0
paul-gauthier commented 4 days ago

Thanks for trying aider and filing this issue.

Sorry, it would be hard for me to debug your bedrock model configuration.

marking commented 3 days ago

I can try to reproduce this with additional logging enabled if additional logging is available.


From: paul-gauthier @.> Sent: Monday, November 11, 2024 11:05 To: Aider-AI/aider @.> Cc: Mark Ingalls @.>; Author @.> Subject: Re: [Aider-AI/aider] Uncaught NotFoundError in exception_mapping_utils.py line 845 (Issue #2287)

Thanks for trying aider and filing this issue.

Sorry, it would be hard for me to debug your bedrock model configuration.

— Reply to this email directly, view it on GitHubhttps://github.com/Aider-AI/aider/issues/2287#issuecomment-2468754226, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHUUH4FZLKYS22B2IJRZDL2ADWXDAVCNFSM6AAAAABRLRPK7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYG42TIMRSGY. You are receiving this because you authored the thread.Message ID: @.***>