[GH-ISSUE #34] thinking_level incorrectly injected for gemini-3-flash (400 INVALID_ARGUMENT) #29

Closed
opened 2026-02-27 15:38:00 +03:00 by kerem · 1 comment
Owner

Originally created by @yulin0629 on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/34

thinking_level injected for models that do not support it (gemini-3-flash)

Description

The MITM proxy injects thinkingLevel=high includeThoughts=true into requests for gemini-3-flash, which does not support the thinking_level parameter. Google API returns 400:

{
  "error": {
    "code": 400,
    "message": "Unable to submit request because thinking_level is not supported by this model.",
    "status": "INVALID_ARGUMENT"
  }
}

Steps to Reproduce

  1. Send a request to gemini-3-flash through the proxy (e.g. from Claude Code or OpenCode)
  2. The MITM layer injects thinking parameters
  3. Google rejects with 400

Log Evidence

MITM: request modified [...] inject thinkingLevel=high includeThoughts=true,
  inject generationConfig: temperature=1.0(default-g3)

MITM: upstream error response  status=400
  \"message\": \"Unable to submit request because thinking_level is not supported by this model.\"

Expected

The proxy should not inject thinkingLevel / includeThoughts for models that do not support thinking (e.g. Flash models).

Version

v1.1.9 (ghcr.io/nikketryhard/zerogravity:v1.1.9), macOS Docker arm64.

Originally created by @yulin0629 on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/34 ## thinking_level injected for models that do not support it (gemini-3-flash) ### Description The MITM proxy injects `thinkingLevel=high includeThoughts=true` into requests for `gemini-3-flash`, which does not support the `thinking_level` parameter. Google API returns 400: ```json { "error": { "code": 400, "message": "Unable to submit request because thinking_level is not supported by this model.", "status": "INVALID_ARGUMENT" } } ``` ### Steps to Reproduce 1. Send a request to `gemini-3-flash` through the proxy (e.g. from Claude Code or OpenCode) 2. The MITM layer injects thinking parameters 3. Google rejects with 400 ### Log Evidence ``` MITM: request modified [...] inject thinkingLevel=high includeThoughts=true, inject generationConfig: temperature=1.0(default-g3) MITM: upstream error response status=400 \"message\": \"Unable to submit request because thinking_level is not supported by this model.\" ``` ### Expected The proxy should not inject `thinkingLevel` / `includeThoughts` for models that do not support thinking (e.g. Flash models). ### Version v1.1.9 (`ghcr.io/nikketryhard/zerogravity:v1.1.9`), macOS Docker arm64.
kerem closed this issue 2026-02-27 15:38:00 +03:00
Author
Owner

@NikkeTryHard commented on GitHub (Feb 20, 2026):

Fixed — the proxy now skips thinkingLevel/includeThoughts injection entirely for gemini-3-flash. Flash does implicit thinking (Google controls it), but rejects explicit thinkingLevel config with 400 INVALID_ARGUMENT.

Will be in the next release (v1.2.0+). Commit d70ac84.

<!-- gh-comment-id:3932285256 --> @NikkeTryHard commented on GitHub (Feb 20, 2026): Fixed — the proxy now skips `thinkingLevel`/`includeThoughts` injection entirely for `gemini-3-flash`. Flash does implicit thinking (Google controls it), but rejects explicit `thinkingLevel` config with 400 INVALID_ARGUMENT. Will be in the next release (v1.2.0+). Commit d70ac84.
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
starred/zerogravity#29
No description provided.