fix(web-search): split runtime provider resolution

This commit is contained in:
Vincent Koc
2026-03-20 00:01:31 -07:00
parent 397b0d85f5
commit e56dde815e
12 changed files with 394 additions and 320 deletions

View File

@@ -5,10 +5,8 @@ import type {
PluginWebSearchProviderEntry,
WebSearchProviderToolDefinition,
} from "../plugins/types.js";
import {
resolvePluginWebSearchProviders,
resolveRuntimeWebSearchProviders,
} from "../plugins/web-search-providers.js";
import { resolveBundledPluginWebSearchProviders } from "../plugins/web-search-providers.js";
import { resolveRuntimeWebSearchProviders } from "../plugins/web-search-providers.runtime.js";
import type { RuntimeWebSearchMetadata } from "../secrets/runtime-web-tools.types.js";
import { normalizeSecretInput } from "../utils/normalize-secret-input.js";
@@ -97,7 +95,7 @@ export function resolveWebSearchProviderId(params: {
}): string {
const providers =
params.providers ??
resolvePluginWebSearchProviders({
resolveBundledPluginWebSearchProviders({
config: params.config,
bundledAllowlistCompat: true,
});
@@ -142,7 +140,7 @@ export function resolveWebSearchDefinition(
config: options?.config,
bundledAllowlistCompat: true,
})
: resolvePluginWebSearchProviders({
: resolveBundledPluginWebSearchProviders({
config: options?.config,
bundledAllowlistCompat: true,
})