Compare commits

...
Author SHA1 Message Date
lemon a175af8354 Hide free models from model selection
Filter out models with $0 pricing on both prompt and completion
so they don't appear in the model picker. The server still returns
them for other clients that may want to use them.
2026-04-27 09:34:25 -07:00
+5 -2
View File
@@ -130,8 +130,11 @@ export function useProviderModels(): ModelFetchResult {
// Wait for all provider requests to complete
const providerResults = await Promise.all(providerPromises);
// Flatten all models into a single array
const allModels = providerResults.flat();
// Flatten all models into a single array, excluding free models
const allModels = providerResults.flat().filter((m) => {
if (m.pricing && m.pricing.prompt.isZero() && m.pricing.completion.isZero()) return false;
return true;
});
// Set error state if there were any errors
if (errors.length > 0) {