instant update delete model flow

This commit is contained in:
Ishaan Jaff 2025-03-14 10:12:40 -07:00
parent aed8cd7ac6
commit 7d090c521d
2 changed files with 10 additions and 2 deletions

View file

@ -193,14 +193,14 @@ export const columns = (
accessorKey: "litellm_credential_name",
cell: ({ row }) => {
const model = row.original;
return model.litellm_params.litellm_credential_name ? (
return model.litellm_params && model.litellm_params.litellm_credential_name ? (
<div className="overflow-hidden">
<Tooltip title={model.litellm_params.litellm_credential_name}>
{model.litellm_params.litellm_credential_name.slice(0, 7)}...
</Tooltip>
</div>
) : (
"-"
<span className="text-gray-400">-</span>
);
},
},

View file

@ -128,6 +128,14 @@ export default function ModelInfoView({
if (!accessToken) return;
await modelDeleteCall(accessToken, modelId);
message.success("Model deleted successfully");
if (onModelUpdate) {
onModelUpdate({
deleted: true,
model_info: { id: modelId }
});
}
onClose();
} catch (error) {
console.error("Error deleting the model:", error);