Skip to content

Add chunking_strategy to OpenAI audio transcription provider options#892

Open
kachelle wants to merge 2 commits intoprism-php:mainfrom
kachelle:fix/audio-chunking-strategy-provider-option
Open

Add chunking_strategy to OpenAI audio transcription provider options#892
kachelle wants to merge 2 commits intoprism-php:mainfrom
kachelle:fix/audio-chunking-strategy-provider-option

Conversation

@kachelle
Copy link

@kachelle kachelle commented Feb 6, 2026

The OpenAI API requires chunking_strategy when using diarization models (gpt-4o-transcribe-diarize), but handleSpeechToText doesn't forward it from provider options to the API request.

Without this, any diarization call fails with:

OpenAI Error [400]: invalid_request_error - chunking_strategy is required for diarization models

Changes:

  • Added chunking_strategy to the allowed provider options in src/Providers/OpenAI/Handlers/Audio.php
  • Added test verifying chunking_strategy is forwarded in the API request

Will be used in this laravel/ai PR: laravel/ai#87

It's my first PR for OSS (except doc changes), so help me out if doesnt make sense.

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.

1 participant