惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
博客园 - Franky
罗磊的独立博客
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
V
V2EX
F
Fortinet All Blogs
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
U
Unit 42
GbyAI
GbyAI
A
About on SuperTechFans
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
D
DataBreaches.Net
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(web-fetch): resolve external providers · openclaw/ope...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -4,7 +4,10 @@ import type {

44

PluginWebFetchProviderEntry,

55

WebFetchProviderToolDefinition,

66

} from "../plugins/types.js";

7-

import { resolvePluginWebFetchProviders } from "../plugins/web-fetch-providers.runtime.js";

7+

import {

8+

resolvePluginWebFetchProviders,

9+

resolveRuntimeWebFetchProviders,

10+

} from "../plugins/web-fetch-providers.runtime.js";

811

import { sortWebFetchProvidersForAutoDetect } from "../plugins/web-fetch-providers.shared.js";

912

import { getActiveRuntimeWebToolsMetadata } from "../secrets/runtime-web-tools-state.js";

1013

import type { RuntimeWebFetchMetadata } from "../secrets/runtime-web-tools.types.js";

@@ -81,7 +84,6 @@ export function listWebFetchProviders(params?: {

8184

return resolvePluginWebFetchProviders({

8285

config: params?.config,

8386

bundledAllowlistCompat: true,

84-

origin: "bundled",

8587

});

8688

}

8789

@@ -104,7 +106,6 @@ export function resolveWebFetchProviderId(params: {

104106

resolvePluginWebFetchProviders({

105107

config: params.config,

106108

bundledAllowlistCompat: true,

107-

origin: "bundled",

108109

}),

109110

);

110111

const raw =

@@ -138,6 +139,20 @@ export function resolveWebFetchProviderId(params: {

138139

return "";

139140

}

140141142+

function resolveConfiguredWebFetchProviderId(params: {

143+

fetch?: WebFetchConfig;

144+

providers: PluginWebFetchProviderEntry[];

145+

}): string | undefined {

146+

const raw =

147+

params.fetch && "provider" in params.fetch

148+

? normalizeLowercaseStringOrEmpty(params.fetch.provider)

149+

: "";

150+

if (!raw) {

151+

return undefined;

152+

}

153+

return params.providers.find((provider) => provider.id === raw)?.id;

154+

}

155+141156

export function resolveWebFetchDefinition(

142157

options?: ResolveWebFetchDefinitionParams,

143158

): { provider: PluginWebFetchProviderEntry; definition: WebFetchProviderToolDefinition } | null {

@@ -146,18 +161,33 @@ export function resolveWebFetchDefinition(

146161

| undefined;

147162

const runtimeWebFetch = options?.runtimeWebFetch ?? getActiveRuntimeWebToolsMetadata()?.fetch;

148163

const providers = sortWebFetchProvidersForAutoDetect(

149-

resolvePluginWebFetchProviders({

150-

config: options?.config,

151-

bundledAllowlistCompat: true,

152-

origin: "bundled",

153-

}),

164+

options?.sandboxed

165+

? resolvePluginWebFetchProviders({

166+

config: options?.config,

167+

bundledAllowlistCompat: true,

168+

origin: "bundled",

169+

})

170+

: options?.preferRuntimeProviders

171+

? resolveRuntimeWebFetchProviders({

172+

config: options?.config,

173+

bundledAllowlistCompat: true,

174+

})

175+

: resolvePluginWebFetchProviders({

176+

config: options?.config,

177+

bundledAllowlistCompat: true,

178+

}),

154179

);

155180

return resolveWebProviderDefinition({

156181

config: options?.config,

157182

toolConfig: fetch as Record<string, unknown> | undefined,

158183

runtimeMetadata: runtimeWebFetch,

159184

sandboxed: options?.sandboxed,

160-

providerId: options?.providerId,

185+

providerId:

186+

options?.providerId ??

187+

resolveConfiguredWebFetchProviderId({

188+

fetch,

189+

providers,

190+

}),

161191

providers,

162192

resolveEnabled: ({ toolConfig, sandboxed }) =>

163193

resolveWebFetchEnabled({