Skip to content

Commit 4830659

Browse files
joybnuuyclaude
andcommitted
fix: add KIMI_THINKING_DISABLED env var + revert reasoning_content patches
Reverts the reasoning_content patches (ineffective — OpenCode Go proxy strips them). Adds KIMI_THINKING_DISABLED=1 env var to explicitly send thinking:disabled in the request body, working around the OpenCode proxy bug (anomalyco/opencode#10996). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 24398f3 commit 4830659

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/kimi_cli/llm.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def create_llm(
150150

151151
if gen_kwargs:
152152
chat_provider = chat_provider.with_generation_kwargs(**gen_kwargs)
153+
if os.getenv("KIMI_THINKING_DISABLED", "").lower() in ("1", "true", "yes"):
154+
chat_provider = chat_provider.with_thinking("off")
153155
case "openai_legacy":
154156
from kosong.contrib.chat_provider.openai_legacy import OpenAILegacy
155157

0 commit comments

Comments
 (0)