Skip to content

feat: expose credential service in readonly context #1829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 11, 2025

Conversation

matino
Copy link
Contributor

@matino matino commented Jul 8, 2025

The problem is described in #1816.
TLDR; currently, there's no clean way to pass secrets to the LLM.

This PR makes it possible to access the credential service in a read-only context. It can be use to pass the authorization header to the LlmAgent tool:

  • In Runner instance, call save_credential()
  • In LLM, use tool_context.credential_service.load_credential() to load the credential (tool_context is of ToolContext type)

@matino matino force-pushed the expose_credential_service branch from e37ae28 to d3b500b Compare July 8, 2025 09:32
@matino
Copy link
Contributor Author

matino commented Jul 8, 2025

@hangfei Do you think we can merge this? It's a real blocker for my use case (especially passing credential service to the Runner in agent_tool)

@seanzhou1023 seanzhou1023 force-pushed the expose_credential_service branch from 9531852 to 997b6a9 Compare July 11, 2025 22:38
@seanzhou1023 seanzhou1023 added the ready to pull [Status] This PR is ready to be importing back to Google label Jul 11, 2025
@copybara-service copybara-service bot merged commit 202558f into google:main Jul 11, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to pull [Status] This PR is ready to be importing back to Google
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants