get_small_model
Function
This function is defined in the loader module.Resolve the auxiliary/“small” model for cheap internal LLM calls. Resolution order:
defaults.small_model(or the equivalentagent.small_modelCLI namespace) from the config file, if set.- The supplied
primary_model(e.g. the running agent’s model). defaults.model(oragent.model) from the config file, if set.fallback(preserves today’s hardcoded behaviour when nothing else is configured).
defaults.* (typed loader) and agent.* (CLI resolver / JSON
schema) namespaces are honoured because they read the same config file; a
user following schema autocomplete (agent.small_model) is therefore not
silently ignored.
This keeps internal calls (title generation, summarisation/compaction) on
a configured cheap model, and — when unset — on the primary model rather
than a hardcoded third-party default.
Signature
Parameters
Optional[str]
The primary model to fall back to when no auxiliary model is configured.
Optional[str]
Final fallback used only when neither
small_model nor a primary model is available.Returns
Optional[str]
The resolved auxiliary model identifier, or
fallback.Uses
get_default
Source
View on GitHub
praisonaiagents/config/loader.py at line 463
