Commit c1e852f
fix(cli): Serialize LiteLlm graph models safely
The graph serializer currently passes model fields through when their value is not a simple collection or nested agent. For LiteLlm that leaves the runtime LiteLLMClient object inside the serialized graph payload, so JSON encoding the graph fails.
This patch serializes BaseLlm values using their model name string value.model to ensure JSON safety and match the web UI frontend's expected string schema.
Merge #5956
closes #5949
Change-Id: Ie31f640f6d9bedd515fd85ad0d4de2f5ad1ef7d71 parent 928017d commit c1e852f
2 files changed
Lines changed: 19 additions & 0 deletions
File tree
- src/google/adk/cli/utils
- tests/unittests/cli/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
0 commit comments