mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
instant update delete model flow
This commit is contained in:
parent
aed8cd7ac6
commit
7d090c521d
2 changed files with 10 additions and 2 deletions
|
@ -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>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue