JuliusBrussee/caveman · error
required session-value feature %q unavailable
Error message
required session-value feature %q unavailable
What it means
sessionValueVector found a feature marked Required in the artifact's specs that is either absent from the state map or present with Available=false. The model cannot impute required features (only optional ones get synthesized missing-values), so prediction fails closed rather than silently degrading.
Source
Thrown at proxy/routing/session_value.go:419
return SessionValuePrediction{}, errors.New("session-value prediction non-finite")
}
}
return prediction, nil
}
func sessionValueVector(specs []SessionValueFeatureSpec, state map[string]SessionValueFeatureValue) ([]float64, []float64, error) {
for name := range state {
if _, known := sessionValueFeatureVocabulary[name]; !known {
return nil, nil, fmt.Errorf("unknown session-value feature %q", name)
}
}
values := make([]float64, len(specs))
missing := make([]float64, len(specs))
for i, spec := range specs {
feature, present := state[spec.Name]
if !present || !feature.Available {
if spec.Required {
return nil, nil, fmt.Errorf("required session-value feature %q unavailable", spec.Name)
}
missing[i] = 1
continue
}
if !finite(feature.Value) || feature.Value < spec.Min || feature.Value > spec.Max {
return nil, nil, fmt.Errorf("session-value feature %q outside artifact bounds", spec.Name)
}
values[i] = (feature.Value - spec.Mean) / spec.Scale
}
return values, missing, nil
}
func sessionValueEligibilityReason(features Features, candidate Candidate, baselineUnit float64, policy FrontierPolicy) string {
if candidate.Provider == "" || candidate.Model == "" || unitPrice(candidate.Price) <= 0 {
return "unpriced_or_invalid_candidate"
}
if !policy.AllowCrossProvider && candidate.Provider != features.Provider {
return "cross_provider_disabled"View on GitHub (pinned to 766dce6b13)
Solutions
- Ensure the feature extractor populates all required features and marks them Available before calling prediction
- If the feature genuinely can be absent, regenerate the artifact with that feature marked optional
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at proxy/routing/session_value.go:419 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18).
Data as JSON: /api/errors/7258c45cf299afd0.
Report an issue: GitHub.