Skip to content

Commit 0938089

Browse files
committed
fix: invalidate models
1 parent a65290b commit 0938089

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/features/providers/hooks/use-invalidate-providers-queries.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { v1ListProviderEndpointsQueryKey } from '@/api/generated/@tanstack/react-query.gen'
1+
import {
2+
v1ListAllModelsForAllProvidersQueryKey,
3+
v1ListProviderEndpointsQueryKey,
4+
} from '@/api/generated/@tanstack/react-query.gen'
25
import { useQueryClient } from '@tanstack/react-query'
36
import { useCallback } from 'react'
47
import { invalidateQueries } from '../../../lib/react-query-utils'
@@ -7,7 +10,10 @@ export function useInvalidateProvidersQueries() {
710
const queryClient = useQueryClient()
811

912
const invalidate = useCallback(async () => {
10-
invalidateQueries(queryClient, [v1ListProviderEndpointsQueryKey])
13+
invalidateQueries(queryClient, [
14+
v1ListProviderEndpointsQueryKey,
15+
v1ListAllModelsForAllProvidersQueryKey,
16+
])
1117
}, [queryClient])
1218

1319
return invalidate

0 commit comments

Comments
 (0)