litellm/ui/litellm-dashboard/src
ryan-crabbe-berri ffa3880b80 feat(ui): adopt openapi-react-query as the typed data-fetching client
Stands up the typed transport on top of the generated OpenAPI types and migrates
the first real hook to prove the pattern. src/lib/http/api.ts creates an
openapi-fetch client wrapped by openapi-react-query ($api); base URL stays
call-time via getProxyBaseUrl in an onRequest middleware (not a frozen
createClient baseUrl, which would break server-root-path and worker switching),
and the access token is passed per call via authHeader.

useInfiniteUsers now calls $api.useInfiniteQuery("get", "/user/list", ...) instead
of the hand-rolled userListCall: query params, the response body, and the user
rows are all typed from the spec, and the 11-arg positional call collapses into a
typed query object. Its infinite-query return shape is unchanged, so UsagePageView
is untouched. Global query errors route through QueryCache.onError into the
existing handleError, preserving the session-expiry logout behavior.

The test mocks fetch (installed via vi.hoisted because openapi-fetch captures
globalThis.fetch at client creation) and asserts the real request URLs, the bearer
header, pagination, and the error path.
2026-06-30 16:45:24 -07:00
..
app feat(ui): adopt openapi-react-query as the typed data-fetching client 2026-06-30 16:45:24 -07:00
components Merge pull request #31735 from BerriAI/litellm_lit_4057_router_settings_routing_groups_save 2026-06-30 15:39:56 -07:00
contexts feat(ui): adopt openapi-react-query as the typed data-fetching client 2026-06-30 16:45:24 -07:00
data style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
hooks fix(ui/mcp): reset OAuth state on create-server modal close so a prior server's token no longer leaks into the next add-server session (#30000) 2026-06-09 14:18:28 -07:00
lib feat(ui): adopt openapi-react-query as the typed data-fetching client 2026-06-30 16:45:24 -07:00
utils feat(ui): migrate api-keys landing to App Router path route (#30699) 2026-06-18 17:38:07 -07:00
types.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00