Skip to content

fix(coding-agent): detect llama.cpp per-model vision metadata#4721

Merged
can1357 merged 1 commit into
mainfrom
farm/fb68fabe/detect-local-vision-model
Jul 6, 2026
Merged

fix(coding-agent): detect llama.cpp per-model vision metadata#4721
can1357 merged 1 commit into
mainfrom
farm/fb68fabe/detect-local-vision-model

Conversation

@roboomp

@roboomp roboomp commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Repro

A llama.cpp /v1/models response matching the reporter's payload advertises architecture.input_modalities: ["text", "image"] for q51q41_mtp_30tps_120k, while /props omits modalities; before the fix, bun test packages/coding-agent/test/issue-4719-repro.temp.test.ts failed because ModelRegistry resolved model.input as ["text"] instead of ["text", "image"].

Cause

packages/coding-agent/src/config/model-discovery.ts only read llama.cpp image capability from /props.modalities.vision in discoverLlamaCppServerMetadata; parseLlamaCppModelList discarded each /v1/models entry's architecture.input_modalities, so router presets and loaded models that report capability per model were downgraded to text-only.

Fix

  • Parse architecture.input_modalities on llama.cpp /v1/models entries and store the resulting per-model input capabilities.
  • Prefer per-model input capabilities over /props server-level metadata during full discovery and selected-model runtime metadata refresh.
  • Add regression coverage for full llama.cpp discovery and cached selected-model refresh using the reporter's per-model architecture shape.
  • Add an Unreleased changelog entry for the coding-agent package.

Verification

bun test packages/coding-agent/test/model-discovery.test.ts -t llama.cpp passed with 17 tests; bun test packages/coding-agent/test/model-discovery.test.ts passed with 42 tests; bun check passed for all packages. Fixes #4719

- Honored per-model architecture.input_modalities from llama.cpp /v1/models during discovery and selected model refresh.
- Added regression coverage for full refresh and cached selected-model metadata refresh.
- Updated the coding-agent changelog.

Fixes #4719
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@github-actions github-actions Bot added the vouched Passed the vouch gate label Jul 6, 2026
@roboomp

roboomp commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

No code change needed for this directive. The Codex reviewer could not run because code-review usage limits are exhausted; repo admins need to add/enable credits in Codex Cloud settings before that automated review can proceed.

@can1357 can1357 merged commit c0fa625 into main Jul 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouched Passed the vouch gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omp not detecting vision capable local model (redux)

2 participants