fix(core): exclude api_key from tracing metadata (#32184)

(standard param)
This commit is contained in:
ccurme 2025-07-22 16:32:12 -03:00 committed by GitHub
parent e41e6ec6aa
commit ebf2e11bcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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] = value
return empty