fix: show fast mode in status · openclaw/openclaw@8714bad
steipete
·
2026-04-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -39,6 +39,7 @@ Docs: https://docs.openclaw.ai
|
39 | 39 | |
40 | 40 | ### Fixes |
41 | 41 | |
| 42 | +- Status: show `Fast` in `/status` when fast mode is enabled, including config/default-derived fast mode, and omit it when disabled. |
42 | 43 | - Models/auth: merge provider-owned default-model additions from `openclaw models auth login` instead of replacing `agents.defaults.models`, so re-authenticating an OAuth provider such as OpenAI Codex no longer wipes other providers' aliases and per-model params. Migrations that must rename keys (Anthropic -> Claude CLI) opt in with `replaceDefaultModels`. Fixes #69414. (#70435) Thanks @neeravmakwana. |
43 | 44 | - Media understanding/audio: prefer configured or key-backed STT providers before auto-detected local Whisper CLIs, so installed local transcription tools no longer shadow API providers such as Groq/OpenAI in `tools.media.audio` auto mode. Fixes #68727. |
44 | 45 | - Providers/OpenAI: lock the auth picker wording for OpenAI API key, Codex browser login, and Codex device pairing so the setup choices no longer imply a mixed Codex/API-key auth path. (#67848) Thanks @tmlxrd. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -68,6 +68,7 @@ title: "Thinking Levels"
|
68 | 68 | - For direct public `anthropic/*` requests, including OAuth-authenticated traffic sent to `api.anthropic.com`, fast mode maps to Anthropic service tiers: `/fast on` sets `service_tier=auto`, `/fast off` sets `service_tier=standard_only`. |
69 | 69 | - For `minimax/*` on the Anthropic-compatible path, `/fast on` (or `params.fastMode: true`) rewrites `MiniMax-M2.7` to `MiniMax-M2.7-highspeed`. |
70 | 70 | - Explicit Anthropic `serviceTier` / `service_tier` model params override the fast-mode default when both are set. OpenClaw still skips Anthropic service-tier injection for non-Anthropic proxy base URLs. |
| 71 | +- `/status` shows `Fast` only when fast mode is enabled. |
71 | 72 | |
72 | 73 | ## Verbose directives (/verbose or /v) |
73 | 74 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -268,6 +268,23 @@ describe("info command handlers", () => {
|
268 | 268 | ); |
269 | 269 | }); |
270 | 270 | |
| 271 | +it("forwards resolved fast mode to /status", async () => { |
| 272 | +const params = buildInfoParams("/status", { |
| 273 | +commands: { text: true }, |
| 274 | +channels: { whatsapp: { allowFrom: ["*"] } }, |
| 275 | +} as OpenClawConfig); |
| 276 | +params.resolvedFastMode = true; |
| 277 | + |
| 278 | +const statusResult = await handleStatusCommand(params, true); |
| 279 | + |
| 280 | +expect(statusResult?.shouldContinue).toBe(false); |
| 281 | +expect(vi.mocked(buildStatusReply)).toHaveBeenCalledWith( |
| 282 | +expect.objectContaining({ |
| 283 | +resolvedFastMode: true, |
| 284 | +}), |
| 285 | +); |
| 286 | +}); |
| 287 | + |
271 | 288 | it("uses the canonical target session agent when listing /commands", async () => { |
272 | 289 | const { handleCommandsListCommand } = await import("./commands-info.js"); |
273 | 290 | const params = buildInfoParams("/commands", { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -204,6 +204,7 @@ export const handleStatusCommand: CommandHandler = async (params, allowTextComma
|
204 | 204 | model: params.model, |
205 | 205 | contextTokens: params.contextTokens, |
206 | 206 | resolvedThinkLevel: params.resolvedThinkLevel, |
| 207 | +resolvedFastMode: params.resolvedFastMode, |
207 | 208 | resolvedVerboseLevel: params.resolvedVerboseLevel, |
208 | 209 | resolvedReasoningLevel: params.resolvedReasoningLevel, |
209 | 210 | resolvedElevatedLevel: params.resolvedElevatedLevel, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,6 +53,7 @@ export type HandleCommandsParams = {
|
53 | 53 | opts?: GetReplyOptions; |
54 | 54 | defaultGroupActivation: () => "always" | "mention"; |
55 | 55 | resolvedThinkLevel?: ThinkLevel; |
| 56 | +resolvedFastMode?: boolean; |
56 | 57 | resolvedVerboseLevel: VerboseLevel; |
57 | 58 | resolvedReasoningLevel: ReasoningLevel; |
58 | 59 | resolvedElevatedLevel?: ElevatedLevel; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -276,7 +276,24 @@ describe("buildStatusMessage", () => {
|
276 | 276 | queue: { mode: "collect", depth: 0 }, |
277 | 277 | }); |
278 | 278 | |
279 | | -expect(normalizeTestText(text)).toContain("Fast: on"); |
| 279 | +expect(normalizeTestText(text)).toContain("Fast"); |
| 280 | +}); |
| 281 | + |
| 282 | +it("hides fast mode when disabled", () => { |
| 283 | +const text = buildStatusMessage({ |
| 284 | +agent: { |
| 285 | +model: "anthropic/claude-opus-4-6", |
| 286 | +}, |
| 287 | +sessionEntry: { |
| 288 | +sessionId: "fast-off", |
| 289 | +updatedAt: 0, |
| 290 | +fastMode: false, |
| 291 | +}, |
| 292 | +sessionKey: "agent:main:main", |
| 293 | +queue: { mode: "collect", depth: 0 }, |
| 294 | +}); |
| 295 | + |
| 296 | +expect(normalizeTestText(text)).not.toContain("Fast"); |
280 | 297 | }); |
281 | 298 | |
282 | 299 | it("shows configured text verbosity for the active model", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { describe, expect, it } from "vitest"; |
| 2 | +import { normalizeTestText } from "../../test/helpers/normalize-text.js"; |
| 3 | +import { buildStatusMessage } from "./status-message.js"; |
| 4 | + |
| 5 | +const buildFastStatus = (model: string, fastMode: boolean) => |
| 6 | +normalizeTestText( |
| 7 | +buildStatusMessage({ |
| 8 | +modelAuth: "api-key", |
| 9 | +activeModelAuth: "api-key", |
| 10 | +agent: { model }, |
| 11 | +sessionEntry: { |
| 12 | +sessionId: "fast-status", |
| 13 | +updatedAt: 0, |
| 14 | + fastMode, |
| 15 | +}, |
| 16 | +sessionKey: "agent:main:main", |
| 17 | +queue: { mode: "collect", depth: 0 }, |
| 18 | +}), |
| 19 | +); |
| 20 | + |
| 21 | +describe("buildStatusMessage fast mode labels", () => { |
| 22 | +it("shows fast mode when enabled", () => { |
| 23 | +expect(buildFastStatus("openai/gpt-5.4", true)).toContain("Fast"); |
| 24 | +}); |
| 25 | + |
| 26 | +it("hides fast mode when disabled", () => { |
| 27 | +expect(buildFastStatus("anthropic/claude-opus-4-6", false)).not.toContain("Fast"); |
| 28 | +}); |
| 29 | +}); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -237,6 +237,13 @@ const formatQueueDetails = (queue?: QueueStatus) => {
|
237 | 237 | return detailParts.length ? ` (${detailParts.join(" · ")})` : ""; |
238 | 238 | }; |
239 | 239 | |
| 240 | +const formatFastModeLabel = (enabled: boolean) => { |
| 241 | +if (!enabled) { |
| 242 | +return null; |
| 243 | +} |
| 244 | +return "Fast"; |
| 245 | +}; |
| 246 | + |
240 | 247 | const readUsageFromSessionLog = ( |
241 | 248 | sessionId?: string, |
242 | 249 | sessionEntry?: SessionEntry, |
@@ -705,7 +712,7 @@ export function buildStatusMessage(args: StatusArgs): string {
|
705 | 712 | const optionParts = [ |
706 | 713 | `Runtime: ${runtime.label}`, |
707 | 714 | `Think: ${thinkLevel}`, |
708 | | -fastMode ? "Fast: on" : null, |
| 715 | +formatFastModeLabel(fastMode), |
709 | 716 | textVerbosity ? `Text: ${textVerbosity}` : null, |
710 | 717 | verboseLabel, |
711 | 718 | traceLabel, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。