Build the LangGraph stream config dict.
Injects CLI and SDK versions into metadata["versions"] so LangSmith traces
can be correlated with specific releases.
Why the CLI sets both versions:
create_deep_agent bakes versions: {"deepagents": "X.Y.Z"} into the
compiled graph via with_config. At stream time, LangGraph merges
the graph config with the runtime config passed here. Because the
metadata merge is shallow (effectively {**graph_meta, **runtime_meta}
for top-level keys), both configs containing a versions key means
the runtime dict replaces the graph dict entirely — the SDK
version would be lost.Includes ls_integration metadata so LangSmith traces originating from the CLI
are distinguishable from bare SDK usage.
The CLI session thread identifier.
The agent/assistant identifier, if any.
Sandbox provider name for trace metadata, or None if no
sandbox is active.