fix: 修复第三方 Anthropic base URL 应使用 ExaSearchAdapter 而非 BingSearchAdapter

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-23 21:52:16 +08:00
parent b3fce1edb7
commit 10b5f35140

View File

@@ -43,9 +43,11 @@ export function createAdapter(): WebSearchAdapter {
const adapterKey =
envAdapter === 'api' || envAdapter === 'bing' || envAdapter === 'brave' || envAdapter === 'exa'
? envAdapter
: isFirstPartyAnthropicBaseUrl()
? 'api'
: 'exa'
: isThirdPartyProvider()
? 'bing'
: isFirstPartyAnthropicBaseUrl()
? 'api'
: 'exa'
if (cachedAdapter && cachedAdapterKey === adapterKey) return cachedAdapter