paperclipai/paperclip · error · Error

Public replay contains private provider metadata

Error message

Public replay contains private provider metadata

What it means

validatePublicChatPayload() rejects payloads whose run block still carries private provider routing data: a non-empty effectiveModelHistory, or non-null managedProfile / acpxProfile. These fields reveal internal model-selection and profile configuration that must not appear in public reports, so "Public replay contains private provider metadata" is thrown.

Source

Thrown at packages/paperclip-runner/scripts/public-eval-viewer.mjs:106

      Array.isArray(value) ||
      Object.keys(value).some((key) => !names.split(" ").includes(key))
    )
      throw new Error("Unknown public chat projection field");
  };
  fields(payload.publication, "schema notice");
  fields(payload.navigation, "suiteHref previous next");
  for (const link of [payload.navigation.previous, payload.navigation.next])
    if (link !== null) fields(link, "label href");
  fields(
    payload.run,
    "model provider driver providerVersion runnerProvider acpxAgent acpxProfile requestedModel effectiveModelHistory configuration sessionId providerSessionId agentVersion managedProfile retainedSession retainedSessionStatus fixtureDigest runnerPackageDigest runnerdDigest startedAt finishedAt durationMs runnerBuild initialRevision finalRevision usage",
  );
  if (
    payload.run.effectiveModelHistory?.length ||
    payload.run.managedProfile != null ||
    payload.run.acpxProfile != null
  )
    throw new Error("Public replay contains private provider metadata");
  if (payload.run.usage !== null)
    fields(
      payload.run.usage,
      "agentTurns providerRequests inputTokens outputTokens cachedInputTokens reasoningTokens providerReportedCostNanodollars estimatedCostNanodollars pricingVersion",
    );
  fields(
    payload.view,
    "schema sessionId mode identity issue turns composer evidence connection replay renderedAt",
  );
  fields(
    payload.view.identity,
    "agentLabel runnerLabel runnerAttached controlPlaneLabel controlPlaneTooltip replaySource",
  );
  fields(
    payload.view.issue,
    "identifier title status priority assignee runState scenarioId fixtureProfile",
  );
  fields(payload.view.composer, "state helper reason pendingInteractionId");

View on GitHub (pinned to 01ad858492)

Solutions

  1. Strip the fields in the projection step: set effectiveModelHistory to [] (or omit content), managedProfile and acpxProfile to null before validation.
  2. Regenerate the public payload with the fixed projector and revalidate.
  3. Check the projector handles model-fallback runs — effectiveModelHistory must be emptied for those specifically.
  4. If a field was renamed in the run projection, ensure the nulling logic uses the new name so the old key isn't left populated.

Example fix

// before
run: { ...run, effectiveModelHistory: run.effectiveModelHistory },
// after
run: { ...run, effectiveModelHistory: [], managedProfile: null, acpxProfile: null },
Defensive patterns

Strategy: validation

Validate before calling

const hasPrivateProviderMeta = (run) =>
  Boolean(run?.effectiveModelHistory?.length) || run?.managedProfile != null || run?.acpxProfile != null;
if (hasPrivateProviderMeta(payload.run)) throw new Error("strip provider metadata before publishing");

Type guard

const providerMetaCleared = (run) => Array.isArray(run?.effectiveModelHistory) && run.effectiveModelHistory.length === 0 && run.managedProfile == null && run.acpxProfile == null;

Try / catch

try {
  validatePublicChatPayload(payload);
} catch (err) {
  if (err.message === "Public replay contains private provider metadata") {
    payload.run.effectiveModelHistory = [];
    payload.run.managedProfile = null;
    payload.run.acpxProfile = null;
    validatePublicChatPayload(payload);
  } else throw err;
}

Prevention

When it happens

Trigger: Calling validatePublicChatPayload when the projection step failed to strip run.effectiveModelHistory (non-empty array), run.managedProfile, or run.acpxProfile — e.g. projecting a replay where model fallback occurred or managed/acpx profiles were active.

Common situations: A new generator version stopped zeroing these fields; replays from runs using managed profiles were projected with fields retained; model-fallback runs populated effectiveModelHistory and the projection only nulls it for single-model runs.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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