




















@@ -301,11 +301,9 @@ async function resolveSecretInputWithEnvFallback(params: {
301301function setResolvedWebSearchApiKey(params: {
302302resolvedConfig: OpenClawConfig;
303303provider: PluginWebSearchProviderEntry;
304-path: string;
305304value: string;
306305}): void {
307-const useLegacySearchConfig = params.path === "tools.web.search.apiKey";
308-if (params.provider.setConfiguredCredentialValue && !useLegacySearchConfig) {
306+if (params.provider.setConfiguredCredentialValue) {
309307params.provider.setConfiguredCredentialValue(params.resolvedConfig, params.value);
310308return;
311309}
@@ -416,8 +414,7 @@ function readConfiguredProviderCredential(params: {
416414config: OpenClawConfig;
417415search: Record<string, unknown> | undefined;
418416}): unknown {
419-const configuredValue = params.provider.getConfiguredCredentialValue?.(params.config);
420-return configuredValue ?? params.provider.getCredentialValue(params.search);
417+return params.provider.getConfiguredCredentialValue?.(params.config);
421418}
422419423420function inactivePathsForProvider(provider: PluginWebSearchProviderEntry): string[] {
@@ -432,7 +429,6 @@ function inactivePathsForProvider(provider: PluginWebSearchProviderEntry): strin
432429function setResolvedWebFetchApiKey(params: {
433430resolvedConfig: OpenClawConfig;
434431provider: PluginWebFetchProviderEntry;
435-path: string;
436432value: string;
437433}): void {
438434const tools = ensureObject(params.resolvedConfig as Record<string, unknown>, "tools");
@@ -561,25 +557,6 @@ export async function resolveRuntimeWebTools(params: {
561557diagnostics: [],
562558};
563559if (search || hasPluginWebSearchConfig) {
564-let searchCompatibilityOnlyPluginIds: string[] = [];
565-if (
566-!rawProvider &&
567-!hasPluginWebSearchConfig &&
568-isRecord(search) &&
569-Object.prototype.hasOwnProperty.call(search, "apiKey")
570-) {
571-const { resolveManifestContractPluginIdsByCompatibilityRuntimePath } =
572-await loadRuntimeWebToolsManifest();
573-searchCompatibilityOnlyPluginIds = resolveManifestContractPluginIdsByCompatibilityRuntimePath(
574-{
575-contract: "webSearchProviders",
576-path: "tools.web.search.apiKey",
577-origin: "bundled",
578-config: params.sourceConfig,
579- env,
580-},
581-);
582-}
583560const searchSurface = await resolveRuntimeWebProviderSurface({
584561contract: "webSearchProviders",
585562 rawProvider,
@@ -596,12 +573,6 @@ export async function resolveRuntimeWebTools(params: {
596573sourceConfig: params.sourceConfig,
597574context: params.context,
598575 configuredBundledPluginId,
599-onlyPluginIds:
600-configuredBundledPluginId === undefined &&
601-searchCompatibilityOnlyPluginIds.length > 0 &&
602-!(await getHasCustomWebSearchRisk())
603- ? searchCompatibilityOnlyPluginIds
604- : undefined,
605576hasCustomWebSearchPluginRisk: await getHasCustomWebSearchRisk(),
606577}),
607578sortProviders: sortWebSearchProvidersForAutoDetect,
@@ -647,16 +618,10 @@ export async function resolveRuntimeWebTools(params: {
647618 path,
648619 envVars,
649620}),
650-setResolvedCredential: ({ resolvedConfig, provider, path, value }) =>
621+setResolvedCredential: ({ resolvedConfig, provider, value }) =>
651622setResolvedWebSearchApiKey({
652623 resolvedConfig,
653624 provider,
654-path:
655-search &&
656-Object.prototype.hasOwnProperty.call(search, "apiKey") &&
657-provider.getConfiguredCredentialValue?.(params.sourceConfig) == null
658- ? "tools.web.search.apiKey"
659- : path,
660625 value,
661626}),
662627 inactivePathsForProvider,
@@ -747,11 +712,10 @@ export async function resolveRuntimeWebTools(params: {
747712 envVars,
748713restrictEnvRefsToEnvVars: true,
749714}),
750-setResolvedCredential: ({ resolvedConfig, provider, path, value }) =>
715+setResolvedCredential: ({ resolvedConfig, provider, value }) =>
751716setResolvedWebFetchApiKey({
752717 resolvedConfig,
753718 provider,
754- path,
755719 value,
756720}),
757721inactivePathsForProvider: inactivePathsForFetchProvider,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。