Skip to content

feat(toolbox-langchain): Add client headers to Toolbox #264

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 6 commits into from
Jun 3, 2025

Conversation

twishabansal
Copy link
Contributor

@twishabansal twishabansal commented Jun 2, 2025

Wrapper for adding client_headers feature. Core implemented in #178

@twishabansal twishabansal changed the title add headers feat: add client headers Jun 2, 2025
@twishabansal twishabansal changed the title feat: add client headers feat(toolbox-langchain): Add client headers to Toolbox Jun 2, 2025
@twishabansal twishabansal marked this pull request as ready for review June 2, 2025 09:53
@twishabansal twishabansal requested a review from a team as a code owner June 2, 2025 09:53
@twishabansal twishabansal requested a review from anubhav756 June 2, 2025 09:53
Copy link
Contributor

@anubhav756 anubhav756 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we also add/update e2e tests for this?

@twishabansal
Copy link
Contributor Author

nit: Should we also add/update e2e tests for this?

This is used to connect to deployed instances of toolbox that require auth. However, in the current e2e tests, we run a local toolbox instance within our cloud build env. So, we cannot test this feature with the current e2e test setup.

We might want to create a workflow to create a new toolbox instance and deploy to cloud run to test this out in the future. Right now, we'll be running unit and manual tests.

@twishabansal twishabansal merged commit 887b719 into main Jun 3, 2025
19 checks passed
@twishabansal twishabansal deleted the twisha-add-headers branch June 3, 2025 06:04
@release-please release-please bot mentioned this pull request Jun 3, 2025

### How it works

The `ToolboxClient` (and `ToolboxSyncClient`) allows you to specify functions (or coroutines for the async client) that dynamically generate HTTP headers for every request sent to the Toolbox server. The most common use case is to add an Authorization header with a bearer token (e.g., a Google ID token).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToolboxSyncClient is not applicable in this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants