@@ -523,11 +523,25 @@ export const MODELS_BY_PROVIDER: Record<
523523 xai : { id : "xai" , label : "xAI (Grok)" , models : Object . keys ( xaiModels ) } ,
524524 zai : { id : "zai" , label : "Zai" , models : Object . keys ( internationalZAiModels ) } ,
525525
526- // Models pulled from the respective APIs.
526+ // Dynamic providers; models pulled from the respective APIs.
527527 glama : { id : "glama" , label : "Glama" , models : [ ] } ,
528528 huggingface : { id : "huggingface" , label : "Hugging Face" , models : [ ] } ,
529529 litellm : { id : "litellm" , label : "LiteLLM" , models : [ ] } ,
530530 openrouter : { id : "openrouter" , label : "OpenRouter" , models : [ ] } ,
531531 requesty : { id : "requesty" , label : "Requesty" , models : [ ] } ,
532532 unbound : { id : "unbound" , label : "Unbound" , models : [ ] } ,
533533}
534+
535+ export const dynamicProviders = [
536+ "glama" ,
537+ "huggingface" ,
538+ "litellm" ,
539+ "openrouter" ,
540+ "requesty" ,
541+ "unbound" ,
542+ ] as const satisfies readonly ProviderName [ ]
543+
544+ export type DynamicProvider = ( typeof dynamicProviders ) [ number ]
545+
546+ export const isDynamicProvider = ( key : string ) : key is DynamicProvider =>
547+ dynamicProviders . includes ( key as DynamicProvider )
0 commit comments