This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Commit 599d8f6
authored
Workaround for system messages that contain a list of dicts (#1214)
In the litellm `ChatCompletionMessage` that we use a system message is
defined as follows:
```
class OpenAIChatCompletionSystemMessage(TypedDict, total=False):
role: Required[Literal["system"]]
content: Required[Union[str, List]]
name: str
```
So content can either be a string or a list. Our secret encryption code only
handled the string case. Since both cases will properly be handled by the
soon-to-be-coming rewrite, let's just add a workaround so that e.g. Cline with
Anthropic keeps working.
With the no-more-litellm branch, everything works as expected.
Fixes: #12071 parent ce37fa4 commit 599d8f6
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
319 | 328 | | |
320 | | - | |
| 329 | + | |
321 | 330 | | |
322 | 331 | | |
323 | 332 | | |
| |||
0 commit comments