feat(audio): expose standalone transcription API - #4391
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 58 / 80이 PR은 draft인 현재 원격 CI는 이 시각 기준 test 1/4·3/4·4/4가 실패했고, gates/hygiene/docker smoke 등은 src/server/audio-transcriptions.ts (upstream.ok ? 502 : status) - 업스트림이 성공인데 응답 본문 상한에 걸려 early return하면 finally의 recordOutcome이 잠깐 심어 둔 502로 남을 수 있다. 의도된 실패 기록이어도, 성공 HTTP를 먼저 넣고 실패 분기에서만 덮는 편이 읽기 쉽다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Keep current origin/dev fixture and layout behavior, and retain the standalone transcription test mapping. Resolved conflicts: - gui/public/provider-icons/README.md: keep origin/dev Cline reuse note as the landed wording. - gui/tests/fr-localization.test.ts: keep origin/dev Cline skip comment. - gui/tests/integrations-api.test.ts: keep origin/dev test title; the registered client list already matches both sides. - tests/gui/integrations-invariants.test.ts: keep origin/dev census wording after the count was generalized. - tests/codex-integration/codex-inject-integration.test.ts: keep origin/dev real chmod denial, profile path, and later history-restore coverage. The transcription spy/mock path was superseded because ESM named imports never saw the mock. - scripts/test-layout/layout.json: keep origin/dev provider/client regexes (Cline plus context-compat/history exclusions) and restore audio-transcriptions.test.ts under server.
|
Maintainer integration record — audio stack lane, merged by @lidge-jun. This pull request is a non-tip link in the audio stack (#4391 → #4392 → #4395). Its head carries
Squashing with |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
dev advanced by the squashed #4391, whose content this branch already carries as real commits. Every conflict was the same change landing twice, so the branch side (a strict superset) was taken.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a170112fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| if (!relay.keyed && input.model !== TRANSCRIPTION_MODEL) return invalid(`ChatGPT transcription supports only ${TRANSCRIPTION_MODEL}`); | ||
| const url = relay.keyed | ||
| ? `${relay.providerBaseUrl}/audio/transcriptions` |
There was a problem hiding this comment.
Normalize the keyed transcription base URL
When the built-in openai-apikey provider uses the already-supported trailing-slash spelling https://api.openai.com/v1/, this constructs https://api.openai.com/v1//audio/transcriptions. That is a distinct path which the upstream need not normalize and may reject with 404; build the endpoint with the same URL normalization used by the Responses and Images transports.
AGENTS.md reference: src/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
| for (const name of ["authorization", "chatgpt-account-id", "user-agent", "originator", "version"]) { | ||
| const value = new Headers(relay.headers).get(name); | ||
| if (value) headers.set(name, value); |
There was a problem hiding this comment.
Preserve configured headers for keyed transcription
For an OpenAI API-key provider with configured non-secret headers, such as OpenAI-Organization or OpenAI-Project, resolveAudioUpstream includes those headers in relay.headers, but this allowlist silently discards them. Such requests can be routed to the wrong project or rejected; preserve the trusted provider headers on the keyed branch while retaining the narrow allowlist for caller-derived ChatGPT forwarding.
AGENTS.md reference: src/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
Summary
POST /v1/audio/transcriptionsfor external clients using an OpenCodex API key. ChatGPT Pool/Direct and the OpenAI API provider retain their separate upstream credentials; file uploads return JSON or plain transcript text.dev; feat(audio): expose streaming dictation and owned live calls #4392 targets this branch, followed by feat(dashboard): add dictation and live voice API controls #4395. Leave the chain open for review; no native GitHub stack registration.Verification
bun test tests/server/audio-transcriptions.test.ts: 24 pass, 0 fail.bun run test:changed: 8,138 pass, 2 skip, 0 fail across 326 selected files; two additional probe-release regressions subsequently passed in the focused run.bun test tests/test-layout.test.ts tests/test-layout-tooling.test.ts: 17 pass, 0 fail.--no-verifyand remote CI only.011f2dff5cin feat(audio): expose streaming dictation and owned live calls #4392, based on this PR's71e22d967f, passed all 24 transcription cases and remote gates in run 34687731903. Unrelated journal-restore assertions remain red and are recorded separately per owner scope; this PR stays draft, without a whole-CI-green claim.71e22d967ffafbd3492935c299623c9127eaf17balso passed all 24 transcription cases, endpoint cases and gates (1,979 dashboard tests) in run 34687369123. The screenshot/description gate is now successful after adding the artifact capture below.Checklist
Actual screenshot of this layer's own CI artifact (run 34687369123, merge d9771b3; GUI tree exactly matches
71e22d967f). This layer changes dashboard test fixtures and asset provenance only; audio controls belong to #4395. Synthetic management data only.