Skip to content

feat: add image recognition model auto-switching#627

Open
OHCJ099 wants to merge 2 commits into
NanmiCoder:mainfrom
OHCJ099:feature/image-recognition-auto-switch
Open

feat: add image recognition model auto-switching#627
OHCJ099 wants to merge 2 commits into
NanmiCoder:mainfrom
OHCJ099:feature/image-recognition-auto-switch

Conversation

@OHCJ099
Copy link
Copy Markdown

@OHCJ099 OHCJ099 commented May 27, 2026

This PR implements model auto-switching for image recognition/vision tasks.

Features:

  1. Auto-Switching Model: Dynamically switches the model to \mimo-v2-omni\ (or the configured vision model) when the current turn contains an image (including pasted/uploaded images inside file attachments).
  2. History Sanitization: Replaces image content blocks and image attachments in previous turns with placeholder text, allowing text-only models (like \mimo-v2.5-pro) to proceed on subsequent turns without API validation errors.
  3. Custom Configuration: Users can customize their preferred vision model and switch preferences using the \imageRecognition\ block in \settings.json.

代码已测试无误,可以直接合入。

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 27, 2026
@github-actions
Copy link
Copy Markdown

PR quality triage

Changed areas: area:cli-core, area:desktop

CLI core policy: Blocked by policy until a maintainer applies allow-cli-core-change and approves the PR.

Missing-test policy: Blocked by policy until a maintainer applies allow-missing-tests or matching tests are added.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • src/utils/settings/types.ts

Coverage policy files:

  • none

Expected checks:

  • change-policy
  • desktop-checks
  • server-checks
  • desktop-native-checks
  • coverage-checks

Test coverage signals:

  • BLOCKING unless allow-missing-tests is applied: Agent/runtime product files changed without a tools/utils test file in the PR.
  • Agent/model runtime path changed: use mock/request-shape tests in PR and maintainer live-model smoke before release.

Risk notes:

  • No special risk notes from changed paths.

Hard merge gates still come from GitHub Actions, not AI review.

Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask:

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli-core area:desktop enhancement New feature or request needs-maintainer-approval size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant