Skip to content

fix: wire agents.defaults.imageModel into media understanding#7607

Closed
PavDev3 wants to merge 4 commits intoopenclaw:mainfrom
PavDev3:fix/wire-imagemodel-into-media-understanding
Closed

fix: wire agents.defaults.imageModel into media understanding#7607
PavDev3 wants to merge 4 commits intoopenclaw:mainfrom
PavDev3:fix/wire-imagemodel-into-media-understanding

Conversation

@PavDev3
Copy link
Contributor

@PavDev3 PavDev3 commented Feb 3, 2026

Fixes #7564

This PR wires the agents.defaults.imageModel setting into media understanding auto-discovery.

Co-Authored-By: Warp [email protected]

Greptile Overview

Greptile Summary

This PR wires agents.defaults.imageModel into the media-understanding auto-discovery path by adding a resolver in src/media-understanding/runner.ts that parses primary/fallbacks (or a string) into provider/model entries and prefers those for the image capability before falling back to the existing Gemini CLI discovery.

It also adds a committed Claude permissions config (.claude/settings.local.json) and introduces package-lock.json (npm lockfile) to pin dependency versions.

Confidence Score: 3/5

  • Mostly safe, but image-model auto-discovery can select invalid entries and fail at runtime instead of falling back.
  • Core change is small and localized, but it introduces a new highest-priority discovery source that does not apply the same provider/capability/API-key checks used elsewhere, which can turn a misconfiguration into a hard failure. Non-functional additions (settings file, lockfile) are low risk but may be contentious.
  • src/media-understanding/runner.ts; .claude/settings.local.json

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

PavDev3 and others added 2 commits February 3, 2026 01:41
…scovery

resolveAutoEntries only checked a hardcoded list of providers
(openai, anthropic, google, minimax) when looking for an image model.
agents.defaults.imageModel was never consulted by the media understanding
pipeline — it was only wired into the explicit `image` tool.

Add resolveImageModelFromAgentDefaults that reads the imageModel config
(primary + fallbacks) and inserts it into the auto-discovery chain before
the hardcoded provider list.  runProviderEntry already falls back to
describeImageWithModel (via pi-ai) for providers not in the media
understanding registry, so no additional provider registration is needed.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor Author

@PavDev3 PavDev3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test again

@steipete
Copy link
Contributor

Backported to main in 5acec7f79 (fix: wire agents.defaults.imageModel into media understanding auto-discovery).

Closing as integrated.

@steipete steipete closed this Feb 17, 2026
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.

[telegram] Images not being passed to local Ollama vision model (qwen2.5vl)

2 participants

Comments