fix: show custom vision models in LLM selector and model list
Expose user-added imageToText custom models as vision-capable chat
models in the default LLM selector and /v1/models, map custom service
kinds to runtime capabilities, and keep typed filtering for
/v1/models/{kind}.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
parent
047fdc8960
commit
5e5e78d3e8
@@ -128,7 +128,10 @@ export default function ModelSelectModal({
|
||||
|
||||
// Filter a models[] array by kindFilter (keep only matching kind)
|
||||
const filterByKind = (models) => {
|
||||
if (!kindFilter) return models.filter((m) => m.isPlaceholder || !getModelKind(m) || getModelKind(m) === "llm");
|
||||
// No kindFilter means the LLM selector. Keep custom models visible because
|
||||
// user-added models may have typed capabilities (for example imageToText)
|
||||
// while still being valid chat/combo targets.
|
||||
if (!kindFilter) return models.filter((m) => m.isPlaceholder || m.isCustom || !getModelKind(m) || getModelKind(m) === "llm");
|
||||
if (!TYPED_KINDS.has(kindFilter)) return models;
|
||||
return models.filter((m) => m.isPlaceholder || getModelKind(m) === kindFilter);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user