fix(web-search): preserve runtime auto-detect fallback

This commit is contained in:
Joey Krug
2026-05-04 00:00:01 -04:00
committed by Peter Steinberger
parent c76d8f5a7c
commit ab24e93573
3 changed files with 7 additions and 6 deletions

View File

@@ -75,6 +75,7 @@ Docs: https://docs.openclaw.ai
- Agents/session status: keep semantic `session_status({ sessionKey: "current" })` on the live run session even before that run has a persisted session-store entry, instead of falling back to the sandbox policy key. Thanks @vincentkoc.
- QA/Slack: resolve bundled official plugin public-surface package aliases during source-mode QA runs, so release Slack live validation can load `@openclaw/slack/api.js` without workspace symlinks. Thanks @vincentkoc.
- Codex: pass the live run session key into app-server dynamic tools when sandbox policy uses a separate session key, so `session_status({ sessionKey: "current" })` reports the active run instead of the sandbox policy key. Thanks @vincentkoc.
- Web search: keep first-class assistant `web_search` auto-detect and configured runtime providers visible when active runtime metadata or the active plugin registry is incomplete. Fixes #77073.
- Plugins/tools: mark manifest-optional sibling tools as optional even when they come from a shared non-optional factory, so cached/status/MCP metadata keeps opt-in tool policy accurate. Thanks @vincentkoc.
- Matrix: keep `streaming.progress.toolProgress` scoped to progress draft mode, so partial and quiet Matrix previews do not lose tool progress unless `streaming.preview.toolProgress` is disabled. Thanks @vincentkoc.
- Channels/streaming: keep `streaming.progress.toolProgress` scoped to progress draft mode, so disabling compact progress lines does not silence partial/block preview tool updates. Thanks @vincentkoc.

View File

@@ -47,7 +47,7 @@ describe("web_search late-bound runtime fallback", () => {
runtimeWebSearch: {
selectedProvider: "brave",
providerConfigured: "brave",
providerSource: "plugin",
providerSource: "configured",
diagnostics: [],
},
});
@@ -100,7 +100,7 @@ describe("web_search late-bound runtime fallback", () => {
);
});
it("does not prefer runtime providers when no provider id is selected anywhere", async () => {
it("keeps runtime provider discovery enabled when no provider id is selected anywhere", async () => {
const { createWebSearchTool } = await import("./web-search.js");
const tool = createWebSearchTool({
config: {},
@@ -111,7 +111,7 @@ describe("web_search late-bound runtime fallback", () => {
expect(mocks.resolveManifestContractOwnerPluginId).not.toHaveBeenCalled();
expect(mocks.runWebSearch).toHaveBeenCalledWith(
expect.objectContaining({ preferRuntimeProviders: false }),
expect.objectContaining({ preferRuntimeProviders: true }),
);
});
@@ -138,7 +138,7 @@ describe("web_search late-bound runtime fallback", () => {
search: {
selectedProvider: "perplexity",
providerConfigured: "perplexity",
providerSource: "plugin",
providerSource: "configured",
diagnostics: [],
},
});
@@ -149,7 +149,7 @@ describe("web_search late-bound runtime fallback", () => {
runtimeWebSearch: {
selectedProvider: "brave",
providerConfigured: "brave",
providerSource: "plugin",
providerSource: "configured",
diagnostics: [],
},
});

View File

@@ -107,7 +107,7 @@ export function createWebSearchTool(options?: {
: "";
const providerSelectionId = runtimeProviderId || configuredProviderId;
const preferRuntimeProviders =
Boolean(providerSelectionId) &&
!providerSelectionId ||
!resolveManifestContractOwnerPluginId({
contract: "webSearchProviders",
value: providerSelectionId,