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

推荐订阅源

G
Google Developers Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
人人都是产品经理
人人都是产品经理
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
博客园 - 【当耐特】
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
量子位
罗磊的独立博客
月光博客
月光博客
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
博客园_首页
P
Proofpoint News Feed
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
腾讯CDC

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
refactor(agents): share model manifest context · openclaw...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -73,6 +73,7 @@ import { AGENT_LANE_SUBAGENT } from "./lanes.js";

7373

import { LiveSessionModelSwitchError } from "./live-model-switch.js";

7474

import { loadManifestModelCatalog } from "./model-catalog.js";

7575

import { runWithModelFallback } from "./model-fallback.js";

76+

import type { ModelManifestNormalizationContext } from "./model-selection-normalize.js";

7677

import {

7778

buildConfiguredModelCatalog,

7879

modelKey,

@@ -402,17 +403,19 @@ async function prepareAgentCommandExecution(

402403

workspaceDir,

403404

env: process.env,

404405

});

405-

const manifestPlugins = manifestMetadataSnapshot.plugins;

406+

const modelManifestContext = {

407+

manifestPlugins: manifestMetadataSnapshot.plugins,

408+

} satisfies ModelManifestNormalizationContext;

406409

const configuredModel = resolveConfiguredModelRef({

407410

cfg,

408411

defaultProvider: DEFAULT_PROVIDER,

409412

defaultModel: DEFAULT_MODEL,

410-

manifestPlugins,

413+

...modelManifestContext,

411414

});

412415

const configuredThinkingCatalog = buildConfiguredModelCatalog({

413416

cfg,

414417

workspaceDir,

415-

manifestPlugins,

418+

...modelManifestContext,

416419

});

417420

const thinkingLevelsHint = formatThinkingLevels(

418421

configuredModel.provider,

@@ -472,7 +475,7 @@ async function prepareAgentCommandExecution(

472475

outboundSession,

473476

workspaceDir,

474477

agentDir,

475-

manifestPlugins,

478+

modelManifestContext,

476479

runId,

477480

acpManager,

478481

acpResolution,

@@ -512,7 +515,7 @@ async function agentCommandInternal(

512515

runId,

513516

acpManager,

514517

acpResolution,

515-

manifestPlugins,

518+

modelManifestContext,

516519

} = prepared;

517520

let sessionEntry = prepared.sessionEntry;

518521

@@ -764,12 +767,12 @@ async function agentCommandInternal(

764767

const configuredDefaultRef = resolveDefaultModelForAgent({

765768

cfg,

766769

agentId: sessionAgentId,

767-

manifestPlugins,

770+

...modelManifestContext,

768771

});

769772

const { provider: defaultProvider, model: defaultModel } = normalizeModelRef(

770773

configuredDefaultRef.provider,

771774

configuredDefaultRef.model,

772-

{ manifestPlugins },

775+

modelManifestContext,

773776

);

774777

let provider = defaultProvider;

775778

let model = defaultModel;

@@ -802,7 +805,7 @@ async function agentCommandInternal(

802805

catalog: [],

803806

defaultProvider,

804807

defaultModel,

805-

manifestPlugins,

808+

...modelManifestContext,

806809

});

807810808811

if (needsModelCatalog) {

@@ -813,7 +816,7 @@ async function agentCommandInternal(

813816

defaultProvider,

814817

defaultModel,

815818

agentId: sessionAgentId,

816-

manifestPlugins,

819+

...modelManifestContext,

817820

});

818821

allowedModelCatalog = visibilityPolicy.allowedCatalog;

819822

}

@@ -836,9 +839,11 @@ async function agentCommandInternal(

836839

const overrideProvider = sessionEntry.providerOverride?.trim() || defaultProvider;

837840

const overrideModel = sessionEntry.modelOverride?.trim();

838841

if (overrideModel) {

839-

const normalizedOverride = normalizeModelRef(overrideProvider, overrideModel, {

840-

manifestPlugins,

841-

});

842+

const normalizedOverride = normalizeModelRef(

843+

overrideProvider,

844+

overrideModel,

845+

modelManifestContext,

846+

);

842847

const key = modelKey(normalizedOverride.provider, normalizedOverride.model);

843848

if (!visibilityPolicy.allowsKey(key)) {

844849

const { updated } = applyModelOverrideToSessionEntry({

@@ -861,9 +866,11 @@ async function agentCommandInternal(

861866

let storedModelOverride = sessionEntry?.modelOverride?.trim();

862867

if (storedModelOverride) {

863868

const candidateProvider = storedProviderOverride || defaultProvider;

864-

const normalizedStored = normalizeModelRef(candidateProvider, storedModelOverride, {

865-

manifestPlugins,

866-

});

869+

const normalizedStored = normalizeModelRef(

870+

candidateProvider,

871+

storedModelOverride,

872+

modelManifestContext,

873+

);

867874

const key = modelKey(normalizedStored.provider, normalizedStored.model);

868875

if (visibilityPolicy.allowsKey(key)) {

869876

provider = normalizedStored.provider;

@@ -889,10 +896,10 @@ async function agentCommandInternal(

889896

if (hasExplicitRunOverride) {

890897

const explicitRef = explicitModelOverride

891898

? explicitProviderOverride

892-

? normalizeModelRef(explicitProviderOverride, explicitModelOverride, { manifestPlugins })

893-

: parseModelRef(explicitModelOverride, provider, { manifestPlugins })

899+

? normalizeModelRef(explicitProviderOverride, explicitModelOverride, modelManifestContext)

900+

: parseModelRef(explicitModelOverride, provider, modelManifestContext)

894901

: explicitProviderOverride

895-

? normalizeModelRef(explicitProviderOverride, model, { manifestPlugins })

902+

? normalizeModelRef(explicitProviderOverride, model, modelManifestContext)

896903

: null;

897904

if (!explicitRef) {

898905

throw new Error("Invalid model override.");

@@ -1107,7 +1114,7 @@ async function agentCommandInternal(

11071114

cfg,

11081115

provider,

11091116

model,

1110-

manifestPlugins,

1117+

...modelManifestContext,

11111118

runId,

11121119

agentDir,

11131120

fallbacksOverride: effectiveFallbacksOverride,

@@ -1299,7 +1306,7 @@ async function agentCommandInternal(

12991306

{ cause: err },

13001307

);

13011308

}

1302-

const switchRef = normalizeModelRef(err.provider, err.model, { manifestPlugins });

1309+

const switchRef = normalizeModelRef(err.provider, err.model, modelManifestContext);

13031310

const switchKey = modelKey(switchRef.provider, switchRef.model);

13041311

if (!visibilityPolicy.allowsKey(switchKey)) {

13051312

log.info(