Skip to content

Structured runs: sanitise persisted/emitted provider errors, not just log lines #132

Open

Description

@byapparov

From the review on #129 (deferred, UNCERTAIN). In structured-output mode, processor.ts redacts its log.error line, but the caught exception still flows through MessageV2.fromError onto the persisted assistant message and the error bus events. That has been true for every run since before #129.

Open question: can a provider's error responseBody echo the model's own rejected tool-call arguments? If any supported provider does, apply the same bounded summary (name, statusCode, isRetryable, classified message) before persistence. Terminal NDJSON errors were already sanitised by the unknown-finish retry work (#122).

Activity

  1. added
    securitySecurity vulnerabilities and hardening
    structured-output--output-schema / StructuredOutput mode
    P2Could have - Medium
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Could have - MediumsecuritySecurity vulnerabilities and hardeningstructured-output--output-schema / StructuredOutput mode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions