Skip to content

fix(adk): plain bridge marker and picklable Governed* classes (#1447) - #1518

Merged
tommasobolis merged 1 commit into
developfrom
chore/1447-adk-bridged-classes
Oct 30, 2026
Merged

tommasobolis merged 1 commit into
developfrom
chore/1447-adk-bridged-classes

Conversation

@tommasobolis

Copy link
Copy Markdown
Collaborator

Part of #1447 (ADK slice; #1510 carries Closes and merges last).

  • The last_call bridge marker is a ClassVar[bool], so pydantic no longer turns it into a truthy ModelPrivateAttr.
  • GovernedLiteLlm, GovernedGemini and GovernedLiteLLMClient resolve by name on donkey_kit.integrations.adk through a PEP 562 getattr, built once with functools.cache, so pickle finds them. No SDK code deserialises anything. Instances from model()/gemini() still hold the http client, so they still can't be pickled.
  • Tests: test_adapter_async_last_call.py. Gate: typecheck-and-lint, test-3.11, new-dependencies, commit-identities, adk-stacks, adapter-contract(adk).
  • Acceptance impact: none. Migration: not breaking (new names reachable on the adk module). ADR: no.

Made with Cursor

The last_call bridge marker is a ClassVar, so pydantic no longer turns it
into a private attribute (a truthy ModelPrivateAttr). GovernedLiteLlm,
GovernedGemini and GovernedLiteLLMClient resolve by name on
donkey_kit.integrations.adk through a PEP 562 __getattr__, so pickle finds
them; a class last_call_bridged() builds from a user's own class still has
no name there.

Part of #1447

Co-authored-by: Cursor <cursoragent@cursor.com>
@tommasobolis
tommasobolis marked this pull request as draft October 30, 2026 11:48
@tommasobolis
tommasobolis marked this pull request as ready for review October 30, 2026 11:55
@tommasobolis
tommasobolis merged commit abf603d into develop Oct 30, 2026
52 checks passed
@tommasobolis
tommasobolis deleted the chore/1447-adk-bridged-classes branch October 30, 2026 11:55
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