-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Tavily plugin throws UnresolvedSecretInputError before falling back to process.env #95109
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
tavily_searchandtavily_extractfail at runtime withunresolved SecretRef "env:default:TAVILY_API_KEY"even whenTAVILY_API_KEYis set in the gateway process environment.The configured SecretRef points at an env-backed credential that the active runtime snapshot can't inline-resolve, but the plugin's
resolveTavilyApiKeyalready has aprocess.env.TAVILY_API_KEYfallback. The throw fromnormalizeConfiguredSecret(strict mode) fires before that fallback is reached.Reproduction
Expected: tavily provider receives the key (or returns an auth error if the key is invalid).
Actual: SecretRef-resolution error; provider never reached.
The same call works fine when the configured
apiKeyis a plain string (no SecretRef). It also works for thebraveandfirecrawlweb-search providers, which use the companionreadConfiguredSecretStringhelper that catches the same strict-mode throw.Root cause
extensions/tavily/src/config.ts—normalizeConfiguredSecretcallsnormalizeResolvedSecretInputStringwith the defaultmode: "strict", which throwsUnresolvedSecretInputErrorwhen the snapshot cannot inline-resolve. The throw escapes the helper before the|| normalizeSecretInput(process.env.TAVILY_API_KEY)fallback inresolveTavilyApiKeycan rescue the key.The companion
readConfiguredSecretStringinextensions/web-search-provider-common/src/web-search-provider-common.ts(used bybrave,firecrawl,exa) wraps the same call in a function-local error path that returnsundefined. That mismatch is why other web-search plugins work and tavily does not.Related
infer web searchpath; this issue covers the runtime plugin path that Fix infer SecretRef resolution for provider-backed commands #82798 left open.d6b3950734— addressed the tavily web-search contract registration but not this SecretRef strict-mode throw.Environment
v2026.6.8(build 2026-06-16)extensions/tavily(added in PR feat: add Tavily as a bundled web search plugin with search and extract tools #49200)mainon 2026-06-19: bug still present inextensions/tavily/src/config.ts(last touched 2026-05-10).Local reproduction
Local patch and SHA-baselined application in kzzalews/mikrus-gitops (
prestart.shstep 7/7, commitab70875) and documented in kzzalews/openclaw (commite520657).