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
@@ -51,6 +51,21 @@ export const DEFAULT_CAPABILITIES = {
|
||||
maxOutput: 64000,
|
||||
};
|
||||
|
||||
// User-added model metadata can carry dashboard service kinds instead of the
|
||||
// runtime capability names used here. Map those typed model kinds into input /
|
||||
// output capabilities so custom vision models are not treated as text-only.
|
||||
const SERVICE_KIND_CAPABILITIES = {
|
||||
imageToText: { vision: true },
|
||||
image: { imageOutput: true },
|
||||
stt: { audioInput: true },
|
||||
tts: { audioOutput: true },
|
||||
embedding: { tools: false },
|
||||
};
|
||||
|
||||
export function capabilitiesFromServiceKind(kind) {
|
||||
return SERVICE_KIND_CAPABILITIES[kind] || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Canonical exact-id overrides — used for exceptions that patterns would
|
||||
* otherwise mis-match. Only declare deltas vs DEFAULT.
|
||||
|
||||
Reference in New Issue
Block a user