Expand description
Inference configuration types.
Defines shared types for configuring LLM inference parameters
(temperature, top_p, top_k, max_tokens, repeat_penalty,
presence_penalty, min_p).
This module provides the core InferenceConfig type that is reused across:
- Per-model defaults (
Model.inference_defaults) - Global settings (
Settings.inference_defaults) - Request-level overrides (flattened in
ChatProxyRequest) gglib proxy— per-request injection into OpenAI-format request bodiesgglib chat/gglib q— hierarchy resolution for the agentic loop
All surfaces resolve inference parameters through
InferenceConfig::resolve_with_profile, which is the single source of
truth for the hierarchy. InferenceConfig::resolve_with_defaults is the
same resolution with no profile selected, for surfaces that have no notion
of one.
Structs§
- Inference
Config - Inference parameters for LLM sampling.
- Model
Sampling Context - Everything about the target model that changes how sampling resolves, independent of any specific request.
Enums§
- Defaults
Origin - Whether a model’s stored
inference_defaultswere set by the user or written automatically at import time.
Functions§
- camel_
to_ 🔒snake - Convert a camelCase string to
snake_case. - snake_
to_ 🔒camel - Convert a
snake_casestring to camelCase.