Commit b21a652
committed
Implement 3 integration kwargs that were silently dropped
These kwargs are documented on the website but never wired up in the
runtime integrations. Users passing them got a variety of broken
behaviour — none of which raised, so the bugs were invisible.
LangChainMemory
- session_id: previously accepted via **kwargs and ignored. Multiple
LangChainMemory(agent_id=X, session_id='A') and session_id='B' shared
a single history (verified live). Now each session_id namespaces
message storage under a separate key prefix — sessions are isolated.
- return_messages: previously accepted via **kwargs and ignored.
load_memory_variables always returned a concatenated 'Human: ... /
AI: ...' string regardless. Now when True, returns a list of
langchain_core.messages.HumanMessage/AIMessage objects suitable for
chat models. Defaults to False (prior behaviour preserved).
CrewAIMemory
- crew_name: previously raised TypeError
('unexpected keyword argument crew_name') on construction. Now
accepted; stored as self.crew_name (falls back to crew_id).
Verified: 28/28 tests pass (7 new targeted tests + 15 README examples
in local mode + 6 live framework integrations with real LLM calls and
live MCP stdio). No back-compat regressions — existing callers with no
new kwargs behave identically.1 parent ed5031e commit b21a652
2 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
| |||
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | | - | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
106 | | - | |
107 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
108 | 122 | | |
109 | 123 | | |
110 | 124 | | |
| |||
114 | 128 | | |
115 | 129 | | |
116 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
117 | 146 | | |
118 | 147 | | |
119 | 148 | | |
| |||
130 | 159 | | |
131 | 160 | | |
132 | 161 | | |
133 | | - | |
134 | | - | |
| 162 | + | |
| 163 | + | |
135 | 164 | | |
136 | 165 | | |
137 | 166 | | |
| |||
0 commit comments