fix: add OpenRouter embedding provider support

This commit is contained in:
Dounx
2026-03-19 23:03:34 +08:00
committed by lyingbug
parent cf9b935144
commit a9c2d61695
3 changed files with 23 additions and 3 deletions
+16
View File
@@ -169,4 +169,20 @@ func TestListByModelType(t *testing.T) {
}
assert.True(t, found, "Aliyun should support rerank")
})
t.Run("embedding models include openrouter", func(t *testing.T) {
providers := ListByModelType(types.ModelTypeEmbedding)
assert.NotEmpty(t, providers)
found := false
for _, p := range providers {
if p.Name == ProviderOpenRouter {
found = true
assert.Equal(t, OpenRouterBaseURL, p.GetDefaultURL(types.ModelTypeEmbedding))
break
}
}
assert.True(t, found, "OpenRouter should support embedding")
})
}