Add audio transcriptions proxy support#1496
Open
EthenJ wants to merge 2 commits into
Open
Conversation
Owner
|
感谢贡献,音频转录代理这个方向有价值。审查后目前有一个需要先处理的阻塞问题,暂不合并:
当前 请补充:
修复后可以继续审查。 |
Decode chunked HTTP request bodies before forwarding multipart audio uploads, preserve binary payload bytes, and return explicit 400 or 413 responses for malformed and oversized requests. Add TCP-level regression coverage for fragmented headers, irregular chunks, non-UTF-8 audio bytes, trailers, and the 32 MiB decoded body limit. Thanks to @BigPizzaV3 for the detailed review and for identifying the helper request parsing gap.
Author
|
Thanks @BigPizzaV3 for the detailed review and for catching the helper-layer request parsing gap. I pushed an incremental fix that:
Validation
The chunked E2E request was manually encoded over TCP with 95 irregular chunks, fragmented headers and chunk-size lines, binary WAV data, and a trailer header. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v1/audio/transcriptionsprotocol proxy routingTest plan
cargo fmt --allcargo test -p codex-plus-core --test protocol_proxy audio_transcriptions -- --nocapturecargo check -p codex-plus-corenpm run vite:buildinapps/codex-plus-managernpm run checkinapps/codex-plus-managercargo check --workspaceafter building frontend assetsPOST /v1/audio/transcriptionsthrough Codex++ gateway usinggpt-4o-mini-transcribe