litellm/ui/litellm-dashboard/src/hooks
devin-ai-integration[bot] 2d82915084
fix(mcp): bind OAuth clients to their upstream issuer (#37777)
* feat(mcp): advertise the SDK's latest spec revision and validate the RFC 9207 iss

MCPSpecVersion stopped at 2025-06-18 while the pinned SDK negotiates 2025-11-25, and the version LiteLLM puts on its own outbound initialize was a hardcoded historical member. Add the missing revision, name the highest revision we speak once, and pin it to the SDK's LATEST_PROTOCOL_VERSION with a test so the two cannot drift apart silently.

/authorize now seals the issuer it sent the user to into the OAuth state, and /callback holds the authorization response's RFC 9207 iss against it, refusing to forward a code that came back from an authorization server we never sent the user to. An absent iss, an unanchored server row and a state minted before the seal all keep their current behavior.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(mcp): keep params, query and fragment significant in issuer comparison

The shared canonicalizer drops all three, so two issuers differing only outside the path compared equal and a response from another tenant's authorization server would have continued through the flow.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(mcp): refresh generated API snapshots

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(mcp): cover OAuth client isolation and lint checks

* fix(mcp): preserve registered clients in the existing save payload

* test(mcp): cover optional OAuth registration metadata

* fix(mcp): preserve compatible OAuth registrations across edits

* fix(mcp): retain OAuth state through pending authorization

* fix(mcp): guard pending OAuth at form submission

* fix(mcp): discard canceled OAuth edit snapshots

* test(mcp): preserve complete OAuth registration assertions

* refactor(mcp): construct OAuth credential updates without mutation

* fix(mcp): simplify issuer binding and reject unverifiable callbacks

* fix(mcp): preserve replacement clients and pending redirect bindings

* fix(mcp): retain clients with replacement authentication methods

* fix(mcp): preserve cached clients and pin manual OAuth issuers

---------

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-10-05 10:25:47 -07:00
..
policies refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
mcpOAuthUtils.ts fix(mcp): let non-creator users OAuth into OBO-mode MCP servers from the Tools page (#29867) 2026-06-08 13:35:49 -07:00
use-safe-layout-effect.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
useMcpOAuthFlow.test.tsx fix(mcp): bind OAuth clients to their upstream issuer (#37777) 2026-10-05 10:25:47 -07:00
useMcpOAuthFlow.tsx fix(mcp): bind OAuth clients to their upstream issuer (#37777) 2026-10-05 10:25:47 -07:00
useNow.ts refactor(ui): reorganize Lens dashboard components (#44354) 2026-10-03 08:29:16 +00:00
useSyntaxTheme.test.tsx feat(ui): add a light/dark/system theme toggle to the top bar (#37669) 2026-08-20 12:58:29 -07:00
useSyntaxTheme.ts feat(ui): add a light/dark/system theme toggle to the top bar (#37669) 2026-08-20 12:58:29 -07:00
useTestMCPConnection.tsx refactor(ui): useTestMCPConnection uses the shared isClientForwardedTokenMode helper 2026-07-09 13:51:03 -07:00
useToolsOAuthFlow.test.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useToolsOAuthFlow.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useUrlTab.test.tsx feat(ui): shared URL-state layer for tables and tabs 2026-09-16 15:51:45 -07:00
useUrlTab.ts feat(ui): shared URL-state layer for tables and tabs 2026-09-16 15:51:45 -07:00
useUserMcpOAuthFlow.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useVisitedTabs.ts fix(ui): keep tab panel state across tab switches on the migrated routes 2026-07-23 23:16:34 -07:00
useWorker.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00