Skip to content

feat(AIChat): support image input and visual follow-up in OneBot - #67

Merged
Yuna-Celisse merged 2 commits into
mainfrom
codex/aichat-multimodal
Oct 2, 2026
Merged

Yuna-Celisse merged 2 commits into
mainfrom
codex/aichat-multimodal

Conversation

@Yuna-Celisse

@Yuna-Celisse Yuna-Celisse commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

AIChat previously sent only text even when the configured model could understand images. OneBot/QQ now exposes image attachments separately from typed URLs, and AIChat sends validated image bytes as image content. Image-only mentions receive a default description prompt; reply-based follow-ups reconstruct images from history.

Vision requires explicit SupportsVision configuration. Downloads have count, size and timeout limits, reject private network destinations and redirects, and validate image formats. Request logs omit image bytes and SDK content logging is disabled for vision. Visual sessions are short-lived to avoid accumulating image data.

Validation: 19 new unit tests pass; the complete automatic suite passes (178 passed, 1 platform skip; external integration tests explicit). All CI checks pass at 0d15e6f. A real-provider integration test using explicitly constructed OneBot events passed image-only recognition, visual reply follow-up, text-only chat and vision-disabled handling against agnes-3.0-flash.

Deployed independently of merging this PR as huajibot-local:vision-0d15e6f. Backed up configuration and plugin data, retained the previous image for rollback, and restarted only the bot. OneBot login, plugin loading and existing panel access checks passed. Other configuration and plugin binaries were preserved. Actual non-bot QQ group-message acceptance passed on 2026-10-02 (Asia/Shanghai): two image mentions and two reply follow-ups were received, each model request included one image, and all four answers were confirmed in OneBot group history. The bot described a logo and a yellow 3D character, and follow-ups retained the corresponding image context. This validates message delivery and multimodal context; it does not guarantee the model correctly identifies every object or character.

Closes #66. This is independent of PR #65; no changes or comments were made to that PR. This first adapter implementation covers OneBot/QQ. Reply history can retain images previously processed by AIChat; it does not fetch arbitrary earlier group images. Expired image source URLs require resending.

@Yuna-Celisse
Yuna-Celisse marked this pull request as ready for review October 2, 2026 14:11
@Yuna-Celisse
Yuna-Celisse merged commit 33571b0 into main Oct 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(AIChat): 支持图片输入与多模态看图问答

1 participant