Menu

#108 Add a first-class Gemini provider for Google's OpenAI-compatible endpoint

open
nobody
None
2026-08-11
2026-08-11
Anonymous
No

Originally created by: yablokolabs

Summary

Atomic's generic OpenAI-compatible provider always appends /v1/... to its configured base URL. Google's OpenAI-compatible API uses a versioned root ending in /v1beta/openai, so there is no straightforward direct Gemini configuration without a translating proxy.

This was finding §1 in Yabloko Labs' multi-provider evaluation. It is separate from the Gemini SSE, parallel-call, and retry defects already tracked in [#103], [#104], and [#106].

Current behavior

Current main registers openai-compatible, openrouter, and aimlapi, but no Gemini provider:

The OpenAI base normalizer only strips a trailing /v1, while request methods append /v1/chat/completions or /v1/models:

Google's current OpenAI-compatibility documentation specifies this API root:

https://generativelanguage.googleapis.com/v1beta/openai

With the generic Atomic path builder, that root receives another /v1 segment instead of targeting Gemini's documented /v1beta/openai/chat/completions route.

Proposed behavior

Add either:

  1. a first-class gemini provider/preset that owns Gemini's endpoint paths and key convention; or
  2. an endpoint-path option for OpenAI-compatible providers that preserves a versioned API root instead of unconditionally adding /v1.

A first-class provider would give the project a clean place for Gemini-specific retry metadata and stream normalization without making the generic provider conditional on hostnames.

[#69] (implemented) and its duplicate [#75] added presets for common endpoints that follow Atomic's normal /v1 convention. Their candidate list did not include Gemini, and a preset alone cannot fix the extra /v1 currently appended after Gemini's /v1beta/openai root. This request is therefore about endpoint-path behavior as well as setup convenience.

Acceptance criteria

  • Gemini can be configured directly without a localhost reverse proxy.
  • The models and chat-completions requests use valid /v1beta/openai/... paths.
  • Provider setup supports the Gemini API-key environment variable without writing the key to logs.
  • Existing OpenAI-compatible, OpenRouter, and AIMLAPI paths remain unchanged.
  • Tests pin URL construction for a base root that already contains /v1beta/openai.
  • [#103], [#104], and [#106] remain the canonical issues for SSE reconstruction, parallel-call control, and structured retry delay respectively.

Related

Tickets: #103
Tickets: #104
Tickets: #106
Tickets: #119
Tickets: #69
Tickets: #75

Discussion


Log in to post a comment.