Skip to content

httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://api.anthropic.com/v1/messages' #32

@Mafumaful

Description

@Mafumaful

I think it's due to the network problem, but I want to figure out how to solve it. My device is a MacBook (ARM architecture).

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Retrying... (attempt 1)

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Retrying... (attempt 2)

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Retrying... (attempt 3)

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Traceback (most recent call last):
  File "/opt/anaconda3/envs/auto_deep_research/lib/python3.10/site-packages/litellm/llms/anthropic/chat/handler.py", line 420, in completion
    response = client.post(
  File "/opt/anaconda3/envs/auto_deep_research/lib/python3.10/site-packages/litellm/llms/custom_httpx/http_handler.py", line 471, in post
    raise e
  File "/opt/anaconda3/envs/auto_deep_research/lib/python3.10/site-packages/litellm/llms/custom_httpx/http_handler.py", line 451, in post
    response.raise_for_status()
  File "/opt/anaconda3/envs/auto_deep_research/lib/python3.10/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://api.anthropic.com/v1/messages'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions