[GH-ISSUE #5139] [Bug] Failed to connect to Google Gemini API: 400 Invalid JSON payload ("store" field not found) #2406

Open
opened 2026-11-04 01:59:01 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @rfsrio2 on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5139

When attempting to configure and use Google Gemini models (e.g., gemini-1.5-flash, gemini-3.1-pro-preview) via external API provider settings in Strata, the application fails to establish a working connection and returns error payloads.

Steps to Reproduce:

  1. Go to Settings > Models > API provider.
  2. Select Google Gemini (or configure a custom OpenAI-compatible API pointing to [https://generativelanguage.googleapis.com/v1beta/openai](https://generativelanguage.googleapis.com/v1beta/openai)).
  3. Set the protocol to OpenAI Chat Completions.
  4. Input a valid Google AI Studio API Key and select a Gemini model.
  5. Send a chat message.

Observed Behavior:

  • Initially, selecting certain model identifiers results in a 404 status code (no body) error.
  • When using supported OpenAI-compatible endpoints, the API rejects the request with a 400 Bad Request error:
{"error":{"code":400,"message":"Invalid JSON payload received. Unknown name \"store\": Cannot find field.","status":"INVALID_ARGUMENT"}}

Root Cause Analysis:

It appears that Strata is automatically injecting an OpenAI-specific native parameter ("store") into the request payload body. The Google Gemini API's OpenAI compatibility layer does not recognize or support the "store" field, causing the server to reject the payload entirely.

Environment:

  • OS: Windows 11 Pro
  • Strata Version: 0.2.9 (or latest)
  • Local Model Working: Yes (Swift 1.5 IQ2_XS runs locally without issues; the bug is isolated to external Gemini API integration).

Originally created by @rfsrio2 on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5139 When attempting to configure and use Google Gemini models (e.g., `gemini-1.5-flash`, `gemini-3.1-pro-preview`) via external API provider settings in Strata, the application fails to establish a working connection and returns error payloads. #### **Steps to Reproduce:** 1. Go to **Settings > Models > API provider**. 2. Select **Google Gemini** (or configure a custom OpenAI-compatible API pointing to `[https://generativelanguage.googleapis.com/v1beta/openai](https://generativelanguage.googleapis.com/v1beta/openai)`). 3. Set the protocol to `OpenAI Chat Completions`. 4. Input a valid Google AI Studio API Key and select a Gemini model. 5. Send a chat message. #### **Observed Behavior:** * Initially, selecting certain model identifiers results in a `404 status code (no body)` error. * When using supported OpenAI-compatible endpoints, the API rejects the request with a `400 Bad Request` error: ```json {"error":{"code":400,"message":"Invalid JSON payload received. Unknown name \"store\": Cannot find field.","status":"INVALID_ARGUMENT"}} ``` #### **Root Cause Analysis:** It appears that Strata is automatically injecting an OpenAI-specific native parameter (`"store"`) into the request payload body. The Google Gemini API's OpenAI compatibility layer does not recognize or support the `"store"` field, causing the server to reject the payload entirely. #### **Environment:** * **OS:** Windows 11 Pro * **Strata Version:** 0.2.9 (or latest) * **Local Model Working:** Yes (Swift 1.5 IQ2_XS runs locally without issues; the bug is isolated to external Gemini API integration). ---
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6611271368 --> @github-actions[bot] commented on GitHub (Nov 3, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
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
Niko1221/Strata#2406
No description provided.