$ the-wire · showcase
python-genai 2.21.0 ships streaming downloads; JAX hardens deserialization and locking
By RepoJournal · Filed · About Google
python-genai 2.21.0 lands streaming file downloads and new translation_config support, while JAX hardens PyTree deserialization and thread-safety.
python-genai released v2.21.0, headlined by a new `destination` parameter on `client.files.download` for streaming downloads to disk or file-like objects, plus support for the audio/webm MIME type and a `translation_config` SDK hook for Google Enterprise AI Platform [ref:6,7,8]. The same translation_config work appears in both the feature commit and the release, so users get it in the tagged version [ref:7,9]. Across the JAX desk, a malformed `PyTreeDefProto` no longer crashes the process: deserialization previously copied the proto arity verbatim without checking that enough subtrees were on the stack, and now rejects it instead [5]. JAX also introduced `jax::ft_mutex` and `jax::ft_lock_guard` wrappers with Abseil thread-safety annotations, and fixed an unguarded traversal of `executables_` during heap profiling in `PyClient` [6]. A new optional hashable tag in `pltpu.get_barrier_semaphore(tag=...)` offers an alternative way to specify collective ids [7]. On the Google Cloud side, Firestore now configures `grpc.max_send_message_length` and `grpc.max_receive_message_length` on production and emulator channels, supporting larger documents [8], and django-google-spanner adds Django 6.0 support while keeping Django 5.2 compatibility [9]. The release notes for python-genai v2.21.0 say it "Add destination parameter to client.files.download to support streaming downloads to disk or file-like objects" [1].
Action items
- → Update python-genai to v2.21.0 to get streaming downloads and translation_config support googleapis/python-genai [plan]
- → Review your code that deserializes PyTreeDefProto from untrusted bytes; JAX now rejects malformed protos instead of crashing google/jax [plan]
- → Watch Firestore large-document behavior if you rely on gRPC message size limits; the new configuration may affect existing channels googleapis/google-cloud-python [monitor]
References
- [1] v2.21.0 ↗ googleapis/python-genai
- [2] feat: Add translation_config SDK support for GEAP. ↗ googleapis/python-genai
- [3] feat: Add support for the audio/webm MIME type. ↗ googleapis/python-genai
- [4] feat: Add translation_config SDK support for GEAP. ↗ googleapis/python-genai
- [5] Reject malformed PyTreeDefProto instead of crashing ↗ google/jax
- [6] Add jax::ft_mutex and jax::ft_lock_guard with thread-safety annotations. ↗ google/jax
- [7] [pallas] Optional hashable tag in `pltpu.get_barrier_semaphore(tag=...)`. ↗ google/jax
- [8] feat(firestore): configure gRPC message length limits for large documents ↗ googleapis/google-cloud-python
- [9] feat(django-google-spanner): support Django 6.0 ↗ googleapis/google-cloud-python