Expand description
Named, cross-model sampling profiles.
A profile is a named, sparse InferenceConfig that a client selects per
request by appending :{name} to the model it asks for — qwen3.6:coding.
It exists because a single gglib proxy serves clients with incompatible
sampling needs: coding agents want low-temperature determinism while
conversational UIs want something warmer. Both hit the same model name, so
per-model inference_defaults alone cannot tell them apart.
The {name}:{variant} shape follows the existing council virtual models
(gglib-council:interactive) and Ollama’s universal name:tag convention,
which is what makes the variants render and select correctly in
OpenAI-compatible clients like OpenWebUI.
§Profiles are sparse
Only the fields a profile explicitly sets are Some; the rest stay None
and fall through to the layers below (per-model defaults, then global
settings, then the hardcoded fallback). This is what makes one global
profile safe to apply across heterogeneous model architectures: a coding
profile that sets only temperature and top_p still lets a thinking model
contribute its own presence_penalty from
InferenceConfig::reasoning_profile. A profile that carried a value for
every field would silently erase per-model tuning that exists for good
architectural reasons.
See InferenceConfig::resolve_with_profile for the full merge order.
Structs§
- Inference
Profile - A named sampling profile applied on top of a model’s own defaults.
Enums§
- Profile
Name Error - Why a profile name was rejected.
Constants§
- MAX_
PROFILE_ NAME_ LEN - Maximum length of a profile name.
- RESERVED_
PROFILE_ NAMES - Names that cannot be used for a profile because they already mean something
as a
:{suffix}on a model id.
Functions§
- builtin_
templates - Starting-point profiles a user can install and then edit.
- validate_
name - Validate a profile name.