summaryrefslogtreecommitdiff
path: root/models/openrouter.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-02 14:29:31 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-02 14:29:31 +0300
commite3be45b023686e9f03b70481ac26054a720d38f3 (patch)
tree7a309634321619b94973eeefffe175c6600e3145 /models/openrouter.go
parentfcb4b99332b78abb9517378e83379c2e5faed2ab (diff)
Fix: openrouter model list
Diffstat (limited to 'models/openrouter.go')
-rw-r--r--models/openrouter.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/models/openrouter.go b/models/openrouter.go
index 50f26b6..29ba0d8 100644
--- a/models/openrouter.go
+++ b/models/openrouter.go
@@ -145,9 +145,11 @@ func (orm *ORModels) ListModels(free bool) []string {
resp := []string{}
for _, model := range orm.Data {
if free {
- if model.Pricing.Prompt == "0" && model.Pricing.Request == "0" &&
- model.Pricing.Completion == "0" {
- resp = append(resp, model.ID)
+ if model.Pricing.Prompt == "0" && model.Pricing.Completion == "0" {
+ // treat missing request as free
+ if model.Pricing.Request == "" || model.Pricing.Request == "0" {
+ resp = append(resp, model.ID)
+ }
}
} else {
resp = append(resp, model.ID)