Repository navigation
fix(media): honor video auth modes and redact reflected credentials - #138205
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 8:51 AM ET / 12:51 UTC. ClawSweeper reviewWhat this changesThe PR makes OpenAI-compatible video requests honor typed, legacy, and no-auth modes, redacts request credentials reflected in video errors, and consolidates equivalent multipart POST helpers. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open. This focused repair addresses a current-main video-auth and diagnostic-redaction defect; no blocking correctness or security finding was identified in the introduced patch. Priority: P1 Review scores
Verification
How this fits togetherMedia understanding routes configured video attachments through provider plugins to OpenAI-compatible HTTP endpoints. The adapter merges provider and caller request settings, sends the guarded request, then returns media text or a redacted diagnostic. flowchart LR
A[Video attachment] --> B[Media provider]
C[Resolved auth and headers] --> D[Video request adapter]
B --> D
D --> E[Guarded HTTP request]
E --> F[Response and error redaction]
F --> G[Video description or safe error]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -8, Tests +61. Total +53 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Merge the shared header-selection and final-header redaction path so OpenAI-compatible video behavior remains aligned with the established audio contract without adding a parallel transport path. Do we have a high-confidence way to reproduce the issue? Yes. Current main's video adapter unconditionally derives bearer authentication from the legacy key while the runner demonstrably supplies an explicit no-auth video request; a request-capturing endpoint exposes the mismatch. Is this the best way to solve the issue? Yes. Centralizing the already-established audio auth selection in the shared media boundary prevents audio/video drift; copying the audio branch into video would preserve duplicate policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7623603c23db. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
a67de0d to
4d6b8c0
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where video requests to OpenAI-compatible endpoints reject explicitly configured no-auth requests or ignore a typed API key. Video error responses could also retain credentials reflected by the endpoint in diagnostic fields or malformed JSON parser errors.
Why This Change Was Made
Audio and video now share the existing header-selection rules: typed authentication takes precedence, legacy keys still work, and explicit no-auth requests omit Authorization. Video passes the actual request headers to the same diagnostic redactor audio already uses. The two public multipart helper names now point to one implementation.
User Impact
Compatible video endpoints accept the same authentication modes as audio, and returned errors redact reflected request credentials. Public SDK export names, request payloads, MIME handling, timeouts, and guarded HTTP behavior remain available. No new configuration, dependency, schema, or persistence behavior is introduced.
Evidence
Release-note context: OpenAI-compatible video requests now honor typed/no-auth authentication and redact endpoint-reflected request credentials.