Skip to content

Conversation

@davecrunch
Copy link

@davecrunch davecrunch commented Dec 5, 2025

Description

Fixes issue where Deepseek's ToolMessage field does not accept array input. Created workaround by converting array inputs into strings. Adjusted relevant test cases.

Files modified:

libs/partners/deepseek/langchain_deepseek/chatmodels.py
libs/partners/deepseek/tests/unit_tests/test_chat_models.py

Fixes #33965

Used Cursor for assistance

@github-actions github-actions bot added integration PR made that is related to a provider partner package integration deepseek `langchain-deepseek` package issues & PRs fix For PRs that implement a fix and removed fix For PRs that implement a fix labels Dec 5, 2025
@davecrunch davecrunch marked this pull request as ready for review December 5, 2025 21:56
@davecrunch
Copy link
Author

Hi, I'm running into this issue in the CI where the deepseek api key is not set. I'm not sure where this issue came up, I don't think it's introduced through my commits. Would appreciate some guidance on this, thank you! @mdrxy @ccurme

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify the issue here? All this is fixing is changing the string

"[]"

to the empty string "".

Does DeepSeek treat the string "[]" as an array?

@ccurme ccurme self-assigned this Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek `langchain-deepseek` package issues & PRs fix For PRs that implement a fix integration PR made that is related to a provider partner package integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some models' ToolMessage content fields do not support arrays.

2 participants