Skip to content

Commit ab39cdf

Browse files
obostjancicclaude
andcommitted
ref(logging): Drop per-string cap on gen_ai log attributes
Gen-AI log attribute strings were capped at 2,000 characters per value before serialization. Remove the per-string truncation so individual string values are no longer clipped; the 12,000-character cap on the whole serialized attribute still bounds total output, and secret redaction and blob omission are unchanged. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 8471466 commit ab39cdf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/junior/src/chat/logging.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,6 @@ export function buildTurnFailureResponse(eventId: string): string {
17541754
// ---------------------------------------------------------------------------
17551755

17561756
const GEN_AI_DEFAULT_MAX_ATTRIBUTE_CHARS = 12_000;
1757-
const GEN_AI_MAX_STRING_CHARS = 2_000;
17581757
const GEN_AI_MAX_ARRAY_ITEMS = 50;
17591758
const GEN_AI_MAX_OBJECT_KEYS = 50;
17601759

@@ -1781,7 +1780,7 @@ function sanitizeGenAiValue(
17811780
if (shouldTreatAsBlob) {
17821781
return `[omitted:${value.length}]`;
17831782
}
1784-
return truncateGenAiString(redactSecrets(value), GEN_AI_MAX_STRING_CHARS);
1783+
return redactSecrets(value);
17851784
}
17861785

17871786
if (typeof value === "number") {

0 commit comments

Comments
 (0)