diff --git a/src/providers/anthropic-provider.ts b/src/providers/anthropic-provider.ts index 8fadae3..64eb989 100644 --- a/src/providers/anthropic-provider.ts +++ b/src/providers/anthropic-provider.ts @@ -33,8 +33,8 @@ interface EligibilityCheckResult { /** * Get the Letta API base URL and auth token */ -function getLettaConfig(): { baseUrl: string; apiKey: string } { - const settings = settingsManager.getSettings(); +async function getLettaConfig(): Promise<{ baseUrl: string; apiKey: string }> { + const settings = await settingsManager.getSettingsWithSecureTokens(); const baseUrl = process.env.LETTA_BASE_URL || settings.env?.LETTA_BASE_URL || @@ -51,7 +51,7 @@ async function providersRequest( path: string, body?: Record, ): Promise { - const { baseUrl, apiKey } = getLettaConfig(); + const { baseUrl, apiKey } = await getLettaConfig(); const url = `${baseUrl}${path}`; const response = await fetch(url, {