paperclipai/paperclip · error · PaperclipRunnerProviderProfileError

${label} must be an integer between 1 and ${maximum}.

Error message

${label} must be an integer between 1 and ${maximum}.

What it means

Generic validation helper boundedPositiveInteger in provider-profile.ts: any provider-profile numeric option that is provided must be a safe integer in 1..maximum; otherwise a PaperclipRunnerProviderProfileError with the given code is thrown. It fires on out-of-range, non-integer, or wrong-typed values for options like spend ceilings and timeouts; the input at fault is the `value` argument.

Source

Thrown at server/src/services/native-runtime/provider-profile.ts:164

  }
  return parsed;
}

function boundedPositiveInteger(
  value: unknown,
  fallback: number,
  maximum: number,
  code: string,
  label: string,
): number {
  if (value === undefined || value === null || value === "") return fallback;
  if (
    typeof value !== "number"
    || !Number.isSafeInteger(value)
    || value <= 0
    || value > maximum
  ) {
    throw new PaperclipRunnerProviderProfileError(
      code,
      `${label} must be an integer between 1 and ${maximum}.`,
    );
  }
  return value;
}

function assertPermissionMode(
  provider: PaperclipRunnerProvider,
  config: Record<string, unknown>,
): void {
  const capability = PAPERCLIP_RUNNER_PERMISSION_CAPABILITIES[provider];
  if (!capability.configurable) return;
  const configured = config[capability.configKey];
  if (
    configured !== undefined
    && resolvePaperclipRunnerPermissionMode(provider, configured) !== configured
  ) {

View on GitHub (pinned to 01ad858492)

Solutions

  1. Pass a positive safe integer within the stated maximum for the option.
  2. Omit the value (undefined/null/'') so the built-in fallback applies.
  3. Coerce string form inputs to numbers and validate the range client-side before saving adapter config.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/native-runtime/provider-profile.ts:164 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-02). Data as JSON: /api/errors/fbb1202f152745d9. Report an issue: GitHub.