router-for-me/CLIProxyAPI · error

credential-in-flight.max-revision-bytes is outside hard boun

Error message

credential-in-flight.max-revision-bytes is outside hard bounds

What it means

Error "credential-in-flight.max-revision-bytes is outside hard bounds" thrown in router-for-me/CLIProxyAPI.

Source

Thrown at internal/config/credential_in_flight.go:71

		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 nil
}

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Set credential-in-flight.max-revision-bytes to a value inside the documented hard bounds.
  2. Check the surrounding validation code for the allowed minimum and maximum.

When it happens

Trigger: Thrown at internal/config/credential_in_flight.go:71 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/77b6b10f23cc12ff. Report an issue: GitHub.