mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +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
|
// Wait for all provider requests to complete
|
||||||
const providerResults = await Promise.all(providerPromises);
|
const providerResults = await Promise.all(providerPromises);
|
||||||
|
|
||||||
// Flatten all models into a single array
|
// Flatten all models into a single array, excluding free models
|
||||||
const allModels = providerResults.flat();
|
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
|
// Set error state if there were any errors
|
||||||
if (errors.length > 0) {
|
if (errors.length > 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user