Skip to main content

Module prompt_dialect

Module prompt_dialect 

Source
Expand description

Per-model prompt dialect engine (uar-next-fable §2.1).

Different model families have documented, web-verified preferences for how prompts and reasoning are expressed at the API layer. Treating every model as an interchangeable black box leaves capability on the table. This module detects a model’s dialect from its id and produces the extra request parameters that dialect wants — reasoning-persistence toggles, structured output hints, thinking-effort levels — as a JSON object the driver merges into the outbound request body.

Only web-verified parameters are encoded here (see the fable doc’s §2.3: encode NO numbers from the model-comparison document). Values that vary by provider deployment (e.g. Qwen’s DashScope extra_body vs vLLM chat_template_kwargs split) are surfaced as flags for the driver, not hardcoded, since the correct wrapper depends on the endpoint.

Structs§

DialectRequest
Options controlling dialect parameter generation for one request.
PromptDialectEngine
The prompt dialect engine: detect dialect, emit per-model request params.
PromptTemplateResolver
Deterministic exact/family/generic template registry.
ResolvedPromptTemplate
Profile and provenance selected for one destination.
TemplateDestination
Exact trusted-host destination identity used for template resolution.
TemplateOverridePolicy
Host policy allow-list for descriptor and operator template overrides.
TemplateOverrideRequest
One requested template override carried from a trusted compiler/operator boundary. The model cannot create this value.

Enums§

PromptDialect
The prompt dialect a model family prefers.
TemplateOverrideProvenance
Origin of a host-constrained template override.
TemplateResolutionError
Explicit profile resolution failure. No variant authorizes dispatch.
TemplateResolutionSource
Why one profile won resolution.