K4.5.3 Task 4.5

940 Succeeded, 45 Errored, 15 Expired — Resubmit Only the 60

Batch results are JSONL with per-request result.type: succeeded, errored, or expired. Each result includes custom_id for identification.

Selective Retry

With 1,000 requests: 940 succeeded, 45 errored, 15 expired. Selective resubmission of just 60 failures saves 94% versus resubmitting all 1,000.

Error Types Need Different Fixes

TypeCountFix
Context exceeded40Chunk oversized documents
Invalid input5Correct malformed requests
Expired15Resubmit as-is (transient)

Blind retry without fixing root causes produces the same errors. Chunk the oversized documents before resubmitting. Fix the malformed inputs. Only transient failures (expired) can be retried as-is.

The Process

  1. Parse JSONL results
  2. Filter by result.type (errored/expired)
  3. Match by custom_id to original requests
  4. Categorize error types
  5. Apply targeted fixes per category
  6. Resubmit only the fixed failures as a new batch

One-liner: Parse batch results by status, match failures by custom_id, fix root causes per error type (chunk oversized, fix malformed, retry expired), and resubmit only the failures — not the whole batch.