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

推荐订阅源

Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
I
InfoQ
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
月光博客
月光博客
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
G
Google Developers Blog
小众软件
小众软件
宝玉的分享
宝玉的分享
Jina AI
Jina AI
V
Visual Studio Blog

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
test: add live model file and image probes · openclaw/ope...
steipete · 2026-04-23 · via Recent Commits to openclaw:main

@@ -16,6 +16,18 @@ import {

1616

selectHighSignalLiveItems,

1717

shouldExcludeProviderFromDefaultHighSignalLiveSweep,

1818

} from "./live-model-filter.js";

19+

import {

20+

buildLiveModelFileProbeContext,

21+

buildLiveModelImageProbeContext,

22+

extractAssistantText,

23+

fileProbeTextMatches,

24+

imageProbeTextMatches,

25+

isLiveModelProbeEnabled,

26+

LIVE_MODEL_FILE_PROBE_ENV,

27+

LIVE_MODEL_FILE_PROBE_TOKEN,

28+

LIVE_MODEL_IMAGE_PROBE_ENV,

29+

modelSupportsImageInput,

30+

} from "./live-model-turn-probes.js";

1931

import { createLiveTargetMatcher } from "./live-target-matcher.js";

2032

import { isLiveProfileKeyModeEnabled, isLiveTestEnabled } from "./live-test-helpers.js";

2133

import { getApiKeyForModel, requireApiKey } from "./model-auth.js";

@@ -37,6 +49,8 @@ const LIVE_SETUP_TIMEOUT_MS = Math.max(

3749

toInt(process.env.OPENCLAW_LIVE_SETUP_TIMEOUT_MS, 45_000),

3850

);

3951

const LIVE_MODELS_JSON_TIMEOUT_MS = resolveLiveModelsJsonTimeoutMs();

52+

const LIVE_FILE_PROBE_ENABLED = isLiveModelProbeEnabled(process.env, LIVE_MODEL_FILE_PROBE_ENV);

53+

const LIVE_IMAGE_PROBE_ENABLED = isLiveModelProbeEnabled(process.env, LIVE_MODEL_IMAGE_PROBE_ENV);

40544155

const describeLive = LIVE ? describe : describe.skip;

4256

@@ -432,6 +446,60 @@ async function completeOkWithRetry(params: {

432446

return await runOnce(256);

433447

}

434448449+

async function runExtraTurnProbes(params: {

450+

model: Model<Api>;

451+

apiKey: string;

452+

timeoutMs: number;

453+

progressLabel: string;

454+

}) {

455+

const options = {

456+

apiKey: params.apiKey,

457+

reasoning: resolveTestReasoning(params.model),

458+

maxTokens: 64,

459+

};

460+

if (LIVE_FILE_PROBE_ENABLED) {

461+

logProgress(`${params.progressLabel}: file-read probe`);

462+

const file = await completeSimpleWithTimeout(

463+

params.model,

464+

buildLiveModelFileProbeContext({ systemPrompt: resolveLiveSystemPrompt(params.model) }),

465+

options,

466+

params.timeoutMs,

467+

`${params.progressLabel}: file-read probe`,

468+

);

469+

if (file.stopReason === "error") {

470+

throw new Error(file.errorMessage || "file-read probe returned error with no message");

471+

}

472+

const fileText = extractAssistantText(file);

473+

if (!fileProbeTextMatches(fileText)) {

474+

throw new Error(`file-read probe did not return ${LIVE_MODEL_FILE_PROBE_TOKEN}: ${fileText}`);

475+

}

476+

}

477+478+

if (!LIVE_IMAGE_PROBE_ENABLED) {

479+

return;

480+

}

481+

if (!modelSupportsImageInput(params.model)) {

482+

logProgress(`${params.progressLabel}: image probe skipped (no image input)`);

483+

return;

484+

}

485+486+

logProgress(`${params.progressLabel}: image probe`);

487+

const image = await completeSimpleWithTimeout(

488+

params.model,

489+

buildLiveModelImageProbeContext({ systemPrompt: resolveLiveSystemPrompt(params.model) }),

490+

options,

491+

params.timeoutMs,

492+

`${params.progressLabel}: image probe`,

493+

);

494+

if (image.stopReason === "error") {

495+

throw new Error(image.errorMessage || "image probe returned error with no message");

496+

}

497+

const imageText = extractAssistantText(image);

498+

if (!imageProbeTextMatches(imageText)) {

499+

throw new Error(`image probe did not return ok: ${imageText}`);

500+

}

501+

}

502+435503

describeLive("live models (profile keys)", () => {

436504

it(

437505

"completes across selected models",

@@ -688,6 +756,12 @@ describeLive("live models (profile keys)", () => {

688756

.map((b) => b.text.trim())

689757

.join(" ");

690758

expect(secondText.length).toBeGreaterThan(0);

759+

await runExtraTurnProbes({

760+

model,

761+

apiKey,

762+

timeoutMs: perModelTimeoutMs,

763+

progressLabel,

764+

});

691765

logProgress(`${progressLabel}: done`);

692766

break;

693767

}

@@ -761,6 +835,12 @@ describeLive("live models (profile keys)", () => {

761835

break;

762836

}

763837

expect(ok.text.length).toBeGreaterThan(0);

838+

await runExtraTurnProbes({

839+

model,

840+

apiKey,

841+

timeoutMs: perModelTimeoutMs,

842+

progressLabel,

843+

});

764844

logProgress(`${progressLabel}: done`);

765845

break;

766846

} catch (err) {