@ -137,13 +137,6 @@ function buildHeaders(apiKey: string | null): HeadersInit {
return headers ;
return headers ;
}
}
/ * *
* Build category filter query string for relevant categories
* /
function buildCategoryFilter ( ) : string {
return RELEVANT_CATEGORIES . map ( ( cat ) = > ` category= ${ encodeURIComponent ( cat ) } ` ) . join ( "&" ) ;
}
/ * *
/ * *
* fal . ai provider implementation
* fal . ai provider implementation
* /
* /
@ -155,8 +148,9 @@ const falProvider: ProviderInterface = {
const apiKey = getApiKeyFromStorage ( ) ;
const apiKey = getApiKeyFromStorage ( ) ;
try {
try {
// Fetch models with category filter for relevant types
// Fetch all active models, filter client-side
const url = ` ${ FAL_API_BASE } /models? ${ buildCategoryFilter ( ) } &status=active ` ;
// Note: fal.ai API only accepts single category param, so we fetch all and filter
const url = ` ${ FAL_API_BASE } /models?status=active ` ;
const response = await fetch ( url , {
const response = await fetch ( url , {
headers : buildHeaders ( apiKey ) ,
headers : buildHeaders ( apiKey ) ,
} ) ;
} ) ;
@ -179,8 +173,9 @@ const falProvider: ProviderInterface = {
const apiKey = getApiKeyFromStorage ( ) ;
const apiKey = getApiKeyFromStorage ( ) ;
try {
try {
// Search with query and category filter
// Search with query, filter client-side
const url = ` ${ FAL_API_BASE } /models?q= ${ encodeURIComponent ( query ) } & ${ buildCategoryFilter ( ) } &status=active ` ;
// Note: fal.ai API only accepts single category param, so we fetch all and filter
const url = ` ${ FAL_API_BASE } /models?q= ${ encodeURIComponent ( query ) } &status=active ` ;
const response = await fetch ( url , {
const response = await fetch ( url , {
headers : buildHeaders ( apiKey ) ,
headers : buildHeaders ( apiKey ) ,
} ) ;
} ) ;