Run encountered an error in graph: <class 'TypeError'>(Configuration.__init__() got an unexpected keyword argument 'host')

Hey randomly, I started getting this error:

langgraph-api-1 | error | Run encountered an error in graph: <class ‘TypeError’>(Configuration.init() got an unexpected keyword argument ‘host’) | Traceback (most recent call last):
File “/api/langgraph_api/worker.py”, line 138, in wrap_user_errors
File “/api/langgraph_api/stream.py”, line 379, in consume
File “/api/langgraph_api/stream.py”, line 364, in consume
File “/api/langgraph_api/stream.py”, line 275, in astream_state
File “/api/langgraph_api/asyncio.py”, line 91, in wait_if_not_done
File “/usr/local/lib/python3.11/site-packages/langgraph/pregel/main.py”, line 2863, in astream
context=_coerce_context(self.context_schema, context),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/langgraph/pregel/main.py”, line 3260, in _coerce_context
return context_schema(**context) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Configuration.init() got an unexpected keyword argument ‘host’
langgraph-api-1 | error | Background run failed. Exception: <class ‘TypeError’>(Configuration.init() got an unexpected keyword argument ‘host’)

When it was working:
{“sdk”:“langsmith-py”,“sdk_version”:“0.4.13”,“library”:“langchain-core”,“platform”:“Linux-6.6.72±x86_64-with-glibc2.36”,“runtime”:“python”,“py_implementation”:“CPython”,“runtime_version”:“3.11.13”,“langchain_version”:“0.3.27”,“langchain_core_version”:“0.3.72”,“library_version”:“0.3.72”}
langgraph_api_version: “0.2.125”, langgraph_version: “0.6.3”

When it started failing:
{“sdk”:“langsmith-py”,“sdk_version”:“0.4.13”,“library”:“langchain-core”,“platform”:“Linux-6.6.87±x86_64-with-glibc2.36”,“runtime”:“python”,“py_implementation”:“CPython”,“runtime_version”:“3.11.13”,“langchain_version”:“0.3.27”,“langchain_core_version”:“0.3.74”,“library_version”:“0.3.74”}langgraph_api_version: “0.2.128”, langgraph_version: “0.6.4”

I tried downgrading the langgraph and langchain version, didn’t work.

1 Like

Hi artharv, thanks for posting this question. At first glance I would guess that this is related to bumping the langgraph_version but I am not 100% sure. I have a few more questions that will help me dig down a little deeper to the root cause:

  1. What does your Configuration class look like?
  2. How are you invoking your graph?
  3. I assume this is a hosted graph - did you make any new revisions between the time it was working and the time it stopped working?