Skip to content

Allow passing headers, follow_redirects from ElevenLabs, AsyncElevenLabs to parent/base class#797

Open
pchng wants to merge 1 commit into
elevenlabs:mainfrom
pchng:main
Open

Allow passing headers, follow_redirects from ElevenLabs, AsyncElevenLabs to parent/base class#797
pchng wants to merge 1 commit into
elevenlabs:mainfrom
pchng:main

Conversation

@pchng
Copy link
Copy Markdown

@pchng pchng commented May 30, 2026

Summary

  • The classes ElevenLabs and AsyncElevenLabs extend base classes that support the headers and follow_redirects as constructor parameters, but don't expose these on their own constructors, making it impossible to actually use these.
  • Expose these in the child classes and pass onto parent constructors.
  • Change should be backwards compatible because parameters are added as optional with default values identical to their parent classes.

Note

Low Risk
Optional constructor kwargs with parent-aligned defaults; behavior change only for callers who previously could not pass these options.

Overview
ElevenLabs and AsyncElevenLabs now accept optional headers and follow_redirects and pass them to their base classes, fixing TypeError when 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.py cover 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.

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