The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fix(core): exclude api_key from tracing metadata (#32184)
ccurmeebf2e11bcbf3
diff --git a/libs/core/langchain_core/runnables/config.py b/libs/core/langchain_core/runnables/config.pyindex f1bf2f6500..4ac7bda7b4 100644--- a/libs/core/langchain_core/runnables/config.py+++ b/libs/core/langchain_core/runnables/config.py@@ -230,6 +230,7 @@ def ensure_config(config: Optional[RunnableConfig] = None) -> RunnableConfig:not key.startswith("__")and isinstance(value, (str, int, float, bool))and key not in empty["metadata"]+ and key != "api_key"):empty["metadata"][key] = valuereturn empty