Expand description
LLM provider/model compatibility helpers.
Gestura supports multiple LLM providers. Some model ids are provider-specific
(e.g. grok-* for Grok, claude-* for Anthropic). This module provides a
best-effort guardrail to prevent persisting obviously invalid
(provider, model) pairs into session-scoped configuration.
Notes:
- This intentionally errs on the side of allowing unknown/custom model ids.
- Providers with user-defined model ids (e.g. Ollama) are treated as compatible.
Functionsยง
- infer_
provider_ from_ model_ id - Attempt to infer the provider a model id belongs to.
- is_
model_ compatible_ with_ provider - Returns
trueif themodel_idis compatible withprovider. - validate_
model_ for_ provider - Validate a (provider, model) pair and return a user-facing error on mismatch.