(
apiKey: string | null,
)
| 187 | } |
| 188 | |
| 189 | async function fetchModelListData( |
| 190 | apiKey: string | null, |
| 191 | ): Promise<ModelListData> { |
| 192 | const [catalog, allowed] = await Promise.all([ |
| 193 | fetchCatalogModels(), |
| 194 | fetchAllowedModels(apiKey), |
| 195 | ]); |
| 196 | |
| 197 | return { |
| 198 | ...catalog, |
| 199 | allowed, |
| 200 | }; |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Custom hook to fetch and manage available models from the API |
no test coverage detected