Skip to content

fix(agents): Handle null modelId in agent monitoring page#110505

Merged
priscilawebdev merged 1 commit intomasterfrom
priscilawebdev/fix/null-model-id-crash
Mar 12, 2026
Merged

fix(agents): Handle null modelId in agent monitoring page#110505
priscilawebdev merged 1 commit intomasterfrom
priscilawebdev/fix/null-model-id-crash

Conversation

@priscilawebdev
Copy link
Member

Handle null modelId in the ModelName component and getModelPlatform function
on the agent monitoring page.

The code assumed modelId was always a string, but span data can contain actual
null values. When a null modelId reached getModelPlatform, calling
.toLowerCase() on it threw a TypeError, crashing the page via React's
error boundary.

Adds null guards to both the render path and the platform lookup, and updates
the type to string | null to reflect reality.

The ModelName component and getModelPlatform function assumed modelId
was always a string, but span data can contain null values. This caused
a TypeError crash when calling .toLowerCase() on null.

Add null guards to both the render path and the platform lookup function,
and update the type to reflect that modelId can be null.

Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 12, 2026
@priscilawebdev priscilawebdev marked this pull request as ready for review March 12, 2026 07:03
@priscilawebdev priscilawebdev requested a review from a team as a code owner March 12, 2026 07:03
@priscilawebdev priscilawebdev enabled auto-merge (squash) March 12, 2026 07:03
@priscilawebdev priscilawebdev merged commit 8819a8e into master Mar 12, 2026
64 checks passed
@priscilawebdev priscilawebdev deleted the priscilawebdev/fix/null-model-id-crash branch March 12, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants