Skip to content

feat: return string content from get_content and register_call methods#768

Closed
fern-api[bot] wants to merge 1 commit intomainfrom
fern-bot/2026-04-09T16-27Z
Closed

feat: return string content from get_content and register_call methods#768
fern-api[bot] wants to merge 1 commit intomainfrom
fern-bot/2026-04-09T16-27Z

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented Apr 9, 2026

Version Bump: New observable behavior is added: get_content and register_call now return meaningful str data instead of None, and the api_key default is changed to read from the environment — all backward-compatible additions that provide new capabilities to callers.

The get_content method on DocumentsClient (and its async counterpart) now returns the document content as a str instead of None. Similarly, the Twilio register_call method now returns the TwiML response body as a str instead of None, making the response data directly accessible. The SDK clients now also automatically read the ELEVENLABS_API_KEY environment variable as the default value for api_key, so explicit key passing is no longer required when the environment variable is set.


Note

Medium Risk
Changes observable SDK behavior by altering return types for get_content/register_call and introducing an environment-derived default for api_key, which could affect callers that relied on prior None returns or explicit key passing.

Overview
Improves response usability for Conversational AI endpoints by returning the actual response body as str for knowledge-base document get_content (sync/async) and Twilio register_call (sync/async), wiring raw clients to surface _response.text instead of None.

Makes authentication setup more convenient by defaulting api_key in ElevenLabs/AsyncElevenLabs to os.getenv("ELEVENLABS_API_KEY") when not explicitly provided.

Bumps SDK version to 2.43.0 (including User-Agent/SDK headers), updates generated docs/examples, updates Fern metadata, and adds a changelog.md entry (now ignored by Fern).

Reviewed by Cursor Bugbot for commit 61232d2. Bugbot is set up for automated code reviews on this repo. Configure here.

Previously, `get_content` (knowledge base documents) and the Twilio
`register_call` method returned `None` / `HttpResponse[None]`. They now
return the actual response body as a `str` / `HttpResponse[str]`, making
the returned data accessible to callers without having to inspect the raw
HTTP response object.

Additionally, the `api_key` parameter on both `BaseElevenLabs` and
`AsyncBaseElevenLabs` now defaults to `os.getenv("ELEVENLABS_API_KEY")`
instead of `None`, allowing the client to be instantiated without
explicitly passing an API key when the environment variable is set.

The internal `AGENTS.md` documentation file has also been removed.

Key changes:
- `DocumentsClient.get_content` / `AsyncDocumentsClient.get_content` now return `str` (was `None`)
- `RawDocumentsClient.get_content` / `AsyncRawDocumentsClient.get_content` now return `HttpResponse[str]` (was `HttpResponse[None]`)
- `TwilioClient.register_call` / `AsyncTwilioClient.register_call` now return `str` (was `None`)
- `RawTwilioClient.register_call` / `AsyncRawTwilioClient.register_call` now return `HttpResponse[str]` (was `HttpResponse[None]`)
- `api_key` parameter defaults to `os.getenv("ELEVENLABS_API_KEY")` for both sync and async clients
- Removed `AGENTS.md` internal documentation file

🌿 Generated with Fern
@kraenhansen kraenhansen mentioned this pull request Apr 10, 2026
1 task
@kraenhansen
Copy link
Copy Markdown
Member

This PR is deleting a file which I forgot to add to fernignore (see #769). Was this PR generated? If yes, we could close this and simply re-generate on Monday?

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