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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Jina AI
Jina AI
博客园 - 叶小钗
B
Blog RSS Feed
Recent Announcements
Recent Announcements
H
Help Net Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客

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
perf: reuse manifest metadata for read-only model catalog...
steipete · 2026-05-15 · via Recent Commits to openclaw:main

@@ -5,7 +5,10 @@ import type { OpenClawConfig } from "../config/types.openclaw.js";

55

import { createSubsystemLogger } from "../logging/subsystem.js";

66

import { planManifestModelCatalogRows } from "../model-catalog/manifest-planner.js";

77

import { getCurrentPluginMetadataSnapshot } from "../plugins/current-plugin-metadata-snapshot.js";

8-

import { isManifestPluginAvailableForControlPlane } from "../plugins/manifest-contract-eligibility.js";

8+

import {

9+

isManifestPluginAvailableForControlPlane,

10+

loadManifestMetadataSnapshot,

11+

} from "../plugins/manifest-contract-eligibility.js";

912

import { loadPluginMetadataSnapshot } from "../plugins/plugin-metadata-snapshot.js";

1013

import { augmentModelCatalogWithProviderPlugins } from "../plugins/provider-runtime.runtime.js";

1114

import { createLazyImportLoader } from "../shared/lazy-promise.js";

@@ -16,7 +19,10 @@ import {

1619

import { resolveDefaultAgentDir } from "./agent-scope.js";

1720

import { modelSupportsInput as modelCatalogEntrySupportsInput } from "./model-catalog-lookup.js";

1821

import type { ModelCatalogEntry, ModelInputType } from "./model-catalog.types.js";

19-

import { normalizeConfiguredProviderCatalogModelId } from "./model-ref-shared.js";

22+

import {

23+

normalizeConfiguredProviderCatalogModelId,

24+

type ProviderModelIdNormalizationOptions,

25+

} from "./model-ref-shared.js";

2026

import { buildConfiguredModelCatalog } from "./model-selection-shared.js";

2127

import { ensureOpenClawModelsJson } from "./models-config.js";

2228

import { normalizeProviderId } from "./provider-id.js";

@@ -196,6 +202,9 @@ function normalizePersistedModelCatalogEntry(

196202

contextWindow?: number;

197203

contextTokens?: number;

198204

},

205+

options: {

206+

manifestPlugins?: ProviderModelIdNormalizationOptions["manifestPlugins"];

207+

} = {},

199208

): ModelCatalogEntry | undefined {

200209

const rawId = normalizeOptionalString(entry.id) ?? "";

201210

if (!rawId) {

@@ -205,7 +214,7 @@ function normalizePersistedModelCatalogEntry(

205214

if (!provider) {

206215

return undefined;

207216

}

208-

const id = normalizeConfiguredProviderCatalogModelId(provider, rawId);

217+

const id = normalizeConfiguredProviderCatalogModelId(provider, rawId, options);

209218

const name = normalizeOptionalString(entry.name ?? id) || id;

210219

const contextWindow =

211220

typeof entry?.contextWindow === "number" && entry.contextWindow > 0

@@ -252,6 +261,14 @@ async function loadReadOnlyPersistedModelCatalog(params?: {

252261

const models: ModelCatalogEntry[] = [];

253262

const { buildShouldSuppressBuiltInModel } = await loadModelSuppression();

254263

const shouldSuppressBuiltInModel = buildShouldSuppressBuiltInModel({ config: cfg });

264+

let manifestPlugins: ProviderModelIdNormalizationOptions["manifestPlugins"];

265+

const getManifestPlugins = () => {

266+

manifestPlugins ??= loadManifestMetadataSnapshot({

267+

config: cfg,

268+

env: process.env,

269+

}).plugins;

270+

return manifestPlugins;

271+

};

255272

const providers =

256273

parsed?.providers && typeof parsed.providers === "object"

257274

? (parsed.providers as Record<string, Record<string, unknown>>)

@@ -269,10 +286,15 @@ async function loadReadOnlyPersistedModelCatalog(params?: {

269286

? providerConfig.contextTokens

270287

: undefined;

271288

for (const entry of providerConfig.models as Record<string, unknown>[]) {

272-

const normalized = normalizePersistedModelCatalogEntry(providerRaw, entry, {

273-

contextWindow: providerContextWindow,

274-

contextTokens: providerContextTokens,

275-

});

289+

const normalized = normalizePersistedModelCatalogEntry(

290+

providerRaw,

291+

entry,

292+

{

293+

contextWindow: providerContextWindow,

294+

contextTokens: providerContextTokens,

295+

},

296+

{ manifestPlugins: getManifestPlugins() },

297+

);

276298

if (normalized && !shouldSuppressBuiltInModel(normalized)) {

277299

models.push(normalized);

278300

}