tiers

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tiers holds per-session model tiering settings and tier constants (.agents/specs/009 TIER-01, TIER-02).

Index

Constants

View Source
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).

View Source
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

Tiers lists all valid tier names in ascending order of capability.

Functions

func ValidTier

func ValidTier(t string) bool

ValidTier reports whether t names a canonical model tier.

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

func (s Settings) Clone() Settings

Clone returns a deep copy of s so pointer fields cannot alias across callers.

func (Settings) DynamicEffortEnabled

func (s Settings) DynamicEffortEnabled() bool

DynamicEffortEnabled reports whether dynamic thinking effort dialing is enabled (defaults to true when unset; Implements: TIER-12).

func (Settings) EdgeCompressEnabled

func (s Settings) EdgeCompressEnabled() bool

EdgeCompressEnabled reports whether edge context compression is enabled.

func (Settings) EscalateEnabled

func (s Settings) EscalateEnabled() bool

EscalateEnabled reports whether waterfall/budget escalation is enabled (defaults to true when unset).

func (Settings) IsEnabled

func (s Settings) IsEnabled() bool

IsEnabled reports whether model tiering is enabled in s.

func (Settings) ModelFor

func (s Settings) ModelFor(tier string) string

ModelFor returns the explicit model override configured for tier, or "".

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

func (s Settings) VerifyDiffEnabled() bool

VerifyDiffEnabled reports whether asymmetric Frontier diff review is enabled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL