litellm/ui/litellm-dashboard/src/components
ryan-crabbe-berri 7ed25de120
fix(ui): allow any git host on the skills add form (LIT-4053) (#31652)
* fix(ui): allow any git host on the skills add form (LIT-4053)

The skills add form only accepted GitHub URLs: its URL parser bailed on
any host that did not start with github.com, so GitLab, Bitbucket, and
self-hosted repos (and any repo subfolder on them) were rejected before a
request was ever sent. The backend already accepts arbitrary git hosts
via its url and git-subdir sources, with no host allowlist, so this was a
client-side restriction only.

Generalize the parser into an exported, host-agnostic parseSkillSource:
GitHub URLs keep their github / git-subdir shorthand, every other host is
treated as a raw repo url, and an optional Subfolder path field turns any
repo into a git-subdir source (url + path). When a pasted GitHub
tree/blob URL already encodes a subfolder, the field is cleared and
disabled so a contradictory source can never be submitted.

The parser is hardened to match the backend contract: query strings and
fragments are stripped, the host match is case-insensitive and drops a
leading www., the extracted and field-entered subfolder paths are both
validated against the same regex the server uses, a real file-extension
allowlist (not "any dot") decides whether a trailing blob segment is a
file, a branch-only tree URL falls back to the repo, non-GitHub URLs
require at least an org/repo, and the suggested skill name is kebab-cased
so it satisfies the name field's own rule.

The git-subdir source is now handled in the display helpers
(getSourceDisplayText, getSourceLink, formatInstallCommand), which
previously showed it as "Unknown source" with no link. The submit path
is fully typed (RegisterPluginRequest plus an AddPluginFormValues
interface), removing the two prior any usages; as a result an
author with an email but no name is dropped rather than sent, since the
backend requires the author name.

No backend changes. Tests cover the full host/subfolder matrix at the
parser level plus form-submit assertions on the exact source payload.

* refactor(ui): sync skill register types to the generated OpenAPI schema, surface backend errors

Replace the hand-maintained, already-drifted API types for the skills add
flow with the generated ones from schema.d.ts: PluginAuthor now aliases
components["schemas"]["PluginAuthor"], the registration payload is a new
SkillRegisterRequest (the generated RegisterPluginRequest envelope with
source narrowed to our PluginSource union, since the backend types source
as a loose string map, and version kept optional since the backend
defaults it), and the dead, mismatched RegisterPluginResponse is deleted.
registerClaudeCodePlugin's inline payload type (which was missing the
git-subdir path field entirely) is replaced with SkillRegisterRequest, so
the networking layer and the form can no longer drift from the backend.

Error handling: the add-skill form swallowed the real failure and always
showed "Failed to register skill". registerClaudeCodePlugin already
derives the backend message and throws it, so the form now surfaces it
("Failed to register skill: <reason>"), and the networking helper falls
back to the raw body / status when the error response is not JSON instead
of throwing a JSON parse error. A regression test asserts the backend
message reaches the user.

* fix(ui): reject credentialed git URLs on the skills form

A repo URL with embedded user-info (user:token@host) passed the raw-host
parser and was stored verbatim as the skill source, which is served on
the unauthenticated /public/skill_hub and marketplace.json feeds, leaking
the credentials. Reject any host segment containing '@'.

* fix(ui): validate skill repo URLs through one WHATWG URL gate

Replace the ad-hoc string parsing (stripScheme / splitHost / manual
scheme, @, ?# checks) with a single parseRepoUrl gate built on the URL
parser, so every malformed/unsafe class is handled in one place and the
URL stored on the public skill feeds is always canonical. It enforces
https (rejecting http/ssh/git/file/javascript/data and protocol-relative
//host), rejects embedded credentials (user:token@host, including
userinfo-confusion like github.com@evil.com), rejects IP-literal hosts
(loopback/private/metadata and obfuscated/IPv6 forms), and rebuilds the
stored url from origin+pathname so query strings, fragments, and trailing
slashes can never be published. The GitHub org/repo shorthand is now
charset-validated like the other paths, so junk can't reach the stored
repo. Closes both Veria findings (credentialed and http sources) plus the
adversarial-review follow-ups, with regression tests for each class.
2026-06-30 10:29:49 -07:00
..
add_model chore(oss): litellm oss staging 120626 (#30292) 2026-06-12 09:49:25 -07:00
agent_management style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
agents feat(a2a): support a2a-sdk 1.x proxy routing for 0.3 and 1.0 agents (#30950) 2026-06-29 09:32:39 +05:30
AIHub fix(mcp): stop exposing MCP server URLs on the AI Hub and public hub API (#30902) 2026-06-22 11:01:49 -07:00
alerting style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
atoms style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
chat_ui feat(ui): migrate playground to path routing and colocate its files (#30185) 2026-06-11 12:07:17 -07:00
claude_code_plugins fix(ui): allow any git host on the skills add form (LIT-4053) (#31652) 2026-06-30 10:29:49 -07:00
CloudZeroCostTracking [Fix] UI: Migrate AntD message API to use context-based MessageManager 2026-03-19 23:29:38 -07:00
common_components feat(ui): migrate playground to path routing and colocate its files (#30185) 2026-06-11 12:07:17 -07:00
DeletedKeysPage style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
DeletedTeamsPage style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
edit_auto_router feat(ui): migrate playground to path routing and colocate its files (#30185) 2026-06-11 12:07:17 -07:00
email_events
EntityUsageExport fix(ui): stop per-model usage export from duplicating user spend across models (#30980) 2026-06-22 11:26:54 -07:00
guardrails fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
GuardrailsMonitor feat(ui): migrate budgets, workflows, and guardrails-monitor to path routes (#30236) 2026-06-11 14:27:40 -07:00
key_team_helpers fix(ui): keep virtual-keys filters across delete and refresh (LIT-4080) (#31533) 2026-06-29 12:44:31 -07:00
KeyAliasSelect/PaginatedKeyAliasSelect style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
llm_calls feat(ui): migrate playground to path routing and colocate its files (#30185) 2026-06-11 12:07:17 -07:00
mcp_server_management feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-22 17:08:28 -07:00
mcp_tools fix(mcp): resolve toolset tools by the server's known prefix (#31254) 2026-06-24 20:50:16 -07:00
model_add fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
model_dashboard style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
ModelSelect style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
molecules fix(ui): keep virtual-keys filters across delete and refresh (LIT-4080) (#31533) 2026-06-29 12:44:31 -07:00
Navbar feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
organisms feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-22 17:08:28 -07:00
organization style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
permissions feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-22 17:08:28 -07:00
policies style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
router_settings fix(router): persist global retry_policy via /config/update (#29540) 2026-06-28 00:20:20 +00:00
routing_groups refactor(ui): consolidate dashboard to one shell in the (dashboard) layout (#30166) 2026-06-10 18:37:44 -07:00
search_tools refactor(ui): colocate search-tools into route-level _components (#31658) 2026-06-29 18:15:27 -07:00
Settings feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
shared style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
tag_management chore: antd modal deprecated props 2026-02-02 19:04:18 -08:00
team refactor(ui): colocate search-tools into route-level _components (#31658) 2026-06-29 18:15:27 -07:00
templates fix(ui): keep virtual-keys filters across delete and refresh (LIT-4080) (#31533) 2026-06-29 12:44:31 -07:00
ToolPolicies style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
ui style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
UsagePage chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
vector_store_management fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
view_logs Merge pull request #31426 from BerriAI/litellm_/cranky-hamilton-21b5d0 2026-06-30 10:23:38 -07:00
view_model
view_users style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
VirtualKeysPage perf(ui): load virtual-keys team filter from the fast v2 endpoint (#31638) 2026-06-29 20:27:31 +00:00
activity_metrics.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
activity_metrics.tsx chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
add_pass_through.tsx feat(passthrough): add configurable pass-through request timeouts (#30266) 2026-06-12 07:40:02 -07:00
AdminPanel.test.tsx rename admins to AdminPanel 2026-02-05 21:11:26 -08:00
AdminPanel.tsx feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
agents.test.tsx fix(agents): show an agent's attached virtual key in the UI (#29619) 2026-06-27 16:44:25 -07:00
agents.tsx fix(agents): show an agent's attached virtual key in the UI (#29619) 2026-06-27 16:44:25 -07:00
bulk_create_users_button.test.tsx Change Bulk Invite User Roles to match backend (#16906) 2025-11-21 20:00:57 -08:00
bulk_create_users_button.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
BulkEditUsers.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
BulkEditUsers.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
callback_info_helpers.tsx fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
claude_code_plugins.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
cloudzero_export_modal.tsx chore: antd modal deprecated props 2026-02-02 19:04:18 -08:00
constants.tsx
CreateUserButton.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
CreateUserButton.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
DebugWarningBanner.test.tsx fix(ui): fetch version + debug flag from /health/readiness/details (#27896) 2026-05-13 20:33:23 -07:00
DebugWarningBanner.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
DefaultUserSettings.test.tsx Add All Proxy Models To Default User Settings 2025-12-12 13:15:25 -08:00
DefaultUserSettings.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
edit_user.tsx chore: antd modal deprecated props 2026-02-02 19:04:18 -08:00
email_settings.tsx
general_settings.tsx feat(ui): migrate agents and router-settings to path routes (#30323) 2026-06-12 18:01:00 -07:00
guardrails.test.tsx test(ui): fix guardrails.test.tsx after antd Tabs migration 2026-04-04 16:32:55 -07:00
guardrails.tsx fix(ui): default guardrails page to first tab for admins, not submitted (#29872) 2026-06-07 01:10:17 +00:00
GuardrailSettingsView.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
HelpLink.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
HelpLink.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
key_info_utils.test.tsx Add Tags To Edit Key Flow (#16500) 2025-11-11 17:44:29 -08:00
key_info_utils.tsx Add Tags To Edit Key Flow (#16500) 2025-11-11 17:44:29 -08:00
key_value_input.tsx
leftnav.test.tsx Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/pensive-bartik-e24048 2026-04-29 19:25:20 -07:00
leftnav.tsx fix(ui): unify migrated-route URLs and migrate the API Reference page (#29953) 2026-06-08 13:05:12 -07:00
logging_settings_view.tsx fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
mcp_hub_table_columns.test.tsx fix(mcp): stop exposing MCP server URLs on the AI Hub and public hub API (#30902) 2026-06-22 11:01:49 -07:00
mcp_hub_table_columns.tsx fix(mcp): stop exposing MCP server URLs on the AI Hub and public hub API (#30902) 2026-06-22 11:01:49 -07:00
model_filters.tsx
model_group_alias_settings.tsx
model_hub_table_columns.tsx refactor pt2 2026-01-01 12:42:22 -08:00
model_info_view.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
model_info_view.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
navbar.test.tsx refactor(ui): consolidate dashboard to one shell in the (dashboard) layout (#30166) 2026-06-10 18:37:44 -07:00
navbar.tsx feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
networking.test.ts Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
networking.tsx fix(ui): allow any git host on the skills add form (LIT-4053) (#31652) 2026-06-30 10:29:49 -07:00
object_permissions_view.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
OldTeams.test.tsx fix(ui): keep team Organization optional for proxy admins in single-org setups (#30861) 2026-06-23 10:33:31 -07:00
OldTeams.tsx refactor(ui): colocate search-tools into route-level _components (#31658) 2026-06-29 18:15:27 -07:00
onboarding_link.tsx Migrate user management buttons from Tremor to Ant Design 2026-03-09 17:20:48 -07:00
organizations.test.tsx feat(ui): cut the organizations page over to the /ui/organizations path route (#30336) 2026-06-13 14:04:04 -07:00
organizations.tsx feat(ui): cut the organizations page over to the /ui/organizations path route (#30336) 2026-06-13 14:04:04 -07:00
page_metadata.ts fix(ui): route API Reference back to query-param page (#28726) 2026-05-26 09:27:30 -07:00
page_utils.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
page_utils.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
pass_through_info.tsx feat(passthrough): add configurable pass-through request timeouts (#30266) 2026-06-12 07:40:02 -07:00
pass_through_settings.tsx feat(passthrough): add configurable pass-through request timeouts (#30266) 2026-06-12 07:40:02 -07:00
per_user_usage.tsx
price_data_reload.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
provider_info_helpers.test.tsx fix(ui): stop listing bedrock_mantle models under the Bedrock provider (#31478) 2026-06-26 15:51:03 -07:00
provider_info_helpers.tsx fix(ui): stop listing bedrock_mantle models under the Bedrock provider (#31478) 2026-06-26 15:51:03 -07:00
public_model_hub.test.tsx fix(mcp): stop exposing MCP server URLs on the AI Hub and public hub API (#30902) 2026-06-22 11:01:49 -07:00
public_model_hub.tsx fix(mcp): stop exposing MCP server URLs on the AI Hub and public hub API (#30902) 2026-06-22 11:01:49 -07:00
query_param_input.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
route_preview.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
SCIM.tsx
settings.test.tsx UI Cloud Zero Integration 2025-12-17 19:03:39 -08:00
settings.tsx fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
skill_hub_table_columns.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
SSOModals.test.tsx fixing build 2026-01-02 14:00:55 -08:00
SSOModals.tsx chore: antd modal deprecated props 2026-02-02 19:04:18 -08:00
TeamSSOSettings.test.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
TeamSSOSettings.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
ToolDetail.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
ToolPolicies.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
ToolPoliciesView.test.tsx Add unit tests for 5 previously untested UI components 2026-03-13 22:48:50 -07:00
ToolPoliciesView.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
UIAccessControlForm.tsx
UIAccessControlForm.unit.test.tsx
usage.tsx fix(ui): repoint dead usage guide link to cost tracking docs (#30859) 2026-06-19 15:31:48 -07:00
UsageIndicator.test.tsx Fixing content filter guardrail update 2026-02-11 15:37:57 -08:00
UsageIndicator.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
user_agent_activity.test.tsx Change usage page to have a parent date picker (#16264) 2025-11-07 10:00:37 -08:00
user_agent_activity.tsx Change usage page to have a parent date picker (#16264) 2025-11-07 10:00:37 -08:00
user_dashboard.test.tsx fix(ui): keep virtual-keys filters across delete and refresh (LIT-4080) (#31533) 2026-06-29 12:44:31 -07:00
user_dashboard.tsx fix(ui): keep virtual-keys filters across delete and refresh (LIT-4080) (#31533) 2026-06-29 12:44:31 -07:00
user_edit_view.test.tsx test(ui): preserve global Button/Tooltip mocks in per-file @tremor/react vi.mock 2026-05-14 14:01:02 -07:00
user_edit_view.tsx style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
vector_store_providers.tsx fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
view_user_spend.tsx Show user budget on usage 2025-12-31 17:27:58 -08:00
view_users.test.tsx feat(ui): cut the users page over to the /ui/users path route (#30334) 2026-06-12 18:19:31 -07:00
view_users.tsx feat(ui): cut the users page over to the /ui/users path route (#30334) 2026-06-12 18:19:31 -07:00