-
Notifications
You must be signed in to change notification settings - Fork 4k
fix: HOTFIX openai provider empty Bearer when no apiKey configured #7803
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
Conversation
Should fix issue continuedev#7047 This enables using OpenAI-compatible APIs using other authentication methods than Bearer. I'm personally using basic auth with vLLM by configuring 'Authorization: Basic ...' in config.yaml which is thwarted by the openai provider adding an empty "Authorization: Bearer" even when no `apiKey is configured` which interferes with my custom Authorization header.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Patrick-Erichsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix here!
|
🎉 This PR is included in version 1.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.17.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Should fix issue #7047
TL;DR: In openai provider, do not include an empty
Authorization: Bearerheader ifapiKeyhas not been configured.This enables using OpenAI-compatible APIs using other authentication methods than Bearer. I'm personally using basic auth with vLLM by configuring
Authorization: Basic ...in config.yaml which is thwarted by the openai provider adding an emptyAuthorization: Bearereven when noapiKeyis configured which interferes with my custom Authorization header.AI Code Review
@continue-general-reviewor@continue-detailed-reviewChecklist
Screen recording or screenshot
This is what HTTP headers used to look like for me before this fix:
Tests
None
Summary by cubic
Stop sending an empty Authorization: Bearer header in the OpenAI provider when no apiKey is configured. This lets OpenAI-compatible endpoints use other auth methods (e.g., Basic auth) without their custom Authorization header being overwritten.