ExLLM.Infrastructure.Config.ModelLoader (ex_llm v0.8.1)
View SourceDynamic model loader for ExLLM adapters.
Provides functionality to:
- Fetch models from provider APIs where available
- Fall back to YAML configuration files
- Cache results to avoid repeated API calls
Summary
Functions
Clears the model cache for a specific provider or all providers.
Loads models for a provider, attempting API first then falling back to config.
Functions
Clears the model cache for a specific provider or all providers.
Loads models for a provider, attempting API first then falling back to config.
Options
:force_refresh
- Skip cache and fetch fresh data:api_fetcher
- Function to fetch from API: fn(options) -> {:ok, models} | {:error, reason}:config_transformer
- Function to transform config data to Types.Model structs