Skip to main content

Module policy

Module policy 

Source
Expand description

Policy - status, rank, and primary-agent eligibility for known models.

This module owns the bundled policy record (feedback 01/02/05/06): the status, rank, default flag, and primary-agent eligibility of every model the project has an explicit opinion about. Unknown models default to Available; the policy never claims a model is ineligible unless a policy entry says so. The JSON contract serializes as snake_case so the CLI and the Hermes plugin can consume it without transformation.

Structs§

ModelPolicy
Versioned policy document - the JSON contract envelope for policy get.
PolicyEntry
One policy opinion about one model.
RankingBreakdown
Evidence breakdown for one model’s ranking_score - the picker renders one line per component from this struct, so every ranking decision is explainable (feedback 02 evidence lines).

Enums§

ModelStatus
Picker status for a model (feedback 02 status vocabulary).

Constants§

POLICY_VERSION
Version of the bundled default policy document (feedback 02 YAML version: 1).
REFERENCE_CONTEXT_TOKENS
Context window (tokens) that normalizes to 1.0 - DeepSeek V4 Flash’s advertised window. Anything at or beyond this caps at 1.0.
REFERENCE_LATENCY_MS
Median latency (ms) at or beyond which the latency score is 0.0 (60s).
REFERENCE_PRICE_PER_MILLION
Average per-million-token price (USD) at or beyond which the price score is 0.0.
WEIGHT_CONTEXT
Weight of the context-window suitability component.
WEIGHT_DELIVERY
Weight of the recent-delivery component in the provider ranking score (feedback 02: score = 0.40R + 0.25T + 0.15C + 0.10L + 0.10P).
WEIGHT_LATENCY
Weight of the latency component.
WEIGHT_PRICE
Weight of the price/value component.
WEIGHT_TOOL_LOOP
Weight of the multi-turn tool-loop conformance component.

Functions§

ranking_score
Provider ranking score (feedback 02: score = 0.40R + 0.25T + 0.15C + 0.10L + 0.10P).