Commit ecbefd9
fix: exclude LiteLlm llm_client from JSON serialization
The llm_client field holds a LiteLLMClient with no JSON representation, so
serializing a LiteLlm agent (as adk web and api_server do when returning
the agent graph) raised PydanticSerializationError and 500'd every request
for LiteLlm-based agents. Exclude the client from serialization; it is
runtime state, not data.
Close #6164
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 9490348311 parent 98fc036 commit ecbefd9
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2679 | 2679 | | |
2680 | 2680 | | |
2681 | 2681 | | |
2682 | | - | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
2683 | 2685 | | |
2684 | 2686 | | |
2685 | 2687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6335 | 6335 | | |
6336 | 6336 | | |
6337 | 6337 | | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
0 commit comments