fix(coding-agent): detect llama.cpp per-model vision metadata#4721
Merged
Conversation
- 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
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repro
A llama.cpp
/v1/modelsresponse matching the reporter's payload advertisesarchitecture.input_modalities: ["text", "image"]forq51q41_mtp_30tps_120k, while/propsomitsmodalities; before the fix,bun test packages/coding-agent/test/issue-4719-repro.temp.test.tsfailed becauseModelRegistryresolvedmodel.inputas["text"]instead of["text", "image"].Cause
packages/coding-agent/src/config/model-discovery.tsonly read llama.cpp image capability from/props.modalities.visionindiscoverLlamaCppServerMetadata;parseLlamaCppModelListdiscarded each/v1/modelsentry'sarchitecture.input_modalities, so router presets and loaded models that report capability per model were downgraded to text-only.Fix
architecture.input_modalitieson llama.cpp/v1/modelsentries and store the resulting per-model input capabilities./propsserver-level metadata during full discovery and selected-model runtime metadata refresh.Verification
bun test packages/coding-agent/test/model-discovery.test.ts -t llama.cpppassed with 17 tests;bun test packages/coding-agent/test/model-discovery.test.tspassed with 42 tests;bun checkpassed for all packages. Fixes #4719