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

FIX: api key header error #594

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

FIX: api key header error #594

wants to merge 4 commits into from

Conversation

devhaozi
Copy link

@devhaozi devhaozi commented Apr 27, 2024

According to the documentation of huggingface: By default the server responds to every request. With an api key set, the requests must have the Authorization header set with the api key as Bearer token., the use of API_KEY in the plugin is incorrect, and should use Bearer Token.

Source doc url: https://github.com/huggingface/text-embeddings-inference?tab=readme-ov-file#docker

@xfalcox
Copy link
Member

xfalcox commented Apr 30, 2024

Our implementation predates TEI support for API keys by a couple months, so we relied on a reverse proxy doing API Key header verification that uses this signature, meaning we can't simply merge this.

@devhaozi
Copy link
Author

Our implementation predates TEI support for API keys by a couple months, so we relied on a reverse proxy doing API Key header verification that uses this signature, meaning we can't simply merge this.

If so, what do you think about adding both the X-API-KEY and Authorization headers?

@devhaozi
Copy link
Author

@xfalcox fixed, PTAL.

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