Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/gp/dispatcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ D.prepare_payload = function(messages, model, provider)
top_p = math.max(0, math.min(1, model.top_p or 1)),
}

if provider == "openai" and model.model:sub(1, 1) == "o" then
if (provider == "openai" or provider == "copilot") and model.model:sub(1, 1) == "o" then
if model.model:sub(1, 2) == "o3" then
output.reasoning_effort = model.reasoning_effort or "medium"
end
Expand Down Expand Up @@ -303,7 +303,7 @@ local query = function(buf, provider, payload, handler, on_exit, callback)
end
local raw_response = qt.raw_response
local content = qt.response
if qt.provider == 'openai' and content == "" and raw_response:match('choices') and raw_response:match("content") then
if (qt.provider == 'openai' or qt.provider == 'copilot') and content == "" and raw_response:match('choices') and raw_response:match("content") then
local response = vim.json.decode(raw_response)
if response.choices and response.choices[1] and response.choices[1].message and response.choices[1].message.content then
content = response.choices[1].message.content
Expand Down