Skip to content

fix(deepseek): forward response_format to OpenAI-compatible API#4635

Merged
kartik-mem0 merged 1 commit intomem0ai:mainfrom
rakheesingh:fix/deepseek-response-format
Mar 31, 2026
Merged

fix(deepseek): forward response_format to OpenAI-compatible API#4635
kartik-mem0 merged 1 commit intomem0ai:mainfrom
rakheesingh:fix/deepseek-response-format

Conversation

@rakheesingh
Copy link
Copy Markdown
Contributor

@rakheesingh rakheesingh commented Mar 31, 2026

The deepseek provider accepted response_format as a parameter but never passed it into the request params, causing JSON parsing failures during memory extraction and update when the model returned free-form text instead of constrained JSON output.

This is the same bug that was fixed in vllm.py (#4608), as noted by the maintainer during review.

Closes #4607

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional changes)
  • Documentation update

Breaking Changes

N/A

Test Coverage

  • I added/updated unit tests
  • I added/updated integration tests
  • I tested manually (describe below)
  • No tests needed (explain why)

The deepseek provider accepted response_format as a parameter but never
passed it into the request params, causing JSON parsing failures during
memory extraction and update when the model returned free-form text
instead of constrained JSON output.

This is the same bug that was fixed in vllm.py (mem0ai#4608), as noted by
the maintainer during review.

Closes mem0ai#4607

Made-with: Cursor
@kartik-mem0 kartik-mem0 merged commit 93bd4e2 into mem0ai:main Mar 31, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vllm provider drops response_format in generate_response, causing JSON parsing failures in memory extraction/update

2 participants