Skip to content

fix(voice) reject ignored explicit-client options - #4527

Merged
seratch merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/voice-provider-client-options
Aug 19, 2026
Merged

seratch merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/voice-provider-client-options

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Reject organization and project when OpenAIVoiceModelProvider receives an explicit openai_client.

An explicit AsyncOpenAI client already owns its organization and project settings. The voice provider currently rejects api_key and base_url in this configuration but silently accepts and ignores organization and project because those values are only stored when the provider constructs its own client.

This aligns the voice provider with the same explicit-client contract already used by OpenAIProvider.

Reproduction

client = AsyncOpenAI(api_key="test")
provider = OpenAIVoiceModelProvider(
    openai_client=client,
    organization="org_other",
)

On current main, construction succeeds but organization="org_other" has no effect. The provider continues using the organization configured on client.

Test plan

Extends the existing explicit-client conflict regression test to cover both organization and project while preserving the valid client-only path.

Issue number

N/A

@seratch seratch added this to the 0.22.x milestone Aug 19, 2026
@seratch
seratch merged commit 7e55afc into openai:main Aug 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants