Skip to content

fix(openai): restore audio transcription multipart requests - #645

Merged
Germey merged 1 commit into
mainfrom
fix/openai-transcription-multipart
Aug 13, 2026
Merged

fix(openai): restore audio transcription multipart requests#645
Germey merged 1 commit into
mainfrom
fix/openai-transcription-multipart

Conversation

@acedatacloud-dev

Copy link
Copy Markdown
Member

Summary

  • encode scalar multipart fields as an async-compatible mapping
  • encode repeated array fields as multipart form parts without passing a synchronous tuple stream to httpx.AsyncClient
  • replace the over-mocked unit test with a real httpx.MockTransport regression test

Production evidence

The Studio OpenAI MCP tool failed before sending the transcription request with:

Attempted to send an sync request with an AsyncClient instance.

The issue reproduced locally with the previous data=list[tuple] request shape. Both the original 34.9 MB recording and two valid sub-10 MB/sub-6 MB segments failed identically, ruling out file size, format, and URL access.

Verification

  • python3 -m pytest -q (56 passed)
  • python3 -m pytest tests/test_client.py tests/test_audio_tools.py -q (27 passed)
  • python3 -m ruff check core/client.py tests/test_client.py
  • python3 -m ruff format --check core/client.py tests/test_client.py
  • python3 -m mypy core/client.py

Post-deploy

Re-run openai_transcribe_audio against one of the prepared audio segments and confirm the request reaches /v1/audio/transcriptions.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Germey
Germey merged commit effa875 into main Aug 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants