yera.config.schema.models
Model schema — universe of all discovered models and runtime catalog view.
Symbols
BaseModelConfig
BaseModelFields common to all model types.
Attributes
Yera-internal dot-delimited identifier. Must have at least three
segments: <provider>.<author>.<model_name>, with optional
further nesting for variants e.g.
llama_cpp.meta.llama3.8b.q4_k_m. Does not encode the
connection name — that is stored separately in connection.
Provider-side model identifier passed directly to the API
or library, e.g. "claude-sonnet-4-20250514" or a HuggingFace
repo id like "meta-llama/Meta-Llama-3-8B-GGUF".
Human-readable display name, e.g. "Claude Sonnet 4".
Key into :class:~yera.config.schema.providers.Providers
identifying which provider serves this model, e.g. "aws".
Name of the provider connection under which this model
was discovered, e.g. "work". Together with provider,
uniquely identifies the runtime interface and credentials to use.
Who created the model, e.g. "anthropic" or "meta".
Distinct from provider — a Meta model can be served via AWS Bedrock.
Raises
If id has fewer than three dot-delimited segments.
Methods
BaseModelConfig.id_has_minimum_depth
id_has_minimum_depth(
v: str,
) → strCheck that id has at least three dot-delimited segments.
Parameters
The id string to validate.
Returns
The validated id string.
Raises
If the id has fewer than three segments.
BaseModelConfig.id_prefix_matches_provider
id_prefix_matches_provider() → BaseModelConfigCheck that the first segment of id matches provider.
Returns
The validated model config.
Raises
If the first segment of id does not match provider.
EmbeddingsConfig
BaseModelConfigConfig for an embeddings model.
Attributes
Discriminator field, always "embedding".
Size of the embedding vector produced by the model.
Maximum number of tokens the model can embed in a single request.
LLMConfig
BaseModelConfigConfig for a large language model.
Attributes
Discriminator field, always "llm".
Maximum number of tokens the model can process in a single request (prompt + completion).
Maximum number of tokens the model can generate.
Whether the model accepts image inputs.
ModelCatalogue
BaseModelRuntime view of the model universe filtered to the active Yera profile.
Never serialized — constructed by :meth:ModelsUniverse.for_profile.
Contains only models whose provider and connection match the
active Yera profile's provider map.
Attributes
Catalogue of large language models visible under the active profile.
Catalogue of embeddings models visible under the active profile.
Catalogue of text-to-speech models visible under the active profile.
Catalogue of speech-to-text models visible under the active profile.
Catalogue of reranker models visible under the active profile.
ModelsUniverse
BaseModelAll discovered models across all provider connections.
Serialized to and from yera.toml under [models]. Contains no
defaults — those live in :class:~yera.config.schema.profiles.Profile.
Attributes
All discovered large language models.
All discovered embeddings models.
All discovered text-to-speech models.
All discovered speech-to-text models.
All discovered reranker models.
Methods
ModelsUniverse.for_profile
for_profile(
profile: Profile,
) → ModelCatalogueBuild a filtered runtime ModelCatalogue for the active Yera profile.
Filters each model type list to models whose provider and
connection match an entry in the profile's provider map, then
inserts per-type defaults from the profile's model_defaults.
Parameters
The active Yera profile to filter and resolve against.
Returns
A ModelCatalogue containing only models visible under the active profile, with defaults populated from the profile.
RerankerConfig
BaseModelConfigConfig for a reranker model.
Attributes
Discriminator field, always "reranker".
STTConfig
BaseModelConfigConfig for a speech-to-text model.
Attributes
Discriminator field, always "stt".
TTSConfig
BaseModelConfigConfig for a text-to-speech model.
Attributes
Discriminator field, always "tts".
TypedCatalogue
BaseModel, Generic[M]A filtered runtime view of models of one type for the active Yera profile.
Never serialized — constructed at runtime by
:meth:ModelsUniverse.for_profile. The default field is populated
from the active :class:~yera.config.schema.profiles.Profile's
model_defaults.
Attributes
Models of this type visible under the active Yera profile.
Yera id of the default model for this type, sourced from
the active Yera profile. None if no default is configured —
a runtime error when a default is actually needed.
Methods
TypedCatalogue.default_exists
default_exists() → TypedCatalogueCheck that the default model id exists in models.
Returns
The validated catalogue.
Raises
If default is set but not present in models.