Documentation
¶
Overview ¶
Package tiers holds per-session model tiering settings and tier constants (.agents/specs/009 TIER-01, TIER-02).
Index ¶
- Constants
- Variables
- func ValidTier(t string) bool
- type Settings
- func (s Settings) Clone() Settings
- func (s Settings) DynamicEffortEnabled() bool
- func (s Settings) EdgeCompressEnabled() bool
- func (s Settings) EscalateEnabled() bool
- func (s Settings) IsEnabled() bool
- func (s Settings) ModelFor(tier string) string
- func (s Settings) Resolve(base config.TiersConfig) Settings
- func (s Settings) VerifyDiffEnabled() bool
Constants ¶
const ( // Lightweight is the fast, low-cost tier for extraction, scaffolding, // summaries, suggestions, and edge compression. Lightweight = "lightweight" // Mid is the balanced tier for hub orchestration and core engineering. Mid = "mid" // Frontier is the highest-capability tier for planning, specs, critique, // and escalation diagnosis. Frontier = "frontier" )
Model complexity tiers (.agents/specs/009 TIER-02).
const ( KeyEnabled = "tier:enabled" KeyLightweight = "tier:lightweight" KeyMid = "tier:mid" KeyFrontier = "tier:frontier" KeyEscalate = "tier:escalate" KeyEscalateAfterFailures = "tier:escalate_after_failures" KeyEscalateBudgetPct = "tier:escalate_budget_pct" KeyEdgeCompress = "tier:edge_compress" KeyEdgeCompressBytes = "tier:edge_compress_bytes" KeyVerifyDiff = "tier:verify_diff" KeyDynamicEffort = "tier:dynamic_effort" )
Per-session tier setting names, as status output and the specification spell them (.agents/specs/009 TIER-01).
Variables ¶
var Tiers = []string{Lightweight, Mid, Frontier}
Tiers lists all valid tier names in ascending order of capability.
Functions ¶
Types ¶
type Settings ¶
type Settings struct {
// Enabled overrides [tiers].enabled for this session (tier:enabled).
Enabled *bool `json:"enabled,omitempty"`
// Lightweight overrides [tiers].lightweight (tier:lightweight).
Lightweight string `json:"lightweight,omitempty"`
// Mid overrides [tiers].mid (tier:mid).
Mid string `json:"mid,omitempty"`
// Frontier overrides [tiers].frontier (tier:frontier).
Frontier string `json:"frontier,omitempty"`
// Escalate enables/disables waterfall and budget-cap escalation (tier:escalate).
// Unset defaults to true when tiering is enabled.
Escalate *bool `json:"escalate,omitempty"`
// EscalateAfterFailures overrides [tiers].escalate_after_failures.
EscalateAfterFailures int `json:"escalate_after_failures,omitempty"`
// EscalateBudgetPct overrides [tiers].escalate_budget_pct.
EscalateBudgetPct int `json:"escalate_budget_pct,omitempty"`
// EdgeCompress overrides [tiers].edge_compress (tier:edge_compress).
EdgeCompress *bool `json:"edge_compress,omitempty"`
// EdgeCompressBytes overrides [tiers].edge_compress_bytes.
EdgeCompressBytes int `json:"edge_compress_bytes,omitempty"`
// VerifyDiff overrides [tiers].verify_diff (tier:verify_diff).
VerifyDiff *bool `json:"verify_diff,omitempty"`
// DynamicEffort overrides [tiers].dynamic_effort (tier:dynamic_effort).
// Unset defaults to true when tiering is enabled (Implements: TIER-12).
DynamicEffort *bool `json:"dynamic_effort,omitempty"`
}
Settings are a session's model tiering overrides (Implements: TIER-01). Unset fields defer to global tiers configuration when Resolve is called.
func (Settings) Clone ¶
Clone returns a deep copy of s so pointer fields cannot alias across callers.
func (Settings) DynamicEffortEnabled ¶
DynamicEffortEnabled reports whether dynamic thinking effort dialing is enabled (defaults to true when unset; Implements: TIER-12).
func (Settings) EdgeCompressEnabled ¶
EdgeCompressEnabled reports whether edge context compression is enabled.
func (Settings) EscalateEnabled ¶
EscalateEnabled reports whether waterfall/budget escalation is enabled (defaults to true when unset).
func (Settings) Resolve ¶
func (s Settings) Resolve(base config.TiersConfig) Settings
Resolve overlays s's per-session overrides onto base (tiers config) and fills default values for any unset fields (Implements: TIER-01, TIER-12).
func (Settings) VerifyDiffEnabled ¶
VerifyDiffEnabled reports whether asymmetric Frontier diff review is enabled.