From 6f4de3cc23c29d1db3d8e65814f048ce07e81460 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 8 Mar 2026 11:08:56 -0700 Subject: [PATCH] Web search: rename Perplexity auth source helper --- src/agents/tools/web-search.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/agents/tools/web-search.ts b/src/agents/tools/web-search.ts index b4ef4b83484..72ab3cc9156 100644 --- a/src/agents/tools/web-search.ts +++ b/src/agents/tools/web-search.ts @@ -667,8 +667,8 @@ function inferPerplexityBaseUrlFromApiKey(apiKey?: string): PerplexityBaseUrlHin function resolvePerplexityBaseUrl( perplexity?: PerplexityConfig, - apiKeySource: PerplexityApiKeySource = "none", - apiKey?: string, + authSource: PerplexityApiKeySource = "none", + configuredKey?: string, ): string { const fromConfig = perplexity && "baseUrl" in perplexity && typeof perplexity.baseUrl === "string" @@ -677,14 +677,14 @@ function resolvePerplexityBaseUrl( if (fromConfig) { return fromConfig; } - if (apiKeySource === "perplexity_env") { + if (authSource === "perplexity_env") { return PERPLEXITY_DIRECT_BASE_URL; } - if (apiKeySource === "openrouter_env") { + if (authSource === "openrouter_env") { return DEFAULT_PERPLEXITY_BASE_URL; } - if (apiKeySource === "config") { - const inferred = inferPerplexityBaseUrlFromApiKey(apiKey); + if (authSource === "config") { + const inferred = inferPerplexityBaseUrlFromApiKey(configuredKey); if (inferred === "openrouter") { return DEFAULT_PERPLEXITY_BASE_URL; }