Skip to content

Commit 32bd421

Browse files
committed
chore: change the order of authentication provider
1 parent b4d54d0 commit 32bd421

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/gp/dispatcher.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,6 @@ local query = function(buf, provider, payload, handler, on_exit, callback)
476476
"api-key: " .. bearer,
477477
}
478478
endpoint = render.template_replace(endpoint, "{{model}}", payload.model)
479-
elseif provider == "ollama" then
480-
headers = {}
481479
elseif provider == "xai" then
482480
-- currently xai only uses bearer token for authentication.
483481
-- since I cannot sure its going to be that way for long time
@@ -486,6 +484,8 @@ local query = function(buf, provider, payload, handler, on_exit, callback)
486484
"-H",
487485
"Authorization: Bearer " .. bearer,
488486
}
487+
elseif provider == "ollama" then
488+
headers = {}
489489
else -- default to openai compatible headers
490490
headers = {
491491
"-H",

0 commit comments

Comments
 (0)