Skip to content

Commit e0a0cf1

Browse files
aditik0303claude
andcommitted
docs(governance): note intentional duck-typed extraction in Google ADK adapter
Record that LlmRequest/LlmResponse/content/parts are read via getattr rather than isinstance on ADK's typed models, to avoid hard-coupling to google-adk internals and to let tests duck-type payloads without the package installed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6cba914 commit e0a0cf1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/uipath-google-adk/src/uipath_google_adk/governance

packages/uipath-google-adk/src/uipath_google_adk/governance/adapter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ def after_tool(
333333
return None
334334

335335
# ----- Text extraction -------------------------------------------------
336+
# Read LlmRequest/LlmResponse/content/parts defensively via getattr
337+
# rather than isinstance on ADK's typed models: this keeps the adapter
338+
# from hard-coupling to google-adk internal types that may shift, and
339+
# lets the tests duck-type the payloads without a google-adk install.
336340

337341
def _latest_request_text(self, llm_request: Any) -> str:
338342
"""Extract text from the most-recent content in an ``LlmRequest``.

0 commit comments

Comments
 (0)