From a175af8354a2d986c097eee31c6ab2c3aff98e0f Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 19 Apr 2026 21:09:56 -0700 Subject: [PATCH] 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. --- src/hooks/useProviderModels.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hooks/useProviderModels.ts b/src/hooks/useProviderModels.ts index de1d2e8c..aa12bac9 100644 --- a/src/hooks/useProviderModels.ts +++ b/src/hooks/useProviderModels.ts @@ -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) {