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

推荐订阅源

Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
T
Tailwind CSS Blog
D
Docker
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
腾讯CDC
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
U
Unit 42
The Cloudflare Blog
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
爱范儿
爱范儿
Recent Announcements
Recent Announcements
博客园 - 聂微东
博客园 - 叶小钗
H
Help Net Security
MyScale Blog
MyScale 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
fix(agents): honor image tool model overrides · openclaw/...
steipete · 2026-05-11 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

3434
3535

### Fixes

3636
37+

- Agents/image: honor explicit `image` tool model overrides even when `agents.defaults.imageModel` is unset, restoring one-off vision calls for configured multimodal providers. Fixes #79341. Thanks @haumanto.

3738

- Telegram: pass agent-scoped media roots through gateway message actions so workspace-local media from the active agent is not rejected as cross-agent access. Thanks @frankekn.

3839

- CLI/gateway: keep `gateway status --deep` plugin-aware so configured plugin manifest warnings, including missing channel config metadata, stay visible during install and update smoke checks.

3940

- Feishu: fall back to a top-level group send when normal group quoted replies target a withdrawn or missing message, preventing replies from disappearing silently while preserving native topic safety. Fixes #79349. Thanks @arlen8411.

Original file line numberDiff line numberDiff line change

@@ -660,6 +660,46 @@ describe("image tool implicit imageModel config", () => {

660660

});

661661

});

662662
663+

it("honors a per-call model override when no imageModel is configured", async () => {

664+

await withTempAgentDir(async (agentDir) => {

665+

const describeImage = vi.fn(async (params: ImageDescriptionRequest) => ({

666+

text: `ok ${params.provider}/${params.model}`,

667+

model: params.model,

668+

}));

669+

installImageUnderstandingProviderStubs({

670+

id: "opencode-go",

671+

capabilities: ["image"],

672+

describeImage,

673+

});

674+

const cfg: OpenClawConfig = {

675+

agents: { defaults: { model: { primary: "opencode-go/kimi-k2.6" } } },

676+

};

677+

const tool = createRequiredImageTool({

678+

config: cfg,

679+

agentDir,

680+

deferAutoModelResolution: true,

681+

});

682+
683+

const result = await tool.execute("t1", {

684+

prompt: "Describe this image.",

685+

image: `data:image/png;base64,${ONE_PIXEL_PNG_B64}`,

686+

model: "opencode-go/mimo-v2-omni",

687+

});

688+
689+

expect(describeImage).toHaveBeenCalledWith(

690+

expect.objectContaining({

691+

provider: "opencode-go",

692+

model: "mimo-v2-omni",

693+

}),

694+

);

695+

expect(result.content).toEqual(

696+

expect.arrayContaining([

697+

expect.objectContaining({ type: "text", text: "ok opencode-go/mimo-v2-omni" }),

698+

]),

699+

);

700+

});

701+

});

702+
663703

it("pairs minimax primary with MiniMax-VL-01 (and fallbacks) when auth exists", async () => {

664704

await withTempAgentDir(async (agentDir) => {

665705

vi.stubEnv("MINIMAX_API_KEY", "minimax-test");

Original file line numberDiff line numberDiff line change

@@ -182,6 +182,20 @@ export function resolveImageModelConfigForTool(params: {

182182

});

183183

}

184184
185+

function resolveImageModelConfigForOverride(params: {

186+

cfg?: OpenClawConfig;

187+

modelOverride?: string;

188+

}): ImageModelConfig | null {

189+

const model = params.modelOverride?.trim();

190+

if (!model) {

191+

return null;

192+

}

193+

return resolveConfiguredImageModelRefs({

194+

cfg: params.cfg,

195+

imageModelConfig: { primary: model },

196+

});

197+

}

198+
185199

function pickMaxBytes(cfg?: OpenClawConfig, maxBytesMb?: number): number | undefined {

186200

if (typeof maxBytesMb === "number" && Number.isFinite(maxBytesMb) && maxBytesMb > 0) {

187201

return Math.floor(maxBytesMb * 1024 * 1024);

@@ -622,6 +636,10 @@ export function createImageTool(options?: {

622636

// MARK: - Run image prompt with all loaded images

623637

const imageModelConfig =

624638

resolvedImageModelConfig ??

639+

resolveImageModelConfigForOverride({

640+

cfg: options?.config,

641+

modelOverride,

642+

}) ??

625643

resolveImageModelConfigForTool({

626644

cfg: options?.config,

627645

agentDir,