Expand description
Model capability detection and inference.
Capabilities describe model constraints derived from chat templates. Absence of a capability MUST NOT trigger behavior changes.
§Invariant
Message rewriting is only permitted when model capabilities explicitly forbid the current message structure. Default behavior is pass-through.
Structs§
- Chat
Message - A chat message for transformation.
- Model
Capabilities - Model capabilities inferred from chat template analysis.
Functions§
- infer_
from_ chat_ template - Infer model capabilities from chat template Jinja source and model name.
- merge_
consecutive_ 🔒system_ messages - Merge consecutive system messages into a single message.
- transform_
messages_ for_ capabilities - Transform chat messages based on model capabilities.