Skip to content

Commit d7521eb

Browse files
ksachdevahangfei
authored andcommitted
feat: Expose run_config of current invocation from ReadonlyContext
Merge #3410 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** - Closes: #3409 Co-authored-by: Hangfei Lin <hangfei@google.com> COPYBARA_INTEGRATE_REVIEW=#3410 from ksachdeva:expose-runconfig b62b923 PiperOrigin-RevId: 828738445
1 parent f511352 commit d7521eb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/google/adk/agents/readonly_context.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from ..sessions.session import Session
2626
from .invocation_context import InvocationContext
27+
from .run_config import RunConfig
2728

2829

2930
class ReadonlyContext:
@@ -58,3 +59,8 @@ def state(self) -> MappingProxyType[str, Any]:
5859
def session(self) -> Session:
5960
"""The current session for this invocation."""
6061
return self._invocation_context.session
62+
63+
@property
64+
def run_config(self) -> Optional[RunConfig]:
65+
"""The run config of the current invocation. READONLY field."""
66+
return self._invocation_context.run_config

0 commit comments

Comments
 (0)