@@ -45,9 +45,13 @@ import {
4545import { useBlacklistedProviders } from '@/hooks/queries/allowed-providers'
4646import { useProviderModels } from '@/hooks/queries/providers'
4747import { useWorkspacePermissionsQuery } from '@/hooks/queries/workspace'
48- import { PROVIDER_DEFINITIONS } from '@/providers/models'
48+ import {
49+ DYNAMIC_MODEL_PROVIDERS ,
50+ getProviderModels ,
51+ PROVIDER_DEFINITIONS ,
52+ } from '@/providers/models'
4953import type { ProviderId } from '@/providers/types'
50- import { getAllProviderIds , getProviderFromModel , getProviderModels } from '@/providers/utils'
54+ import { getAllProviderIds , getProviderFromModel } from '@/providers/utils'
5155import type { ProviderName } from '@/stores/providers'
5256
5357const logger = createLogger ( 'AccessControl' )
@@ -256,15 +260,6 @@ function AccessControlSkeleton() {
256260 )
257261}
258262
259- /** Providers whose models are fetched at runtime (on row expand) rather than from {@link PROVIDER_DEFINITIONS}. */
260- const DYNAMIC_MODEL_PROVIDERS = new Set < ProviderName > ( [
261- 'ollama' ,
262- 'vllm' ,
263- 'litellm' ,
264- 'openrouter' ,
265- 'fireworks' ,
266- ] )
267-
268263interface ModelDenylistControls {
269264 isModelAllowed : ( model : string ) => boolean
270265 onToggleModel : ( model : string ) => void
@@ -391,7 +386,7 @@ function ProviderRow({
391386 const providerName =
392387 PROVIDER_DEFINITIONS [ providerId ] ?. name ||
393388 providerId . replace ( / - / g, ' ' ) . replace ( / \b \w / g, ( c ) => c . toUpperCase ( ) )
394- const isDynamic = DYNAMIC_MODEL_PROVIDERS . has ( providerId as ProviderName )
389+ const isDynamic = ( DYNAMIC_MODEL_PROVIDERS as readonly string [ ] ) . includes ( providerId )
395390 const checkboxId = `provider-${ providerId } `
396391
397392 return (
0 commit comments