Problem
google/gemini-2.5-flash-image rejects the no-thinking request shape used by Docker Agent in some paths. A minimal text request succeeds when thinkingConfig is omitted, but the same request with thinkingConfig: {"thinkingBudget": 0} returns HTTP 400 INVALID_ARGUMENT: Thinking is not enabled for this model.
Docker Agent's WithNoThinking / MCP sampling path can serialize this shape, causing requests to fail for Gemini Flash Image.
Evidence
Isolated gateway probes on 2026-09-10 reproduced the behavior:
thinkingConfig omitted: accepted.
thinkingConfig: {"thinkingBudget": 0}: rejected with the 400 above.
Sanitized reproduction
The following is illustrative and contains no credentials:
{
"model": "google/gemini-2.5-flash-image",
"contents": [{"role": "user", "parts": [{"text": "Reply with OK"}]}],
"thinkingConfig": {"thinkingBudget": 0}
}
Send the JSON to the configured Gemini-compatible gateway with a redacted bearer credential, for example:
curl -sS -X POST "https://<gateway>/v1beta/models/google%2Fgemini-2.5-flash-image:generateContent" \
-H "Authorization: Bearer <REDACTED>" \
-H "Content-Type: application/json" \
--data @request.json
Expected behavior
Omit thinkingConfig for models that do not support thinking. Retain the existing disable-thinking semantics for models that do support thinking.
Scope
This issue covers the confirmed Gemini Flash Image incompatibility only. The unconfirmed Gemini 3.8 failure is explicitly out of scope.
Related epic: #3996
Problem
google/gemini-2.5-flash-imagerejects the no-thinking request shape used by Docker Agent in some paths. A minimal text request succeeds whenthinkingConfigis omitted, but the same request withthinkingConfig: {"thinkingBudget": 0}returns HTTP 400INVALID_ARGUMENT:Thinking is not enabled for this model.Docker Agent's
WithNoThinking/ MCP sampling path can serialize this shape, causing requests to fail for Gemini Flash Image.Evidence
Isolated gateway probes on 2026-09-10 reproduced the behavior:
thinkingConfigomitted: accepted.thinkingConfig: {"thinkingBudget": 0}: rejected with the 400 above.Sanitized reproduction
The following is illustrative and contains no credentials:
{ "model": "google/gemini-2.5-flash-image", "contents": [{"role": "user", "parts": [{"text": "Reply with OK"}]}], "thinkingConfig": {"thinkingBudget": 0} }Send the JSON to the configured Gemini-compatible gateway with a redacted bearer credential, for example:
Expected behavior
Omit
thinkingConfigfor models that do not support thinking. Retain the existing disable-thinking semantics for models that do support thinking.Scope
This issue covers the confirmed Gemini Flash Image incompatibility only. The unconfirmed Gemini 3.8 failure is explicitly out of scope.
Related epic: #3996