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

推荐订阅源

B
Blog
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
F
Fortinet All Blogs
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
Jina AI
Jina AI
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
美团技术团队
博客园 - 司徒正美
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research

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(tui): show resolved model ref in confirmation · openc...
NarahariRagh · 2026-06-14 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1149,6 +1149,68 @@ describe("tui command handlers", () => {

11491149

expect(closeOverlay).toHaveBeenCalledTimes(1);

11501150

});

11511151
1152+

it("shows resolved canonical model ref after /model alias, not raw alias string", async () => {

1153+

// When the user types `/model gpt4` (a bare alias), the gateway resolves it

1154+

// server-side and returns the canonical ref in result.resolved. The TUI must

1155+

// display the canonical ref, not the raw alias, so the user knows which model

1156+

// was actually applied.

1157+

const patchSession = vi.fn().mockResolvedValue({

1158+

ok: true,

1159+

path: "/sessions/patch",

1160+

key: "agent:main:main",

1161+

entry: {},

1162+

resolved: { modelProvider: "openai", model: "gpt-5.5" },

1163+

});

1164+

const refreshSessionInfo = vi.fn().mockResolvedValue(undefined);

1165+

const applySessionInfoFromPatch = vi.fn();

1166+

const { handleCommand, addSystem } = createHarness({

1167+

patchSession,

1168+

refreshSessionInfo,

1169+

applySessionInfoFromPatch,

1170+

});

1171+
1172+

await handleCommand("/model gpt4");

1173+
1174+

expect(patchSession).toHaveBeenCalledWith(expect.objectContaining({ model: "gpt4" }));

1175+

// Should show the canonical resolved ref, not the raw alias "gpt4"

1176+

expect(addSystem).toHaveBeenCalledWith("model set to openai/gpt-5.5");

1177+

});

1178+
1179+

it("falls back to raw input in /model confirmation when resolved ref unavailable", async () => {

1180+

// Older gateway versions may not return resolved; fall back to raw arg.

1181+

const patchSession = vi.fn().mockResolvedValue({

1182+

ok: true,

1183+

path: "/sessions/patch",

1184+

key: "agent:main:main",

1185+

entry: {},

1186+

// No `resolved` field

1187+

});

1188+

const { handleCommand, addSystem } = createHarness({ patchSession });

1189+
1190+

await handleCommand("/model openai/gpt-5.5");

1191+
1192+

expect(addSystem).toHaveBeenCalledWith("model set to openai/gpt-5.5");

1193+

});

1194+

it("preserves provider prefix for nested model ids in /model confirmation", async () => {

1195+

// Some providers route to nested model ids that themselves contain a slash

1196+

// (e.g. resolved.model: "moonshotai/kimi-k2.5" with modelProvider: "nvidia").

1197+

// The confirmation must still show the full nvidia/moonshotai/kimi-k2.5 ref

1198+

// to match the footer/status bar, not strip the provider just because the

1199+

// model id already contains a slash.

1200+

const patchSession = vi.fn().mockResolvedValue({

1201+

ok: true,

1202+

path: "/sessions/patch",

1203+

key: "agent:main:main",

1204+

entry: {},

1205+

resolved: { modelProvider: "nvidia", model: "moonshotai/kimi-k2.5" },

1206+

});

1207+

const { handleCommand, addSystem } = createHarness({ patchSession });

1208+
1209+

await handleCommand("/model nvidia/moonshotai/kimi-k2.5");

1210+
1211+

expect(addSystem).toHaveBeenCalledWith("model set to nvidia/moonshotai/kimi-k2.5");

1212+

});

1213+
11521214

it("renders model listing feedback before the backend list resolves", async () => {

11531215

let resolveModels: (

11541216

value: Array<{ provider: string; id: string; name?: string }>,