Allow passing headers, follow_redirects from ElevenLabs, AsyncElevenLabs to parent/base class#797
Open
pchng wants to merge 1 commit into
Open
Allow passing headers, follow_redirects from ElevenLabs, AsyncElevenLabs to parent/base class#797pchng wants to merge 1 commit into
headers, follow_redirects from ElevenLabs, AsyncElevenLabs to parent/base class#797pchng wants to merge 1 commit into
Conversation
…arent/base classes
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
ElevenLabsandAsyncElevenLabsextend base classes that support theheadersandfollow_redirectsas constructor parameters, but don't expose these on their own constructors, making it impossible to actually use these.Note
Low Risk
Optional constructor kwargs with parent-aligned defaults; behavior change only for callers who previously could not pass these options.
Overview
ElevenLabsandAsyncElevenLabsnow accept optionalheadersandfollow_redirectsand pass them to their base classes, fixingTypeErrorwhen callers used kwargs the base already supported but the public subclasses did not forward.Constructor docs are updated for both sync and async clients. Defaults match the parent (
headers=None,follow_redirects=True), so existing call sites stay unchanged.New tests in
test_client_headers.pycover forwarding to the client wrapper, merged request headers, httpx redirect behavior, and keyword-only signatures for both client types.Reviewed by Cursor Bugbot for commit e5d34f2. Bugbot is set up for automated code reviews on this repo. Configure here.