@@ -47,9 +47,21 @@ private constructor(
4747 /* *
4848 * Configuration for a `Runnable`.
4949 *
50- * See the
51- * [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
52- * for more details.
50+ * !!! note Custom values
51+ *
52+ * The `TypedDict` has `total=False` set intentionally to:
53+ * - Allow partial configs to be created and merged together via `merge_configs`
54+ * - Support config propagation from parent to child runnables via
55+ * `var_child_runnable_config` (a `ContextVar` that automatically passes
56+ * config down the call stack without explicit parameter passing), where
57+ * configs are merged rather than replaced
58+ * !!! example
59+ * ```python
60+ * # Parent sets tags
61+ * chain.invoke(input, config={"tags": ["parent"]})
62+ * # Child automatically inherits and can add:
63+ * # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
64+ * ```
5365 *
5466 * @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
5567 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -383,9 +395,21 @@ private constructor(
383395 /* *
384396 * Configuration for a `Runnable`.
385397 *
386- * See the
387- * [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
388- * for more details.
398+ * !!! note Custom values
399+ *
400+ * The `TypedDict` has `total=False` set intentionally to:
401+ * - Allow partial configs to be created and merged together via `merge_configs`
402+ * - Support config propagation from parent to child runnables via
403+ * `var_child_runnable_config` (a `ContextVar` that automatically passes
404+ * config down the call stack without explicit parameter passing), where
405+ * configs are merged rather than replaced
406+ * !!! example
407+ * ```python
408+ * # Parent sets tags
409+ * chain.invoke(input, config={"tags": ["parent"]})
410+ * # Child automatically inherits and can add:
411+ * # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
412+ * ```
389413 */
390414 fun options (options : RunnableConfig ) = apply { body.options(options) }
391415
@@ -975,9 +999,21 @@ private constructor(
975999 /* *
9761000 * Configuration for a `Runnable`.
9771001 *
978- * See the
979- * [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
980- * for more details.
1002+ * !!! note Custom values
1003+ *
1004+ * The `TypedDict` has `total=False` set intentionally to:
1005+ * - Allow partial configs to be created and merged together via `merge_configs`
1006+ * - Support config propagation from parent to child runnables via
1007+ * `var_child_runnable_config` (a `ContextVar` that automatically passes
1008+ * config down the call stack without explicit parameter passing), where
1009+ * configs are merged rather than replaced
1010+ * !!! example
1011+ * ```python
1012+ * # Parent sets tags
1013+ * chain.invoke(input, config={"tags": ["parent"]})
1014+ * # Child automatically inherits and can add:
1015+ * # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
1016+ * ```
9811017 *
9821018 * @throws LangChainInvalidDataException if the JSON field has an unexpected type or is
9831019 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -1359,9 +1395,21 @@ private constructor(
13591395 /* *
13601396 * Configuration for a `Runnable`.
13611397 *
1362- * See the
1363- * [reference docs](https://reference.langchain.com/python/langchain_core/runnables/#langchain_core.runnables.RunnableConfig)
1364- * for more details.
1398+ * !!! note Custom values
1399+ *
1400+ * The `TypedDict` has `total=False` set intentionally to:
1401+ * - Allow partial configs to be created and merged together via `merge_configs`
1402+ * - Support config propagation from parent to child runnables via
1403+ * `var_child_runnable_config` (a `ContextVar` that automatically passes
1404+ * config down the call stack without explicit parameter passing), where
1405+ * configs are merged rather than replaced
1406+ * !!! example
1407+ * ```python
1408+ * # Parent sets tags
1409+ * chain.invoke(input, config={"tags": ["parent"]})
1410+ * # Child automatically inherits and can add:
1411+ * # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
1412+ * ```
13651413 */
13661414 fun options (options : RunnableConfig ) = options(JsonField .of(options))
13671415
0 commit comments