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

推荐订阅源

U
Unit 42
T
The Blog of Author Tim Ferriss
H
Help Net Security
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
博客园 - 聂微东
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
B
Blog
Engineering at Meta
Engineering at Meta
V
V2EX
Hugging Face - Blog
Hugging Face - 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: validate inline images against session agent model (...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -5,12 +5,14 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test, vi

55

import type { ChannelPlugin } from "../channels/plugins/types.js";

66

import { createChannelTestPluginBase } from "../test-utils/channel-plugins.js";

77

import { waitForAgentCommandCall } from "./agent-command.test-helpers.js";

8+

import { __resetModelCatalogCacheForTest as resetGatewayModelCatalogCacheForTest } from "./server-model-catalog.js";

89

import { setRegistry } from "./server.agent.gateway-server-agent.mocks.js";

910

import { createRegistry } from "./server.e2e-registry-helpers.js";

1011

import {

1112

agentCommand,

1213

connectOk,

1314

installGatewayTestHooks,

15+

piSdkMock,

1416

rpcReq,

1517

startServerWithClient,

1618

testState,

@@ -440,6 +442,69 @@ describe("gateway server agent", () => {

440442

});

441443

});

442444445+

test("agent validates first image attachment against per-agent model for fresh sessions", async () => {

446+

testState.agentConfig = { model: { primary: "ollama-cloud/deepseek-v4-flash" } };

447+

testState.agentsConfig = {

448+

list: [

449+

{ id: "main", default: true },

450+

{ id: "vision", model: "ollama-cloud/gemma4:31b" },

451+

],

452+

};

453+

piSdkMock.enabled = true;

454+

piSdkMock.models = [

455+

{

456+

id: "deepseek-v4-flash",

457+

name: "DeepSeek V4 Flash",

458+

provider: "ollama-cloud",

459+

input: ["text"],

460+

},

461+

{

462+

id: "gemma4:31b",

463+

name: "Gemma 4 31B",

464+

provider: "ollama-cloud",

465+

input: ["text", "image"],

466+

},

467+

];

468+

await resetGatewayModelCatalogCacheForTest();

469+470+

await setTestSessionStore({

471+

agentId: "vision",

472+

entries: {

473+

main: {

474+

sessionId: "sess-vision-fresh-image",

475+

updatedAt: Date.now(),

476+

},

477+

},

478+

});

479+480+

const res = await rpcReq(ws, "agent", {

481+

message: "what is in the image?",

482+

sessionKey: "agent:vision:main",

483+

attachments: [

484+

{

485+

mimeType: "image/png",

486+

fileName: "tiny.png",

487+

content: BASE_IMAGE_PNG,

488+

},

489+

],

490+

idempotencyKey: "idem-agent-vision-first-image",

491+

});

492+

expect(

493+

res,

494+

`agent RPC should accept image using per-agent vision model: ${JSON.stringify(res)}`,

495+

).toMatchObject({ ok: true });

496+497+

const call = await waitForAgentCommandCall("idem-agent-vision-first-image");

498+

expect(call.sessionKey).toBe("agent:vision:main");

499+

expect(call.images).toEqual([

500+

expect.objectContaining({

501+

type: "image",

502+

mimeType: "image/png",

503+

data: BASE_IMAGE_PNG,

504+

}),

505+

]);

506+

});

507+443508

test("agent errors when delivery requested and no last channel exists", async () => {

444509

testState.allowFrom = ["+1555"];

445510

try {