mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Improve display of model picker in OnboardingDialog
This commit is contained in:
2 files changed
+14
-10
No files matched your search
@@ -7,7 +7,7 @@ import { createAIClient } from '@/lib/ai-client';
|
||||
|
||||
interface ProviderModel {
|
||||
id: string;
|
||||
name: string;
|
||||
name?: string;
|
||||
provider: string;
|
||||
fullId: string; // provider/model format
|
||||
description?: string;
|
||||
@@ -58,11 +58,14 @@ export function useProviderModels(): ModelFetchResult {
|
||||
const providerModels = response.data.map((model) => {
|
||||
const providerModel: ProviderModel = {
|
||||
id: model.id,
|
||||
name: model.id,
|
||||
provider: providerKey,
|
||||
fullId: `${providerKey}/${model.id}`,
|
||||
};
|
||||
|
||||
if ('name' in model && typeof model.name === 'string') {
|
||||
providerModel.name = model.name;
|
||||
}
|
||||
|
||||
if ('description' in model && typeof model.description === 'string') {
|
||||
providerModel.description = model.description;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user