diff --git a/apps/api/src/services/fetch/fetch.service.ts b/apps/api/src/services/fetch/fetch.service.ts index fd7ca18ad..85f198a82 100644 --- a/apps/api/src/services/fetch/fetch.service.ts +++ b/apps/api/src/services/fetch/fetch.service.ts @@ -102,13 +102,10 @@ export class FetchService { private async fetchViaWebFetchTool( url: string ): Promise { - const openRouterApiKey = await this.propertyService.getByKey( - PROPERTY_API_KEY_OPENROUTER - ); - - const openRouterModel = await this.propertyService.getByKey( - PROPERTY_OPENROUTER_MODEL - ); + const [openRouterApiKey, openRouterModel] = await Promise.all([ + this.propertyService.getByKey(PROPERTY_API_KEY_OPENROUTER), + this.propertyService.getByKey(PROPERTY_OPENROUTER_MODEL) + ]); if (!openRouterApiKey || !openRouterModel) { return undefined;