router-for-me/CLIProxyAPI · error
credential-in-flight part bounds are invalid
Error message
credential-in-flight part bounds are invalid
What it means
Error "credential-in-flight part bounds are invalid" thrown in router-for-me/CLIProxyAPI.
Source
Thrown at internal/config/credential_in_flight.go:68
}
staleAfter, errStale := time.ParseDuration(c.StaleAfter)
if errStale != nil || staleAfter <= 0 || snapshotInterval > staleAfter/3 {
return 0, 0, 0, fmt.Errorf("credential-in-flight.stale-after must be at least three snapshot intervals")
}
stagingRetention, errRetention := time.ParseDuration(c.StagingRetention)
if errRetention != nil || stagingRetention <= 0 {
return 0, 0, 0, fmt.Errorf("credential-in-flight.staging-retention must be positive")
}
return snapshotInterval, staleAfter, stagingRetention, nil
}
// Validate verifies the in-flight observation bounds.
func (c CredentialInFlightConfig) Validate() error {
if _, _, _, errDurations := c.Durations(); errDurations != nil {
return errDurations
}
if c.MaxPartBytes < 1024 || c.MaxPartCount <= 0 || c.MaxPartCount > DefaultInFlightMaxPartCount {
return fmt.Errorf("credential-in-flight part bounds are invalid")
}
if c.MaxRevisionBytes < c.MaxPartBytes || c.MaxRevisionBytes > DefaultInFlightMaxRevisionBytes {
return fmt.Errorf("credential-in-flight.max-revision-bytes is outside hard bounds")
}
requiredParts := (c.MaxRevisionBytes + c.MaxPartBytes - 1) / c.MaxPartBytes
if requiredParts > c.MaxPartCount {
return fmt.Errorf("credential-in-flight.max-revision-bytes exceeds part capacity")
}
if c.MaxAggregateGroups <= 0 || c.MaxAggregateGroups > DefaultInFlightMaxAggregateGroups {
return fmt.Errorf("credential-in-flight.max-aggregate-groups is invalid")
}
if c.MaxDetails < 0 || c.MaxDetails > DefaultInFlightMaxDetails {
return fmt.Errorf("credential-in-flight.max-details is invalid")
}
if c.MaxStringBytes <= 0 || c.MaxStringBytes > DefaultInFlightMaxStringBytes {
return fmt.Errorf("credential-in-flight.max-string-bytes is invalid")
}
return nilView on GitHub (pinned to 78f0c4079e)
Solutions
- Adjust the credential-in-flight part size/count settings so they fall within valid bounds.
- Review the configuration validation rules for part bounds in credential_in_flight.go.
When it happens
Trigger: Thrown at internal/config/credential_in_flight.go:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/27df39e68219ee17.
Report an issue: GitHub.