fix(model): clarify session-scoped model switches · openclaw/openclaw@546f81d
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,7 @@ Docs: https://docs.openclaw.ai
|
31 | 31 | |
32 | 32 | ### Fixes |
33 | 33 | |
| 34 | +- Model commands: clarify direct and inline `/model` acknowledgements for non-default selections as session-scoped. Thanks @addu2612. |
34 | 35 | - TUI/chat: skip full provider model normalization during context-window warmup while preserving provider-owned context metadata, avoiding cold-start stalls with large model registries. Thanks @547895019. |
35 | 36 | - Memory Wiki: accept relative Markdown links that include the `.md` suffix during broken-wikilink validation, avoiding false positives for native render-mode links. Thanks @Kenneth8128. |
36 | 37 | - OpenAI Codex: show the device-pairing code in the interactive SSH/headless prompt while keeping the short-lived code out of persistent runtime logs. Fixes #74212. Thanks @da22le123. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -596,7 +596,7 @@ export async function handleDirectiveOnly(
|
596 | 596 | parts.push( |
597 | 597 | modelSelection.isDefault |
598 | 598 | ? `Model reset to default (${labelWithAlias}).` |
599 | | - : `Model set to ${labelWithAlias}.`, |
| 599 | + : `Model set to ${labelWithAlias} for this session.`, |
600 | 600 | ); |
601 | 601 | if (profileOverride) { |
602 | 602 | parts.push(`Auth profile set to ${profileOverride}.`); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -939,6 +939,7 @@ describe("handleDirectiveOnly model persist behavior (fixes #1435)", () => {
|
939 | 939 | |
940 | 940 | expect(result?.text).toContain("Model set to"); |
941 | 941 | expect(result?.text).toContain("openai/gpt-4o"); |
| 942 | +expect(result?.text).toContain("for this session"); |
942 | 943 | expect(result?.text).not.toContain("failed"); |
943 | 944 | expect(sessionEntry.liveModelSwitchPending).toBe(true); |
944 | 945 | }); |
@@ -1046,7 +1047,9 @@ describe("handleDirectiveOnly model persist behavior (fixes #1435)", () => {
|
1046 | 1047 | }), |
1047 | 1048 | ); |
1048 | 1049 | |
1049 | | -expect(result?.text).toContain("Model set to Opus (anthropic/claude-opus-4-6)."); |
| 1050 | +expect(result?.text).toContain( |
| 1051 | +"Model set to Opus (anthropic/claude-opus-4-6) for this session.", |
| 1052 | +); |
1050 | 1053 | expect(result?.text).toContain("Auth profile set to anthropic:work."); |
1051 | 1054 | expect(sessionEntry.providerOverride).toBe("anthropic"); |
1052 | 1055 | expect(sessionEntry.modelOverride).toBe("claude-opus-4-6"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -303,7 +303,7 @@ export async function applyInlineDirectiveOverrides(params: {
|
303 | 303 | : undefined, |
304 | 304 | modelSelection.isDefault |
305 | 305 | ? `Model reset to default (${labelWithAlias}).` |
306 | | - : `Model set to ${labelWithAlias}.`, |
| 306 | + : `Model set to ${labelWithAlias} for this session.`, |
307 | 307 | modelResolution.profileOverride |
308 | 308 | ? `Auth profile set to ${modelResolution.profileOverride}.` |
309 | 309 | : undefined, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。