mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-10-26 16:48:49 +00:00
* fix(google-genai): map thinking effort off to LOW for Gemini 4 models Gemini 4 supports only LOW/MEDIUM/HIGH thinking levels and always thinks; sending MINIMAL for effort=off makes every request fail with a 400. Degrade 'off' to LOW (thoughts still hidden) for gemini-4 models in both the agent-core-v2 requester and the legacy kosong provider, keeping MINIMAL for Gemini 3. Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> * fix(google-genai): drop comment in comment-free agent-core-v2 source Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> * fix(google-genai): preserve effort off in thinkingEffort for Gemini 4 LOW with suppressed thoughts is the Gemini 4 encoding of 'off', so map it back to 'off' in the thinkingEffort getter instead of reporting 'low'. Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> * fix(google-genai): keep explicit LOW kwargs reported as low on non-Gemini-4 Only Gemini 4 encodes 'off' as LOW with suppressed thoughts, so gate the reverse mapping on the model; a caller-supplied LOW/includeThoughts=false on other models keeps reporting 'low'. Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> * fix(google-genai): report LOW as low in thinkingEffort again Gemini 4 encodes 'off' as LOW with suppressed thoughts, which is indistinguishable from an explicit LOW/includeThoughts=false kwarg, so no reverse mapping can serve both callers. Nothing in the repo reads this getter to persist or display effort, so keep the derive-from-kwargs semantics; for Gemini 4's 'off', 'low' is the honest report of what runs. Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> * fix(google-genai): reject thinking effort off for Gemini 4 models Gemini 4 supports only LOW/MEDIUM/HIGH thinking levels and always thinks, so requesting effort 'off' now fails fast with a clear thinking-config error (matching the always-reasons rejection other protocols already use) instead of sending an invalid MINIMAL level or silently degrading to LOW. Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> --------- Co-authored-by: kimi-agent-bot <kimi-agent-bot@users.noreply.github.com> Co-authored-by: 7Hanrui <qihanrui@moonshot.ai> |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| CHANGELOG.md | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.type-negative.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||