[GH-ISSUE #850] [Docs] Missing comma in Thinking Mode Python example #702

Closed
opened 2026-10-26 21:25:42 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @isayrhythm on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/850

The Python examples for Thinking Mode contain a syntax error caused by a missing comma after reasoning_effort="high".

Affected pages:

  • English documentation

    • Thinking Mode
    • Streaming example
    • Non-streaming example
  • Chinese documentation

    • 思考模式
    • 流式示例
    • 非流式示例

Current:

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=messages,
    reasoning_effort="high"
    extra_body={"thinking": {"type": "enabled"}},
)

Should be:

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=messages,
    reasoning_effort="high",
    extra_body={"thinking": {"type": "enabled"}},
)

Without the comma, the example raises a Python SyntaxError.

It appears that the same issue exists in both the English and Chinese documentation, as well as in both streaming and non-streaming examples.

I found this while trying to run the example code directly from the documentation.

Thanks.

Originally created by @isayrhythm on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/850 The Python examples for Thinking Mode contain a syntax error caused by a missing comma after `reasoning_effort="high"`. Affected pages: * English documentation * Thinking Mode * Streaming example * Non-streaming example * Chinese documentation * 思考模式 * 流式示例 * 非流式示例 Current: ```python response = client.chat.completions.create( model="deepseek-v4-pro", messages=messages, reasoning_effort="high" extra_body={"thinking": {"type": "enabled"}}, ) ``` Should be: ```python response = client.chat.completions.create( model="deepseek-v4-pro", messages=messages, reasoning_effort="high", extra_body={"thinking": {"type": "enabled"}}, ) ``` Without the comma, the example raises a Python `SyntaxError`. It appears that the same issue exists in both the English and Chinese documentation, as well as in both streaming and non-streaming examples. I found this while trying to run the example code directly from the documentation. Thanks.
bsakaguchi 2026-10-26 21:25:42 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 5, 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!

<!-- gh-comment-id:4884267518 --> @github-actions[bot] commented on GitHub (Jul 5, 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!
Author
Owner

@github-actions[bot] commented on GitHub (Jul 19, 2026):

false

<!-- gh-comment-id:5013741891 --> @github-actions[bot] commented on GitHub (Jul 19, 2026): false
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-R1#702
No description provided.