refactor(web): enforce status field as required to follow backend behavior
This commit is contained in:
parent
e3b7643762
commit
958d524e28
2 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ export interface ModelInfo {
|
|||
extra_body?: Record<string, unknown>
|
||||
// Meta
|
||||
available: boolean
|
||||
status?: "available" | "unconfigured" | "unreachable"
|
||||
status: "available" | "unconfigured" | "unreachable"
|
||||
is_default: boolean
|
||||
is_virtual: boolean
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export function ModelCard({
|
|||
}: ModelCardProps) {
|
||||
const { t } = useTranslation()
|
||||
const isOAuth = model.auth_method === "oauth"
|
||||
const status = model.status ?? (model.available ? "available" : "unconfigured")
|
||||
const status = model.status
|
||||
const statusLabel = t(`models.status.${status}`)
|
||||
const canSetDefault =
|
||||
model.available && !model.is_default && !model.is_virtual
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue