refactor: trim web fetch facade · openclaw/openclaw@814bf66
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -34,8 +34,6 @@ import {
|
34 | 34 | writeCache, |
35 | 35 | } from "./web-shared.js"; |
36 | 36 | |
37 | | -export { extractReadableContent } from "../../web-fetch/content-extractors.runtime.js"; |
38 | | - |
39 | 37 | const EXTRACT_MODES = ["markdown", "text"] as const; |
40 | 38 | |
41 | 39 | const DEFAULT_FETCH_MAX_CHARS = 20_000; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,7 @@ import {
|
12 | 12 | } from "../../agents/model-auth.js"; |
13 | 13 | import { resolveProviderAuthAliasMap } from "../../agents/provider-auth-aliases.js"; |
14 | 14 | import { normalizeProviderIdForAuth } from "../../agents/provider-id.js"; |
| 15 | +import { resolveAgentModelPrimaryValue } from "../../config/model-input.js"; |
15 | 16 | import type { OpenClawConfig } from "../../config/types.openclaw.js"; |
16 | 17 | import { loadPluginRegistrySnapshotWithMetadata } from "../../plugins/plugin-registry.js"; |
17 | 18 | |
@@ -112,9 +113,9 @@ export function createModelListAuthIndex(
|
112 | 113 | addProvider(provider); |
113 | 114 | } |
114 | 115 | } |
115 | | -const defaultModel = params.cfg.agents?.defaults?.model; |
116 | | -const primaryModel = typeof defaultModel === "string" ? defaultModel : defaultModel?.primary; |
117 | | -const primaryModelProvider = primaryModel?.split("/", 1)[0]; |
| 116 | +const primaryModelProvider = resolveAgentModelPrimaryValue( |
| 117 | + params.cfg.agents?.defaults?.model, |
| 118 | +)?.split("/", 1)[0]; |
118 | 119 | if (primaryModelProvider === "openai-codex" || primaryModelProvider === "codex") { |
119 | 120 | addSyntheticProvider("codex"); |
120 | 121 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。