Problem
Two custom model providers were missing the LangChain serialization protocol, causing to receive {"type": "not_implemented"} instead of the actual model kwargs.
Affected classes
| Class |
File |
Parent |
PatchedChatDeepSeek |
deerflow/models/patched_deepseek.py |
ChatDeepSeek |
CodexChatModel |
deerflow/models/openai_codex_provider.py |
BaseChatModel |
Root cause
ChatDeepSeek does not implement is_lc_serializable(), so it returns False (the Serializable base class default). When a subclass inherits this, to_json() short-circuits to {"type": "not_implemented", "repr": "..."} with no kwargs field.
CodexChatModel inherits directly from BaseChatModel, which also does not override is_lc_serializable().
The other patched providers (PatchedChatOpenAI, PatchedChatMiniMax, VllmChatModel, ClaudeChatModel) are unaffected because their parent classes (ChatOpenAI, ChatAnthropic) already return True.
Problem
Two custom model providers were missing the LangChain serialization protocol, causing to receive
{"type": "not_implemented"}instead of the actual model kwargs.Affected classes
PatchedChatDeepSeekdeerflow/models/patched_deepseek.pyChatDeepSeekCodexChatModeldeerflow/models/openai_codex_provider.pyBaseChatModelRoot cause
ChatDeepSeekdoes not implementis_lc_serializable(), so it returnsFalse(theSerializablebase class default). When a subclass inherits this,to_json()short-circuits to{"type": "not_implemented", "repr": "..."}with nokwargsfield.CodexChatModelinherits directly fromBaseChatModel, which also does not overrideis_lc_serializable().The other patched providers (
PatchedChatOpenAI,PatchedChatMiniMax,VllmChatModel,ClaudeChatModel) are unaffected because their parent classes (ChatOpenAI,ChatAnthropic) already returnTrue.