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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
量子位
N
Netflix TechBlog - Medium
The Cloudflare Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
B
Blog
博客园_首页
博客园 - Franky
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
H
Help Net Security
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell

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(agents): resolve model aliases before fallback · open...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -853,6 +853,32 @@ describe("model-selection", () => {

853853

ref: { provider: "opencode-go", model: "kimi-k2.6" },

854854

});

855855

});

856+857+

it("resolves slash-form aliases before provider/model parsing", () => {

858+

const cfg = {

859+

agents: {

860+

defaults: {

861+

models: {

862+

"openai/xiaomi/mimo-v2-pro-mit": {

863+

alias: "xiaomi/mimo-v2-pro-mit",

864+

},

865+

},

866+

},

867+

},

868+

} as OpenClawConfig;

869+870+

const result = resolveAllowedModelRef({

871+

cfg,

872+

catalog: [],

873+

raw: "xiaomi/mimo-v2-pro-mit",

874+

defaultProvider: "openai",

875+

});

876+877+

expect(result).toEqual({

878+

key: "openai/xiaomi/mimo-v2-pro-mit",

879+

ref: { provider: "openai", model: "xiaomi/mimo-v2-pro-mit" },

880+

});

881+

});

856882

});

857883858884

describe("resolveModelRefFromString", () => {

@@ -882,6 +908,30 @@ describe("model-selection", () => {

882908

expect(resolved?.ref).toEqual({ provider: "openai", model: "gpt-4" });

883909

});

884910911+

it("prefers slash-form aliases over direct provider/model parsing", () => {

912+

const index = {

913+

byAlias: new Map([

914+

[

915+

"xiaomi/mimo-v2-pro-mit",

916+

{

917+

alias: "xiaomi/mimo-v2-pro-mit",

918+

ref: { provider: "openai", model: "xiaomi/mimo-v2-pro-mit" },

919+

},

920+

],

921+

]),

922+

byKey: new Map(),

923+

};

924+925+

const resolved = resolveModelRefFromString({

926+

raw: "xiaomi/mimo-v2-pro-mit",

927+

defaultProvider: "anthropic",

928+

aliasIndex: index,

929+

});

930+931+

expect(resolved?.ref).toEqual({ provider: "openai", model: "xiaomi/mimo-v2-pro-mit" });

932+

expect(resolved?.alias).toBe("xiaomi/mimo-v2-pro-mit");

933+

});

934+885935

it("strips trailing profile suffix for simple model refs", () => {

886936

const resolved = resolveModelRefFromString({

887937

raw: "gpt-5@myprofile",

@@ -1090,6 +1140,29 @@ describe("model-selection", () => {

10901140

}

10911141

});

109211421143+

it("prefers slash-form aliases for configured default models", () => {

1144+

const cfg = {

1145+

agents: {

1146+

defaults: {

1147+

model: { primary: "xiaomi/mimo-v2-pro-mit" },

1148+

models: {

1149+

"openai/xiaomi/mimo-v2-pro-mit": {

1150+

alias: "xiaomi/mimo-v2-pro-mit",

1151+

},

1152+

},

1153+

},

1154+

},

1155+

} as OpenClawConfig;

1156+1157+

const result = resolveConfiguredModelRef({

1158+

cfg,

1159+

defaultProvider: "anthropic",

1160+

defaultModel: "claude-sonnet-4-6",

1161+

});

1162+1163+

expect(result).toEqual({ provider: "openai", model: "xiaomi/mimo-v2-pro-mit" });

1164+

});

1165+10931166

it("should use default provider/model if config is empty", () => {

10941167

const cfg: Partial<OpenClawConfig> = {};

10951168

const result = resolveConfiguredModelRef({