mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Entering a custom model name on the Add Model form crashed the whole page to "This page couldn't load" (React error #185, maximum update depth exceeded), taking the provider credential fields down with it, so the model could never be created. ConditionalPublicModelName kept a `tableKey` counter and bumped it from an effect on every run to force the mappings table to remount. That was harmless under antd, whose useWatch handed back the stored array. React Hook Form's useWatch returns a fresh array each render, so the effect's dependency changed every render, the effect bumped state again, and the render loop never settled. The table is driven by its `data` prop, so the remount counter buys nothing: drop it, key the effects off the selection contents rather than the array identity, and write model_mappings only when they actually change. The two `react-hooks/set-state-in-effect` suppressions on this file, which were recording exactly this bug, go with it. |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||