JuliusBrussee/caveman · error
session_id and model required
Error message
session_id and model required
What it means
Error "session_id and model required" thrown in JuliusBrussee/caveman.
Source
Thrown at cacheengine/cachebench/corpus.go:317
func decodeOneJSON(raw []byte, destination any) error {
if !validUniqueJSONObject(raw) {
return errors.New("duplicate or invalid JSON")
}
decoder := json.NewDecoder(bytes.NewReader(raw))
if err := decoder.Decode(destination); err != nil {
return err
}
var trailing any
if err := decoder.Decode(&trailing); err != io.EOF {
return errors.New("trailing JSON")
}
return nil
}
func validateCorpusWire(wire lmcacheRowWire, index int, limits CorpusLimits) (CorpusRow, error) {
if !validBoundedText(wire.SessionID, 2048, false) || !validBoundedText(wire.Model, 512, false) {
return CorpusRow{}, errors.New("session_id and model required")
}
if wire.OutputLength < 0 || math.IsNaN(wire.PreGap) || math.IsInf(wire.PreGap, 0) || wire.PreGap < 0 || wire.PreGap > maxCorpusGapSeconds {
return CorpusRow{}, fmt.Errorf("output_length must be non-negative and pre_gap must be within 0..%d seconds", maxCorpusGapSeconds)
}
if len(wire.Input) == 0 || !json.Valid(wire.Input) {
return CorpusRow{}, errors.New("input must be valid non-empty message array")
}
if len(wire.SessionID)+len(wire.Model)+len(wire.Input) > limits.MaxRowBytes {
return CorpusRow{}, fmt.Errorf("row exceeds byte limit %d", limits.MaxRowBytes)
}
var messages []CorpusMessage
if err := json.Unmarshal(wire.Input, &messages); err != nil {
return CorpusRow{}, fmt.Errorf("decode input: %w", err)
}
if len(messages) == 0 || len(messages) > limits.MaxMessagesPerRequest {
return CorpusRow{}, fmt.Errorf("message count %d outside 1..%d", len(messages), limits.MaxMessagesPerRequest)
}
for messageIndex, message := range messages {View on GitHub (pinned to 27d5a3981a)
Solutions
- Provide both session_id and model.
When it happens
Trigger: Thrown at cacheengine/cachebench/corpus.go:317 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/a359cb0b754a708a.
Report an issue: GitHub.