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

Model "command-r+" returning 401 error: "You have to be logged in" #2334

Open
restartxx opened this issue Nov 6, 2024 · 7 comments
Open
Assignees
Labels
bug Something isn't working stale

Comments

@restartxx
Copy link

restartxx commented Nov 6, 2024

Bug description

I'm experiencing an issue with the model "command-r+" not working. When attempting to use this model through the g4f API (running "g4f api"), I receive the following error:

ERROR:root:Request failed with status code: 401, response: {"error":"You have to be logged in."}
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/g4f/api/__init__.py", line 177, in chat_completions
    response = self.client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/g4f/client/client.py", line 241, in create
    return next(response)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/g4f/client/client.py", line 119, in iter_append_model_and_provider
    for chunk in response:
  File "/usr/lib/python3.11/site-packages/g4f/client/client.py", line 79, in iter_response
    for chunk in response:
  File "/usr/lib/python3.11/site-packages/g4f/Provider/HuggingChat.py", line 83, in create_completion
    raise RuntimeError(f"Request failed with status code: {response.status_code}, response: {response.text}")
RuntimeError: Request failed with status code: 401, response: {"error":"You have to be logged in."}

The model "command-r+" was working perfectly until yesterday. I am using g4f with Docker.

Steps to Reproduce

  1. Run "g4f api" with the "command-r+" model.
  2. Observe the error message in the terminal output.

Environment

  • Python version: 3.11
  • Location: Not in a Cloudflare-flagged country
  • g4f version: [g4f v-0.3.3.3]

Additional context
No recent changes were made on my side. The model was working without issues until yesterday.

@restartxx restartxx added the bug Something isn't working label Nov 6, 2024
@Ragvard
Copy link

Ragvard commented Nov 6, 2024

All models from HuggingChat provider return this error

@restartxx
Copy link
Author

All models from HuggingChat provider return this error

Hmm... Well, I hope it can be fixed soon. Do you know if there is a workaround?

Copy link

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added stale and removed stale labels Nov 14, 2024
@restartxx
Copy link
Author

Solved!

@rodege
Copy link

rodege commented Nov 19, 2024

Solved!

this problem has appeared again :(

@restartxx restartxx reopened this Nov 19, 2024
@restartxx
Copy link
Author

Solved!

this problem has appeared again :(

Yep... I just saw it here. Sad. And here we go again. 🛴

Copy link

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

5 participants
@Ragvard @rodege @restartxx @xtekky and others