mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +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",
|
accessorKey: "litellm_credential_name",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const model = row.original;
|
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">
|
<div className="overflow-hidden">
|
||||||
<Tooltip title={model.litellm_params.litellm_credential_name}>
|
<Tooltip title={model.litellm_params.litellm_credential_name}>
|
||||||
{model.litellm_params.litellm_credential_name.slice(0, 7)}...
|
{model.litellm_params.litellm_credential_name.slice(0, 7)}...
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
"-"
|
<span className="text-gray-400">-</span>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -128,6 +128,14 @@ export default function ModelInfoView({
|
||||||
if (!accessToken) return;
|
if (!accessToken) return;
|
||||||
await modelDeleteCall(accessToken, modelId);
|
await modelDeleteCall(accessToken, modelId);
|
||||||
message.success("Model deleted successfully");
|
message.success("Model deleted successfully");
|
||||||
|
|
||||||
|
if (onModelUpdate) {
|
||||||
|
onModelUpdate({
|
||||||
|
deleted: true,
|
||||||
|
model_info: { id: modelId }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onClose();
|
onClose();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error deleting the model:", error);
|
console.error("Error deleting the model:", error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue