Skip to content

Commit 1fa5216

Browse files
Robitxrebel1324
andauthored
feat: gpt5 params (#275)
* Update dispatcher.lua Somehow GPT-5 does not supports temperature and max token parameter in api * gpt-5 * Update dispatcher.lua --------- Co-authored-by: Kyu Yeon Lee <rebel1324@gmail.com>
1 parent 8370fad commit 1fa5216

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/gp/dispatcher.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@ D.prepare_payload = function(messages, model, provider)
190190
output.top_p = nil
191191
end
192192

193+
if model.model == "gpt-5" or model.model == "gpt-5-mini" then
194+
-- remove max_tokens, top_p, temperature for gpt-5 models (duh)
195+
output.max_tokens = nil
196+
output.temperature = nil
197+
output.top_p = nil
198+
end
199+
193200
return output
194201
end
195202

0 commit comments

Comments
 (0)