From d7521eb638f3aa04a9089909a4ccd4bf93ff4886 Mon Sep 17 00:00:00 2001 From: Kapil Sachdeva Date: Wed, 5 Nov 2025 19:46:36 -0800 Subject: [PATCH] feat: Expose run_config of current invocation from ReadonlyContext Merge https://github.com/google/adk-python/pull/3410 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** - Closes: #3409 Co-authored-by: Hangfei Lin COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3410 from ksachdeva:expose-runconfig b62b923df421f0bdc1c20948d16765c555c01cb8 PiperOrigin-RevId: 828738445 --- src/google/adk/agents/readonly_context.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/google/adk/agents/readonly_context.py b/src/google/adk/agents/readonly_context.py index c067fd11..425ab347 100644 --- a/src/google/adk/agents/readonly_context.py +++ b/src/google/adk/agents/readonly_context.py @@ -24,6 +24,7 @@ if TYPE_CHECKING: from ..sessions.session import Session from .invocation_context import InvocationContext + from .run_config import RunConfig class ReadonlyContext: @@ -58,3 +59,8 @@ class ReadonlyContext: def session(self) -> Session: """The current session for this invocation.""" return self._invocation_context.session + + @property + def run_config(self) -> Optional[RunConfig]: + """The run config of the current invocation. READONLY field.""" + return self._invocation_context.run_config