The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
/**
* The chat models a paired phone can pick (`GET /remote-api/chat-models`,
* CHATS-V1.md): the rows of the desktop's model picker in the current mode,
* without picture, video and LoRA rows, each with the label the picker shows.
*/
import type { AIModel } from '../types/models'
import { isLoraRow } from './lora-rows'
import { modelOutOfMode } from './modeGate'
import { modelDisplayLabel } from './model-label'
import type { ChatModelChoice } from './remote-chats-bridge'
export function chatModelChoices(models: AIModel[], appMode: string | undefined): ChatModelChoice[] {
return models
.filter((m) => m.type !== 'image' && m.type !== 'video' && !isLoraRow(m) && !modelOutOfMode(m.name, appMode))
.map((m) => ({ name: m.name, label: modelDisplayLabel(models, m.name) }))
}