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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
量子位
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
爱范儿
爱范儿
博客园 - 【当耐特】
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
博客园 - 叶小钗
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
B
Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
V
V2EX

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: normalize gemini 3.1 config refs · openclaw/openclaw...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -1,3 +1,4 @@

1+

import { normalizeAgentModelRefForConfig } from "../config/model-input.js";

12

import type { AgentModelListConfig } from "../config/types.js";

23

import type { OpenClawConfig } from "../config/types.openclaw.js";

34

@@ -16,9 +17,10 @@ export function applyAgentDefaultPrimaryModel(params: {

1617

model: string;

1718

legacyModels?: Set<string>;

1819

}): { next: OpenClawConfig; changed: boolean } {

20+

const model = normalizeAgentModelRefForConfig(params.model);

1921

const current = resolvePrimaryModel(params.cfg.agents?.defaults?.model)?.trim();

20-

const normalizedCurrent = current && params.legacyModels?.has(current) ? params.model : current;

21-

if (normalizedCurrent === params.model) {

22+

const normalizedCurrent = current && params.legacyModels?.has(current) ? model : current;

23+

if (normalizedCurrent === model) {

2224

return { next: params.cfg, changed: false };

2325

}

2426

@@ -34,9 +36,9 @@ export function applyAgentDefaultPrimaryModel(params: {

3436

typeof params.cfg.agents.defaults.model === "object"

3537

? {

3638

...params.cfg.agents.defaults.model,

37-

primary: params.model,

39+

primary: model,

3840

}

39-

: { primary: params.model },

41+

: { primary: model },

4042

},

4143

},

4244

},

@@ -45,6 +47,7 @@ export function applyAgentDefaultPrimaryModel(params: {

4547

}

46484749

export function applyPrimaryModel(cfg: OpenClawConfig, model: string): OpenClawConfig {

50+

const normalizedModel = normalizeAgentModelRefForConfig(model);

4851

const defaults = cfg.agents?.defaults;

4952

const existingModel = defaults?.model;

5053

const existingModels = defaults?.models;

@@ -60,11 +63,11 @@ export function applyPrimaryModel(cfg: OpenClawConfig, model: string): OpenClawC

6063

...defaults,

6164

model: {

6265

...(fallbacks ? { fallbacks } : undefined),

63-

primary: model,

66+

primary: normalizedModel,

6467

},

6568

models: {

6669

...existingModels,

67-

[model]: existingModels?.[model] ?? {},

70+

[normalizedModel]: existingModels?.[normalizedModel] ?? {},

6871

},

6972

},

7073

},