Skip to content

Commit

Permalink
fix auth issue with vLLM
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelu2016 committed Apr 9, 2024
1 parent 524a2e8 commit 65b1653
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

## 1.15.2 - 2024-04-09
### Fixed
- Fixed an issue with `apikey` being required for making vLLM requests

## 1.15.1 - 2024-04-07
### Added
- Added support for `apikey` in vLLM integration
Expand Down
6 changes: 4 additions & 2 deletions internal/authenticator/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ func rewriteHttpAuthHeader(req *http.Request, setting *provider.Setting) error {

apiKey := setting.GetParam("apikey")

if strings.HasPrefix(uri, "/api/providers/vllm") && len(apiKey) != 0 {
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
if strings.HasPrefix(uri, "/api/providers/vllm") {
if len(apiKey) != 0 {
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
}
return nil
}

Expand Down

0 comments on commit 65b1653

Please sign in to comment.