Skip to main content

detect_json

Function detect_json 

Source
pub fn detect_json(value: &Value, cfg: &UsageLimitConfig) -> Option<UsageLimit>
Expand description

Scan a Codex NDJSON event JSON value for a usage-limit signal.

Codex --json emits {"type":"error", ...} / {"type":"turn.failed", ...} envelopes carrying the limit message in a message or error field.