Skip to content

Commit ebf2e11

Browse files
authored
fix(core): exclude api_key from tracing metadata (#32184)
(standard param)
1 parent e41e6ec commit ebf2e11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/core/langchain_core/runnables/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def ensure_config(config: Optional[RunnableConfig] = None) -> RunnableConfig:
230230
not key.startswith("__")
231231
and isinstance(value, (str, int, float, bool))
232232
and key not in empty["metadata"]
233+
and key != "api_key"
233234
):
234235
empty["metadata"][key] = value
235236
return empty

0 commit comments

Comments
 (0)