Bug: Gemini model triggers OpenAI Chat Completions path (400 from Google OpenAI-compat endpoint)

Summary
Selecting Provider: Google (Gemini) with Model: Gemini 2.0 Flash in Pickaxe results in calls to Google’s OpenAI-compat endpoint /v1beta/openai/chat/completions, producing 400 Client Error: Bad Request. The request appears to use OpenAI Chat Completions schema instead of Gemini native schema.

Environment

  • App: Pickaxe (Form-style tool with Connected Action disabled for test)
  • Model: Google Gemini 2.0 Flash
  • Provider key: Google API key
  • Date/Time:
  • Region:
  • Project/Tool ID:

Expected
When Provider = Google (Gemini), Pickaxe should call Gemini native endpoint and payload format (either models/gemini-...:generateContent or the current GA equivalent), not the OpenAI-compat route.

Actual
Network error shown in UI:

400 Client Error: Bad Request for url: https://generativelanguage.googleapis.com/v1beta/openai/chat/completions

image

Symptoms indicate Pickaxe routed via OpenAI-compat and sent an OpenAI-style chat.completions body.

Repro Steps

  1. Create a new Pickaxe (any tool).
  2. In Model settings, choose Provider: Google (Gemini).
  3. Select Model: Gemini 2.0 Flash.
  4. Save and run a simple prompt (e.g., “hello world”).
  5. Observe 400 error with URL ending in /v1beta/openai/chat/completions.

Evidence / Logs

  • Screenshot of error (attached).
  • (If available) Network tab shows request to .../v1beta/openai/chat/completions with OpenAI-style fields (model, messages, etc.).

Impact

  • Blocks use of Gemini models in Pickaxe even with correct Google API key.
  • Affects any user selecting Gemini 2.0 Flash via native provider flow.

Hypothesis
Provider/model switcher isn’t switching the transport + serializer; it continues using the OpenAI Chat Completions client and payload while swapping only the model id, causing a 400 at Google’s OpenAI-compat endpoint.

@stephenasuncion @stephenpickaxe @carsondev

Thanks for the flag Ned, we’ll take a look asap :cook:

You’re the best!

1 Like