Skip to content

Expose RunConfig of current invocation from ToolContext/CallbackContext/ReadOnlyContext #3409

@ksachdeva

Description

@ksachdeva

Is your feature request related to a problem? Please describe.

In the custom tools with tool_context there is a need to access the RunConfig.

RunConfig is a property of InvocationContext. However, InvocationContext is directly accessible from ToolContext as it is a private field.

For more details see the code in my library (adk-chatkit)
https://github.com/ksachdeva/adk-chatkit/blob/49fb763f7d695b136fc72005878a90a9b710f69f/adk-chatkit/src/adk_chatkit/_context.py#L75

Describe the solution you'd like
In ReadOnlyContext (parent of CallbackContext & ToolContext) add a propety that returns RunConfig or None

Describe alternatives you've considered
For now I am using the private field _invcation_context

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions