release: 4.1.0 - #88
Closed
stainless-app[bot] wants to merge 140 commits into
Closed
Conversation
fix(client): mark some request bodies as optional
Note that we still want to run tests, as these depend on the metadata.
Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run.
…t in workflow templates
| _strict_response_validation: bool = False, | ||
| ) -> None: | ||
| """Construct a new async brainbase client instance. | ||
| """Construct a new async AsyncBrainbase client instance. |
There was a problem hiding this comment.
Redundant "async" prefix — "async AsyncBrainbase" reads as the word "async" twice. The Sync docstring uses "synchronous Brainbase client instance" as the pattern; the async counterpart should mirror that form.
Suggested change
| """Construct a new async AsyncBrainbase client instance. | |
| """Construct a new asynchronous Brainbase client instance. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/brainbase/_client.py
Line: 263
Comment:
Redundant "async" prefix — "async AsyncBrainbase" reads as the word "async" twice. The Sync docstring uses "synchronous Brainbase client instance" as the pattern; the async counterpart should mirror that form.
```suggestion
"""Construct a new asynchronous Brainbase client instance.
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Member
|
Auto-closed by PR Janitor after 8 days of inactivity. Reopen anytime if this is still relevant. |
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.
Automated Release PR
4.1.0 (2026-07-28)
Full Changelog: v4.0.0...v4.1.0
Features
NotGivenfor body (#67) (3ad7f25)X-Stainless-Read-Timeoutheader (#63) (a594c75)Bug Fixes
model_dumpandmodel_dump_jsonfor Pydantic v1 (898ca7b)by_aliasunless set (887a8ec)Performance Improvements
Chores
httpx-aiohttpversion to 0.1.9 (7aeb4c8)actions/github-script(bdad5ed)api.mdfiles (034e708)--fixargument to lint script (0b1e68e)test_proxy_environment_variablesmore resilient (f79d30c)test_proxy_environment_variablesmore resilient to env (08e33e4)pyproject.tomlfile (f87b268)actions/checkoutversion (54d6bd9)get_platformtest (ef07d85)Documentation
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Greptile Summary
This is the automated 4.1.0 release PR generated by Stainless, consolidating a large batch of upstream SDK improvements into the Brainbase Python client. The changes span client infrastructure, type system, resource loading, and API layer.
cached_property, raw f-string path interpolation is replaced by the newpath_templateutility which percent-encodes segments and rejects dot-traversal, and a custom JSON serializer (openapi_dumps) adds support fordatetimeand Pydantic model serialization.not_given/omitsingleton instances are introduced alongside the existingNOT_GIVENsentinel for ergonomics;SequenceNotStr,BinaryTypes, andAsyncBinaryTypesare added;follow_redirectsis wired throughRequestOptionsto httpx.VoiceCreateResponse,VoiceUpdateResponse, andVoiceRetrieveResponse(all structurally identical) are consolidated into a singleVoiceDeploymentmodel — this simplifies the API surface but removes previously-published type names.Confidence Score: 4/5
Safe to merge for new users; existing users who imported VoiceCreateResponse, VoiceUpdateResponse, or VoiceRetrieveResponse directly will encounter ImportError after upgrading.
The infrastructure changes (retry-loop refactor, lazy resource loading, path sanitization, custom JSON encoder) are well-constructed and test-backed. The one concrete concern is the removal of three publicly-documented type names in a minor version: users who pinned from brainbase.types.workers.deployments import VoiceCreateResponse will break on upgrade. All other changes are additive or fix-forward.
Files Needing Attention: src/brainbase/types/workers/deployments/init.py — the removal of the three response type aliases without backward-compat shims is the only file warranting a second look before merging.
Important Files Changed
Class Diagram
%%{init: {'theme': 'neutral'}}%% classDiagram class VoiceDeployment { +str id +Optional[str] delegate_aux_deployments_id +Optional[str] phone_number +Optional[str] voice_id +Optional[str] voice_provider } class VoiceCreateResponse { <<removed>> } class VoiceRetrieveResponse { <<removed>> } class VoiceUpdateResponse { <<removed>> } VoiceCreateResponse --|> VoiceDeployment : consolidated into VoiceRetrieveResponse --|> VoiceDeployment : consolidated into VoiceUpdateResponse --|> VoiceDeployment : consolidated into class VoiceResource { +create(worker_id) VoiceDeployment +retrieve(worker_id, deployment_id) VoiceDeployment +update(deployment_id, worker_id) VoiceDeployment +list(worker_id) VoiceListResponse +delete(deployment_id, worker_id) None } VoiceResource --> VoiceDeployment : returnsComments Outside Diff (1)
src/brainbase/types/workers/deployments/__init__.py, line 1-8 (link)VoiceCreateResponse,VoiceUpdateResponse, andVoiceRetrieveResponsewere publicly documented types inapi.mdand exported frombrainbase.types.workers.deployments. Removing them in a 4.0.0 → 4.1.0 minor bump violates semver — any user who imported them directly (e.g.from brainbase.types.workers.deployments import VoiceCreateResponse) will get anImportErrorat import time. The consolidation intoVoiceDeploymentmakes semantic sense (all three had identical fields), but it should be accompanied by backward-compat re-exports until a major version, or released as 5.0.0.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "release: 4.1.0" | Re-trigger Greptile