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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
宝玉的分享
宝玉的分享
G
Google Developers Blog
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
V
Visual Studio Blog
博客园 - Franky
S
SegmentFault 最新的问题
Jina AI
Jina AI
爱范儿
爱范儿
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
D
DataBreaches.Net
C
Check Point Blog
月光博客
月光博客
P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
Martin Fowler
Martin Fowler

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(cli): fail empty local model probes · openclaw/opencl...
steipete · 2026-04-28 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -16,6 +16,7 @@ Docs: https://docs.openclaw.ai

1616
1717

### Fixes

1818
19+

- CLI/model probes: fail local `infer model run` probes when the provider returns no text output, so unreachable local providers and empty completions no longer look like successful smoke tests. Refs #73023. Thanks @pavelyortho-cyber.

1920

- CLI/Ollama: run local `infer model run` through the lean provider completion path and skip global model discovery for one-shot local probes, so Ollama smoke tests no longer pay full chat-agent/tool startup cost or hang before the native `/api/chat` request. Fixes #72851. Thanks @TotalRes2020.

2021

- Daemon/service: only emit hard-coded version-manager paths such as `~/.volta/bin`, `~/.asdf/shims`, `~/.bun/bin`, and fnm/pnpm fallbacks into gateway and node service PATHs when the directories exist, so `openclaw doctor` no longer flags `gateway.path.non-minimal` against a PATH the daemon just wrote. Env-driven roots and stable user-bin dirs remain unconditional. Fixes #71944; carries forward #71964. Thanks @Sanjays2402.

2122

- Channels/commands: make generated `/dock-*` commands switch the active session reply route through `session.identityLinks` instead of falling through to normal chat. Fixes #69206; carries forward #73033. Thanks @clawbones and @michaelatamuk.

Original file line numberDiff line numberDiff line change

@@ -159,6 +159,7 @@ openclaw infer model run --local --model openai/gpt-4.1 --prompt "Reply with exa

159159

Notes:

160160
161161

- Local `model run` is the narrowest CLI smoke for provider/model/auth health because it sends only the supplied prompt to the selected model.

162+

- Local `model run` exits non-zero when the provider returns no text output, so unreachable local providers and empty completions do not look like successful probes.

162163

- Use `model run --gateway` when you need to test Gateway routing, agent-runtime setup, or Gateway-managed provider state instead of the lean local completion path.

163164

- `model auth login`, `model auth logout`, and `model auth status` manage saved provider auth state.

164165
Original file line numberDiff line numberDiff line change

@@ -419,6 +419,24 @@ describe("capability cli", () => {

419419

);

420420

});

421421
422+

it("fails local model probes when the provider returns no text output", async () => {

423+

mocks.completeWithPreparedSimpleCompletionModel.mockResolvedValueOnce({

424+

content: [],

425+

} as never);

426+
427+

await expect(

428+

runRegisteredCli({

429+

register: registerCapabilityCli as (program: Command) => void,

430+

argv: ["capability", "model", "run", "--prompt", "hello", "--json"],

431+

}),

432+

).rejects.toThrow("exit 1");

433+
434+

expect(mocks.runtime.error).toHaveBeenCalledWith(

435+

expect.stringContaining('No text output returned for provider "openai" model "gpt-5.4"'),

436+

);

437+

expect(mocks.runtime.writeJson).not.toHaveBeenCalled();

438+

});

439+
422440

it("runs gateway model probes without chat-agent prompt policy or tools", async () => {

423441

await runRegisteredCli({

424442

register: registerCapabilityCli as (program: Command) => void,

Original file line numberDiff line numberDiff line change

@@ -112,7 +112,7 @@ type CapabilityEnvelope = {

112112

const CAPABILITY_METADATA: CapabilityMetadata[] = [

113113

{

114114

id: "model.run",

115-

description: "Run a one-shot text inference turn through the agent runtime.",

115+

description: "Run a one-shot text inference turn through the selected model provider.",

116116

transports: ["local", "gateway"],

117117

flags: ["--prompt", "--model", "--local", "--gateway", "--json"],

118118

resultShape: "normalized payloads plus provider/model attribution",

@@ -570,6 +570,13 @@ function requireProviderModelOverride(

570570

};

571571

}

572572
573+

function collectModelRunText(content: Array<{ type: string; text?: string }>): string {

574+

return content

575+

.map((block) => (block.type === "text" && typeof block.text === "string" ? block.text : ""))

576+

.join("")

577+

.trim();

578+

}

579+
573580

async function runModelRun(params: {

574581

prompt: string;

575582

model?: string;

@@ -607,25 +614,25 @@ async function runModelRun(params: {

607614

: undefined,

608615

},

609616

});

610-

const text = result.content

611-

.map((block) => (block.type === "text" ? block.text : ""))

612-

.join("")

613-

.trim();

617+

const text = collectModelRunText(result.content);

618+

if (!text) {

619+

throw new Error(

620+

`No text output returned for provider "${prepared.selection.provider}" model "${prepared.selection.modelId}".`,

621+

);

622+

}

614623

return {

615624

ok: true,

616625

capability: "model.run",

617626

transport: "local" as const,

618627

provider: prepared.selection.provider,

619628

model: prepared.selection.modelId,

620629

attempts: [],

621-

outputs: text

622-

? [

623-

{

624-

text,

625-

mediaUrl: null,

626-

},

627-

]

628-

: [],

630+

outputs: [

631+

{

632+

text,

633+

mediaUrl: null,

634+

},

635+

],

629636

} satisfies CapabilityEnvelope;

630637

}

631638