mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-03 07:57:22 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a175af8354 |
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user