Repository navigation
feat(core): add headers to langsmith_gateway and ignore proxies - #41900
Open
Sai Annam (saiannam-dev) wants to merge 1 commit into
Open
Sai Annam (saiannam-dev) wants to merge 1 commit into
Sai Annam (saiannam-dev) wants to merge 1 commit into
Conversation
Headers passed to langsmith_gateway are sent by the model client and replace any header of the same name on the model. They are kept off the model, so they are never serialized or traced. Adds helpers integrations use to read them and to ignore their proxy inside the context.
Sai Annam (saiannam-dev)
requested a review
from Eugene Yurtsev (eyurtsev)
as a code owner
November 16, 2026 23:49
This was referenced Nov 16, 2026
Sai Annam (saiannam-dev)
requested review from
ccurme (ccurme)
and removed request for
Eugene Yurtsev (eyurtsev)
November 16, 2026 23:51
Merging this PR will not alter performance
Comparing Footnotes
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: core → openai → anthropic → groq → xai → deepseek (this PR: core)
Adds
headers=tolangsmith_gateway. The model client sends them on every request, and they replace any header of the same name set on the model. They are never stored on the model, so they are not serialized or traced. This lets a caller send a service key inX-Service-Keywithout it leaking into traces.Inside the context, integrations also ignore their proxy setting, so a serialized model cannot send the gateway credentials through a proxy.
Release note
langchain-core:langsmith_gatewayacceptsheaders.