feat(models): add image model type support

Add a dedicated image model type so bots can use image API models without overloading chat model capabilities, while keeping existing chat-based image generation selectable.
This commit is contained in:
Acbox
2026-04-16 16:00:22 +08:00
parent 33e18e7e64
commit ddda00f980
23 changed files with 326 additions and 68 deletions
@@ -93,7 +93,7 @@ export interface ModelOption {
const props = defineProps<{
models: ModelsGetResponse[]
providers: ProvidersGetResponse[]
modelType: 'chat' | 'embedding'
modelType?: 'chat' | 'embedding' | 'image'
open?: boolean
}>()
@@ -118,7 +118,7 @@ const providerMap = computed(() => {
})
const typeFilteredModels = computed(() =>
props.models.filter((m) => m.type === props.modelType),
props.modelType ? props.models.filter((m) => m.type === props.modelType) : props.models,
)
const options = computed<ModelOption[]>(() =>