Skip to content

fix: support Google Gemini /models lfix: support Google Gemini models listing via x-goog-api-keyisting via x-goog-api-key header#55

Open
simplvis wants to merge 1 commit into
lidge-jun:mainfrom
simplvis:fix/google-models-listing
Open

fix: support Google Gemini /models lfix: support Google Gemini models listing via x-goog-api-keyisting via x-goog-api-key header#55
simplvis wants to merge 1 commit into
lidge-jun:mainfrom
simplvis:fix/google-models-listing

Conversation

@simplvis

@simplvis simplvis commented Jul 2, 2026

Copy link
Copy Markdown

Google Generative Language API uses x-goog-api-key header instead of Authorization: Bearer, and its /models response returns { models: [{ name: "models/gemini-..." }] } rather than OpenAI's { data: [{ id: "gemini-..." }] } format.
This fix handles both issues so that the Google provider's models appear in the opencodex dashboard and Codex model picker.

- buildModelsRequest: use x-goog-api-key header and /v1/models URL for Google adapter
- fetchProviderModels: normalize Gemini API response format (models array with   name field) to OpenAI-compatible shape (data array with id field)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant