litellm/ui/litellm-dashboard/src/lib
ryan-crabbe-berri 8c5473f198
feat(ui): adopt openapi-react-query ($api) and convert useCustomers (#32949)
* feat(ui): adopt openapi-react-query and convert useCustomers to $api

Add openapi-react-query and expose $api = createQueryClient(fetchClient)
alongside fetchClient. Rewrite useCustomers as
$api.useQuery("get", "/customer/list", {}, { enabled, select }), which
derives the query key from method + path (dropping the hand-written
createQueryKeys entry and the manual key) and forwards the request signal
for cancellation. The response type still flows from schema.d.ts as
CustomerResponse[]. Tests assert the path, the admin/token enabled gate,
and the empty-body select fallback.

* test(ui): read the last render's options in useCustomers helper

The lastCallOptions helper was named for the last call but read
mock.calls[0]. Harmless while each test renders once, but it would
silently assert against first-render options if a test ever re-renders.
Read the final call instead.
2026-07-11 18:01:33 -07:00
..
http feat(ui): adopt openapi-react-query ($api) and convert useCustomers (#32949) 2026-07-11 18:01:33 -07:00
assetPaths.test.ts fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
assetPaths.ts fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00
cva.config.ts feat(ui): shadcn migration foundation: Tailwind v4, shadcn init, antd cascade fix (#31995) 2026-07-02 19:02:27 -07:00
serverRootPath.ts fix(ui): render logos under a custom server_root_path (#31156) 2026-06-24 17:13:10 -07:00