Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit the code to be able using the hermes-3-llama-3.1-405b free version from openrouter cause the error #100

Open
AnPassingTeen opened this issue Sep 4, 2024 · 0 comments

Comments

@AnPassingTeen
Copy link

I edit the code to be able using the hermes-3-llama-3.1-405b free version from openrouter but I have the following issue after Starting Experiments:
Unexpected error: litellm.AuthenticationError: AuthenticationError: OpenrouterException - Error code: 401 - {'error': {'message': 'Missing Authentication header or invalid API key', 'code': 401}}
Traceback (most recent call last):
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/llms/openai.py", line 1033, in completion
raise e
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/llms/openai.py", line 951, in completion
self.make_sync_openai_chat_completion_request(
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/llms/openai.py", line 816, in make_sync_openai_chat_completion_request
raise e
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/llms/openai.py", line 811, in make_sync_openai_chat_completion_request
response = openai_client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/openai/_utils/_utils.py", line 274, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/openai/resources/chat/completions.py", line 668, in create
return self._post(
^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/openai/_base_client.py", line 1260, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/openai/_base_client.py", line 937, in request
return self._request(
^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/openai/_base_client.py", line 1041, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Missing Authentication header or invalid API key', 'code': 401}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/main.py", line 1925, in completion
response = openai_chat_completions.completion(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/llms/openai.py", line 1039, in completion
raise OpenAIError(status_code=e.status_code, message=str(e))
litellm.llms.openai.OpenAIError: Error code: 401 - {'error': {'message': 'Missing Authentication header or invalid API key', 'code': 401}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/clin10/anaconda3/lib/python3.12/site-packages/aider/coders/base_coder.py", line 1105, in send_message
yield from self.send(messages, functions=self.functions)
File "/home/clin10/anaconda3/lib/python3.12/site-packages/aider/coders/base_coder.py", line 1377, in send
hash_object, completion = send_completion(
^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/aider/sendchat.py", line 86, in send_completion
res = litellm.completion(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/utils.py", line 1078, in wrapper
raise e
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/utils.py", line 966, in wrapper
result = original_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/main.py", line 2766, in completion
raise exception_type(
^^^^^^^^^^^^^^^
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/utils.py", line 8438, in exception_type
raise e
File "/home/clin10/anaconda3/lib/python3.12/site-packages/litellm/utils.py", line 8305, in exception_type
raise AuthenticationError(
litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenrouterException - Error code: 401 - {'error': {'message': 'Missing Authentication header or invalid API key', 'code': 401}}
I checked the api key is correct but just don't know why I'm getting the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant