fix: avoid image fallback for text-only routes - #1
Closed
AlexanderWillner wants to merge 6 commits into
Closed
AlexanderWillner wants to merge 6 commits into
AlexanderWillner wants to merge 6 commits into
Conversation
Default LiteLLM chat models to explicit text-only modalities when capability metadata is absent, and invalidate stale model caches. Add regression coverage for OpenCode 2 discovery and cache upgrades.
Explain the conservative default for LiteLLM models without modality metadata and record the fix in the Unreleased changelog.
Owner
Author
|
Duplicate of the upstream PR yuseferi#32. Closing this accidentally created fork PR. |
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.
Summary
Fix OpenCode 2 model discovery so LiteLLM chat models without explicit modality metadata are registered as text-only. This prevents OpenCode's image-capable fallback from sending image parts to text-only routes and avoids repeated
mmprojbackend errors. The model cache is versioned so stale entries are refreshed after upgrade.Type of change
Checklist
npm run typecheckpassesnpm testpassesCHANGELOG.mdupdated under## [Unreleased]How was this tested?
npm test- 67 tests passednpm run typecheckgit diff --checkmmprojbackend errorScreenshots / logs (optional)
The model catalog now reports
level-1-lokalwithinput: ["text"]andoutput: ["text"]when capability metadata is absent. Routes with a working multimodal projector can opt in withmodelCapabilities: { "model-id": { "supports_vision": true } }.