mirror of
https://github.com/deepseek-ai/DeepSeek-V3.git
synced 2026-11-05 00:47:48 +00:00
[GH-ISSUE #1069] [BUG] DeepSeek API Strict Mode Returns Malformed JSON in Function Call Arguments with Schema #659
Labels
No labels
closed-as-stale
enhancement
question
spam
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-V3#659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Forence1999 on GitHub (Dec 28, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V3/issues/1069
[BUG] DeepSeek API Strict Mode Returns Malformed JSON in Function Call Arguments
Describe the bug
When using
strict: truein the function/tool definition with DeepSeek API (beta endpoint), the API returns malformed JSON in thefunction.argumentsfield. Specifically, the first property key is missing its closing double quote, making the JSON unparseable.Example of malformed response:
Instead of the expected valid JSON:
This causes
json.loads()to fail with:To Reproduce
Minimal Reproducible Code
Steps to reproduce:
/betaendpointstrict: trueadditionalProperties: falsein parameters schemafunction.argumentsas JSONExpected behavior
The API should return valid JSON in
function.argumentsthat can be parsed with standard JSON parsers:Screenshots
Comparison Test Results
Test Code:
Output:
Key Observation: The only difference between the two tests is
strict: Truevsstrict: False. Withstrict=True, the closing quote is missing after"selected.Additional context
Environment
https://api.deepseek.com/betadeepseek-chatImpact
strict: true(usestrict: falseor omit the parameter)Additional Notes
/betaendpointstrict: false(default)Related
strictparameterLet me know if you need the complete test scripts or additional reproduction details.
@github-actions[bot] commented on GitHub (Jan 28, 2026):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Feb 11, 2026):
false