added an exclusion list to slightly reduce number of selectable models

This commit is contained in:
Shane Lamb 2025-06-22 21:37:15 +10:00
parent 6480563c55
commit afe735b76d

View file

@ -9,12 +9,22 @@ export interface ConnectionModel {
model: string
}
const modelExclusionList = [
/^dall-e/,
/embedding/,
/(^|-)tts(-|$)/,
/^whisper-/,
]
export function getCachedConnectionModels(connections: LlmConnectionSettings[]): ConnectionModel[] {
const models: ConnectionModel[] = []
for (const connection of connections) {
const connectionId = getConnectionId(connection)
for (const [model, id] of modelToConnectionCache) {
if (id === connectionId) {
if (modelExclusionList.some((regex) => regex.test(model))) {
continue
}
models.push({ connection, model })
}
}