diff --git a/libs/core/langchain_core/runnables/base.py b/libs/core/langchain_core/runnables/base.py index 900efb1f9f3..da4750bd556 100644 --- a/libs/core/langchain_core/runnables/base.py +++ b/libs/core/langchain_core/runnables/base.py @@ -3995,16 +3995,6 @@ class RunnableBindingBase(RunnableSerializable[Input, Output]): runnable with a custom type. **other_kwargs: Unpacked into the base class. """ - config = config or {} - # config_specs contains the list of valid `configurable` keys - if configurable := config.get("configurable", None): - allowed_keys = set(s.id for s in bound.config_specs) - for key in configurable: - if key not in allowed_keys: - raise ValueError( - f"Configurable key '{key}' not found in runnable with" - f" config keys: {allowed_keys}" - ) super().__init__( bound=bound, kwargs=kwargs or {}, diff --git a/libs/core/tests/unit_tests/runnables/test_runnable.py b/libs/core/tests/unit_tests/runnables/test_runnable.py index 935613a18be..696a70520b3 100644 --- a/libs/core/tests/unit_tests/runnables/test_runnable.py +++ b/libs/core/tests/unit_tests/runnables/test_runnable.py @@ -1278,9 +1278,6 @@ def test_configurable_fields_example() -> None: }, } - with pytest.raises(ValueError): - chain_configurable.with_config(configurable={"llm123": "chat"}) - assert ( chain_configurable.with_config(configurable={"llm": "chat"}).invoke( {"name": "John"}