Skip to content

Commit a8f9971

Browse files
authored
Merge pull request #49 from BalanceBalls/choco-fixes
Add gpt-5 support
2 parents ff5aa8c + 3f8c464 commit a8f9971

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.goreleaser-windows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ chocolateys:
3737
license_url: "https://github.com/BalanceBalls/nekot/blob/main/LICENSE"
3838
bug_tracker_url: "https://github.com/BalanceBalls/nekot/issues"
3939
release_notes: "https://github.com/BalanceBalls/nekot/releases/tag/{{ .Tag }}"
40-
icon_url: "https://raw.githubusercontent.com/BalanceBalls/nekot/main/docs/images/icon.png"
40+
icon_url: "https://cdn.statically.io/gh/BalanceBalls/nekot/main/docs/images/icon.png"
4141
summary: "A powerful and intuitive terminal utility for interaction with both local and cloud LLMs"
42-
package_source_url: "https://github.com/BalanceBalls/nekot/releases/tag/{{ .Tag }}"
42+
package_source_url: "https://github.com/BalanceBalls/nekot"
4343
copyright: "Copyright 2025 Aleksandr Shevchuk"

docs/images/icon.png

2.65 KB
Loading

util/providers.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func GetFilteredModelList(providerType string, apiUrl string, models []string) [
5555
switch providerType {
5656
case OpenAiProviderType:
5757
modelNames = filterOpenAiApiModels(apiUrl, models)
58-
break
5958
case GeminiProviderType:
6059
for _, model := range models {
6160
if isGeminiChatModel(model) {
@@ -120,6 +119,14 @@ func TransformRequestHeaders(provider ApiProvider, params map[string]any) map[st
120119
delete(params, "max_tokens")
121120
delete(params, "frequency_penalty")
122121
}
122+
123+
if isOpenAiGpt5Model(params["model"].(string)) {
124+
delete(params, "max_tokens")
125+
delete(params, "frequency_penalty")
126+
delete(params, "temperature")
127+
delete(params, "top_p")
128+
}
129+
123130
return params
124131
case Mistral:
125132
return params
@@ -205,3 +212,10 @@ func isOpenAiReasoningModel(model string) bool {
205212
}
206213
return false
207214
}
215+
216+
func isOpenAiGpt5Model(model string) bool {
217+
if strings.HasPrefix(model, "gpt-5") {
218+
return true
219+
}
220+
return false
221+
}

0 commit comments

Comments
 (0)