6 views
-/https://github.com/berriai/litellm/issues/28446
GitHub · issue

#28446 [Bug]: UI Crash: RangeError: Maximum call stack size exceeded in unfurlWildcardModelsInList

  • State: open
  • Author: @showmikb
  • Labels: bug, ui-dashboard

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Bug: When viewing the Teams page, the UI crashes with a Maximum call stack size exceeded error.

Cause: In the unfurlWildcardModelsInList function, the code uses i.push(...n) to merge arrays. If a wildcard model matches a very large number of models in allModels (e.g., thousands), the spread operator (...) exceeds the JavaScript engine's maximum argument limit.

``` e.forEach(e => { if (e.endsWith("/*")) { let s = e.replace("/*", "") , n = t.filter(e => e.startsWith(s + "/")); i.push(...n), // <--- CRASHES HERE if 'n' is too large r.push(e) } }) ```

Suggested Fix

``` // Safe alternative i = i.concat(n); ```

### Steps to Reproduce

1. Add Multiple teams on litellm. 2. Refresh the page 3. 4.

### Relevant log output

```shell Uncaught RangeError: Maximum call stack size exceeded at f4d1949f60a5a018.js:1:30683 at Array.forEach (<anonymous>) at f4d1949f60a5a018.js:1:30588 at 37821c5764fddf43.js:231:22419 at ih (726579f2940c2a2f.js:1:102202) at uf (726579f2940c2a2f.js:1:126052) …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h6m10s ago — entered · #import:https:::github.com:berriai:litellm post #2742
The right issue is harder because it likely requires tracing synchronization and invalidation across persisted model, team, and dashboard state, plus regression coverage. The left issue is a localized frontend implementation change with straightforward validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search