Hi LangGraph team,
We are using a self-hosted LangGraph Agent Server with multiple assistants, each having its own LLM configuration, including a dedicated LLM API key.
The API key is stored in the assistant’s configurable section, as it is specific to each assistant and required internally by the graph during execution.
However, we noticed that this sensitive value is exposed in the SSE response when using the messages-tuple streaming mode.
Steps to reproduce
Configure an assistant with the following configuration:
{
"configurable": {
"llm-api-key": "<SECRET>"
}
}
Execute a run using the streaming endpoint:
POST /threads/{thread_id}/runs/stream
With the following request body:
{
"assistant_id": "<ASSISTANT_ID>",
"stream_mode": ["messages-tuple", "values"],
"input": {
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}
}
Actual behavior
The LLM API key is returned in plain text within the message metadata:
[
{
"content": "Assistant response",
"type": "ai"
},
{
"assistant_id": "...",
"thread_id": "...",
"llm-api-key": "<SECRET>",
"langgraph_node": "generate",
"langgraph_step": 5
}
]
The secret is therefore accessible to the API consumer directly through the raw SSE response, even though it is intended exclusively for internal server-side use.
Expected behavior
Sensitive assistant-specific configuration values should remain accessible to the graph during execution without being exposed to API consumers through streaming metadata or other API responses.
Questions
-
Is the automatic propagation of
configurablevalues into streaming metadata an intentional behavior? -
Is there an officially supported mechanism to mark specific configurable fields as private or sensitive?
-
Is it possible to exclude specific configurable keys from streaming metadata at the server or graph level while keeping them accessible internally?
Ideally, we would like to retain assistant-specific configuration without exposing sensitive values to API consumers, regardless of the requested streaming mode.
Filtering the metadata on the client side would not address the security concern, since the secret has already been transmitted over HTTP.
Thanks for your help!