ValueError: Channel names configurable are reserved #544

Closed
opened 2026-02-20 17:40:39 -05:00 by yindo · 2 comments
Owner

Originally created by @khteh on GitHub (Apr 1, 2025).

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

I suddenly hit this error: ValueError: Channel names configurable are reserved on StateGraph.compile(). I only have the following references to configurable in the following:

Example Code

@dataclass
class EmailRAGState(TypedDict):
    message: str
    extract: EmailModel | None

from pydantic import BaseModel, Field, computed_field

class EmailModel(BaseModel):
    date: str | None = Field(
        default=None,
        exclude=True,
        repr=False,
        description="""The date of the notice (if any) reformatted
        to match YYYY-mm-dd""",
    )
    entity_name: str | None = Field(
        default=None,
        description="""The name of the entity sending the notice (if present
        in the message)""",
    )
    entity_phone: str | None = Field(
        default=None,
        description="""The phone number of the entity sending the notice
        (if present in the message)""",
    )
    entity_email: str | None = Field(
        default=None,
        description="""The email of the entity sending the notice
        (if present in the message)""",
    )


init_chat_model("gemini-2.0-flash", model_provider="google_genai", configurable_fields=("user_id", "graph", "email_state"), streaming=True)

    async def ParseEmail(self, config: RunnableConfig, state: EmailRAGState) -> EmailRAGState:
        """
        Use the EmailModel LCEL to extract fields from email
        """
        logging.info(f"\n=== {self.ParseEmail.__name__} ===")
        state["extract"] = await self._email_parser_chain.with_config(config).ainvoke({"message": state["message"]}) if state["message"] else None
        return state

    async def NeedsEscalation(self, config: RunnableConfig, state: EmailRAGState) -> EmailRAGState:
        """
        Determine if an email needs escalation
        """
        logging.info(f"\n=== {self.NeedsEscalation.__name__} ===")
        result: EscalationCheckModel = await self._escalation_chain.with_config(config).ainvoke({"message": state["message"], "escalation_criteria": state["escalation_text_criteria"]}) if state and state["message"] else None
        state["escalate"] = (result.needs_escalation or state["extract"].max_potential_fine >= state["escalation_dollar_criteria"])
        return state

    graph_builder = StateGraph(EmailRAGState)
    graph_builder.add_node("ParseEmail", self.ParseEmail)
    graph_builder.add_node("NeedsEscalation", self.NeedsEscalation)
    graph_builder.add_edge(START, "ParseEmail")
    graph_builder.add_edge("ParseEmail", "NeedsEscalation")
    graph_builder.add_edge("NeedsEscalation", END)
    self._graph = graph_builder.compile(store=InMemoryStore(), checkpointer=MemorySaver(), name=self._name)
create_react_agent(self._llm, [email_processing_tool], store=InMemoryStore(), checkpointer=MemorySaver(), config_schema=EmailConfiguration, state_schema=EmailAgentState, name=self._name, prompt=self._prompt)
self._agent = create_react_agent(self._llm, [email_processing_tool], store=InMemoryStore(), checkpointer=MemorySaver(), config_schema=EmailConfiguration, state_schema=EmailAgentState, name=self._name, prompt=self._prompt)


    email_state = {
            "escalation_dollar_criteria": 100_000,
            "escalation_emails": ["me@abc.com", "me1@def.com"],
    }
    async for step in self._agent.with_config({"graph": self._graph, "email_state": email_state}).astream(
            {"messages": [{"role": "user", "content": message_with_criteria}]},
            #{"configurable": {"graph": self._graph, "email_state": email_state}},
            stream_mode="values",
            #config = config
    ):
        step["messages"][-1].pretty_print()

Error Message and Stack Trace (if applicable)

self._graph = graph_builder.compile(store=InMemoryStore(), checkpointer=MemorySaver(), name=self._name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/graph/state.py", line 676, in compile
    return compiled.validate()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/pregel/__init__.py", line 577, in validate
    validate_graph(
  File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/pregel/validate.py", line 20, in validate_graph
    raise ValueError(f"Channel names {chan} are reserved")
ValueError: Channel names configurable are reserved

Description

I don't find anywhere in my code which uses this reserved configurable keyword.

System Info

System Information
------------------
> OS:  Linux
> OS Version:  #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 19 16:50:40 UTC 2025
> Python Version:  3.12.7 (main, Feb  4 2025, 14:46:03) [GCC 14.2.0]

Package Information
-------------------
> langchain_core: 0.3.45
> langchain: 0.3.20
> langchain_community: 0.3.19
> langsmith: 0.3.15
> langchain_google_genai: 2.1.0
> langchain_google_vertexai: 2.0.9
> langchain_openai: 0.3.8
> langchain_text_splitters: 0.3.6
> langgraph_api: 0.0.28
> langgraph_cli: 0.1.75
> langgraph_license: Installed. No version info available.
> langgraph_sdk: 0.1.57
> langgraph_storage: Installed. No version info available.

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
> anthropic[vertexai]: Installed. No version info available.
> async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
> click: 8.1.8
> cryptography: 43.0.3
> dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
> filetype: 1.2.0
> google-ai-generativelanguage: 0.6.16
> google-cloud-aiplatform: 1.84.0
> google-cloud-storage: 2.19.0
> httpx: 0.27.2
> httpx-sse: 0.4.0
> httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
> jsonpatch<2.0,>=1.33: Installed. No version info available.
> jsonschema-rs: 0.20.0
> langchain-anthropic;: Installed. No version info available.
> langchain-aws;: Installed. No version info available.
> langchain-cohere;: Installed. No version info available.
> langchain-community;: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.34: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.41: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.42: Installed. No version info available.
> langchain-deepseek;: Installed. No version info available.
> langchain-fireworks;: Installed. No version info available.
> langchain-google-genai;: Installed. No version info available.
> langchain-google-vertexai;: Installed. No version info available.
> langchain-groq;: Installed. No version info available.
> langchain-huggingface;: Installed. No version info available.
> langchain-mistralai: Installed. No version info available.
> langchain-mistralai;: Installed. No version info available.
> langchain-ollama;: Installed. No version info available.
> langchain-openai;: Installed. No version info available.
> langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available.
> langchain-together;: Installed. No version info available.
> langchain-xai;: Installed. No version info available.
> langchain<1.0.0,>=0.3.20: Installed. No version info available.
> langgraph: 0.3.11
> langgraph-checkpoint: 2.0.20
> langsmith-pyo3: Installed. No version info available.
> langsmith<0.4,>=0.1.125: Installed. No version info available.
> langsmith<0.4,>=0.1.17: Installed. No version info available.
> numpy<3,>=1.26.2: Installed. No version info available.
> openai-agents: Installed. No version info available.
> openai<2.0.0,>=1.58.1: Installed. No version info available.
> orjson: 3.10.15
> packaging: 24.2
> packaging<25,>=23.2: Installed. No version info available.
> pydantic: 2.9.2
> pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
> pydantic<3.0.0,>=2.5.2;: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4;: Installed. No version info available.
> pyjwt: 2.10.1
> pytest: 8.3.2
> python-dotenv: 1.0.1
> PyYAML>=5.3: Installed. No version info available.
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> requests<3,>=2: Installed. No version info available.
> rich: 13.9.4
> SQLAlchemy<3,>=1.4: Installed. No version info available.
> sse-starlette: 2.1.3
> starlette: 0.46.1
> structlog: 25.1.0
> tenacity: 9.0.0
> tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
> tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
> tiktoken<1,>=0.7: Installed. No version info available.
> typing-extensions>=4.7: Installed. No version info available.
> uvicorn: 0.34.0
> watchfiles: 1.0.4
> zstandard: 0.23.0
Originally created by @khteh on GitHub (Apr 1, 2025). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. I suddenly hit this error: `ValueError: Channel names configurable are reserved` on `StateGraph.compile()`. I only have the following references to `configurable` in the following: ### Example Code ```python @dataclass class EmailRAGState(TypedDict): message: str extract: EmailModel | None from pydantic import BaseModel, Field, computed_field class EmailModel(BaseModel): date: str | None = Field( default=None, exclude=True, repr=False, description="""The date of the notice (if any) reformatted to match YYYY-mm-dd""", ) entity_name: str | None = Field( default=None, description="""The name of the entity sending the notice (if present in the message)""", ) entity_phone: str | None = Field( default=None, description="""The phone number of the entity sending the notice (if present in the message)""", ) entity_email: str | None = Field( default=None, description="""The email of the entity sending the notice (if present in the message)""", ) init_chat_model("gemini-2.0-flash", model_provider="google_genai", configurable_fields=("user_id", "graph", "email_state"), streaming=True) async def ParseEmail(self, config: RunnableConfig, state: EmailRAGState) -> EmailRAGState: """ Use the EmailModel LCEL to extract fields from email """ logging.info(f"\n=== {self.ParseEmail.__name__} ===") state["extract"] = await self._email_parser_chain.with_config(config).ainvoke({"message": state["message"]}) if state["message"] else None return state async def NeedsEscalation(self, config: RunnableConfig, state: EmailRAGState) -> EmailRAGState: """ Determine if an email needs escalation """ logging.info(f"\n=== {self.NeedsEscalation.__name__} ===") result: EscalationCheckModel = await self._escalation_chain.with_config(config).ainvoke({"message": state["message"], "escalation_criteria": state["escalation_text_criteria"]}) if state and state["message"] else None state["escalate"] = (result.needs_escalation or state["extract"].max_potential_fine >= state["escalation_dollar_criteria"]) return state graph_builder = StateGraph(EmailRAGState) graph_builder.add_node("ParseEmail", self.ParseEmail) graph_builder.add_node("NeedsEscalation", self.NeedsEscalation) graph_builder.add_edge(START, "ParseEmail") graph_builder.add_edge("ParseEmail", "NeedsEscalation") graph_builder.add_edge("NeedsEscalation", END) self._graph = graph_builder.compile(store=InMemoryStore(), checkpointer=MemorySaver(), name=self._name) create_react_agent(self._llm, [email_processing_tool], store=InMemoryStore(), checkpointer=MemorySaver(), config_schema=EmailConfiguration, state_schema=EmailAgentState, name=self._name, prompt=self._prompt) self._agent = create_react_agent(self._llm, [email_processing_tool], store=InMemoryStore(), checkpointer=MemorySaver(), config_schema=EmailConfiguration, state_schema=EmailAgentState, name=self._name, prompt=self._prompt) email_state = { "escalation_dollar_criteria": 100_000, "escalation_emails": ["me@abc.com", "me1@def.com"], } async for step in self._agent.with_config({"graph": self._graph, "email_state": email_state}).astream( {"messages": [{"role": "user", "content": message_with_criteria}]}, #{"configurable": {"graph": self._graph, "email_state": email_state}}, stream_mode="values", #config = config ): step["messages"][-1].pretty_print() ``` ### Error Message and Stack Trace (if applicable) ```shell self._graph = graph_builder.compile(store=InMemoryStore(), checkpointer=MemorySaver(), name=self._name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/graph/state.py", line 676, in compile return compiled.validate() ^^^^^^^^^^^^^^^^^^^ File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/pregel/__init__.py", line 577, in validate validate_graph( File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.12/site-packages/langgraph/pregel/validate.py", line 20, in validate_graph raise ValueError(f"Channel names {chan} are reserved") ValueError: Channel names configurable are reserved ``` ### Description I don't find anywhere in my code which uses this reserved `configurable` keyword. ### System Info ``` System Information ------------------ > OS: Linux > OS Version: #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 19 16:50:40 UTC 2025 > Python Version: 3.12.7 (main, Feb 4 2025, 14:46:03) [GCC 14.2.0] Package Information ------------------- > langchain_core: 0.3.45 > langchain: 0.3.20 > langchain_community: 0.3.19 > langsmith: 0.3.15 > langchain_google_genai: 2.1.0 > langchain_google_vertexai: 2.0.9 > langchain_openai: 0.3.8 > langchain_text_splitters: 0.3.6 > langgraph_api: 0.0.28 > langgraph_cli: 0.1.75 > langgraph_license: Installed. No version info available. > langgraph_sdk: 0.1.57 > langgraph_storage: Installed. No version info available. Optional packages not installed ------------------------------- > langserve Other Dependencies ------------------ > aiohttp<4.0.0,>=3.8.3: Installed. No version info available. > anthropic[vertexai]: Installed. No version info available. > async-timeout<5.0.0,>=4.0.0;: Installed. No version info available. > click: 8.1.8 > cryptography: 43.0.3 > dataclasses-json<0.7,>=0.5.7: Installed. No version info available. > filetype: 1.2.0 > google-ai-generativelanguage: 0.6.16 > google-cloud-aiplatform: 1.84.0 > google-cloud-storage: 2.19.0 > httpx: 0.27.2 > httpx-sse: 0.4.0 > httpx-sse<1.0.0,>=0.4.0: Installed. No version info available. > jsonpatch<2.0,>=1.33: Installed. No version info available. > jsonschema-rs: 0.20.0 > langchain-anthropic;: Installed. No version info available. > langchain-aws;: Installed. No version info available. > langchain-cohere;: Installed. No version info available. > langchain-community;: Installed. No version info available. > langchain-core<1.0.0,>=0.3.34: Installed. No version info available. > langchain-core<1.0.0,>=0.3.41: Installed. No version info available. > langchain-core<1.0.0,>=0.3.42: Installed. No version info available. > langchain-deepseek;: Installed. No version info available. > langchain-fireworks;: Installed. No version info available. > langchain-google-genai;: Installed. No version info available. > langchain-google-vertexai;: Installed. No version info available. > langchain-groq;: Installed. No version info available. > langchain-huggingface;: Installed. No version info available. > langchain-mistralai: Installed. No version info available. > langchain-mistralai;: Installed. No version info available. > langchain-ollama;: Installed. No version info available. > langchain-openai;: Installed. No version info available. > langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available. > langchain-together;: Installed. No version info available. > langchain-xai;: Installed. No version info available. > langchain<1.0.0,>=0.3.20: Installed. No version info available. > langgraph: 0.3.11 > langgraph-checkpoint: 2.0.20 > langsmith-pyo3: Installed. No version info available. > langsmith<0.4,>=0.1.125: Installed. No version info available. > langsmith<0.4,>=0.1.17: Installed. No version info available. > numpy<3,>=1.26.2: Installed. No version info available. > openai-agents: Installed. No version info available. > openai<2.0.0,>=1.58.1: Installed. No version info available. > orjson: 3.10.15 > packaging: 24.2 > packaging<25,>=23.2: Installed. No version info available. > pydantic: 2.9.2 > pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available. > pydantic<3.0.0,>=2.5.2;: Installed. No version info available. > pydantic<3.0.0,>=2.7.4: Installed. No version info available. > pydantic<3.0.0,>=2.7.4;: Installed. No version info available. > pyjwt: 2.10.1 > pytest: 8.3.2 > python-dotenv: 1.0.1 > PyYAML>=5.3: Installed. No version info available. > requests: 2.32.3 > requests-toolbelt: 1.0.0 > requests<3,>=2: Installed. No version info available. > rich: 13.9.4 > SQLAlchemy<3,>=1.4: Installed. No version info available. > sse-starlette: 2.1.3 > starlette: 0.46.1 > structlog: 25.1.0 > tenacity: 9.0.0 > tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available. > tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available. > tiktoken<1,>=0.7: Installed. No version info available. > typing-extensions>=4.7: Installed. No version info available. > uvicorn: 0.34.0 > watchfiles: 1.0.4 > zstandard: 0.23.0 ```
yindo closed this issue 2026-02-20 17:40:39 -05:00
Author
Owner

@vbarda commented on GitHub (Apr 1, 2025):

@khteh the order of node arguments is incorrect - state needs to go first, config - second, e.g.:

async def NeedsEscalation(self, state: EmailRAGState, config: RunnableConfig) -> EmailRAGState:
@vbarda commented on GitHub (Apr 1, 2025): @khteh the order of node arguments is incorrect - state needs to go first, config - second, e.g.: ```python async def NeedsEscalation(self, state: EmailRAGState, config: RunnableConfig) -> EmailRAGState: ```
Author
Owner

@RamziRebai commented on GitHub (Sep 11, 2025):

I had the same issue. I have done this and it worked well!
You must use MessagesState instead of declared EmailRAGState

from langgraph.graph import StateGraph, START, END, MessagesState

async def NeedsEscalation(self, state: MessagesState, config: RunnableConfig) , agent_builder_mcp = StateGraph(MessagesState) ...
@RamziRebai commented on GitHub (Sep 11, 2025): I had the same issue. I have done this and it worked well! You must use MessagesState instead of declared EmailRAGState ``` from langgraph.graph import StateGraph, START, END, MessagesState async def NeedsEscalation(self, state: MessagesState, config: RunnableConfig) , agent_builder_mcp = StateGraph(MessagesState) ... ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#544