Skip to content

feat: add Gemini OpenAI compatibility#2911

Open
LichKing-2234 wants to merge 1 commit into
Wei-Shaw:mainfrom
LichKing-2234:codex/gemini-openai-compat
Open

feat: add Gemini OpenAI compatibility#2911
LichKing-2234 wants to merge 1 commit into
Wei-Shaw:mainfrom
LichKing-2234:codex/gemini-openai-compat

Conversation

@LichKing-2234
Copy link
Copy Markdown

Summary

  • Add Gemini-only /v1beta/openai compatibility routes for models, chat completions, embeddings, image generations, and videos.
  • Preserve OpenAI-compatible multimodal input_audio through the chat conversion path and add Gemini OpenAI-compatible embeddings/images forwarding.
  • Accept top-level account export imports and verify the local Gemini OAuth export fixture can import 10 accounts without committing credentials.
  • Update frontend Use Key examples to expose Gemini native and OpenAI-compatible base URLs.

Test Plan

  • SUB2API_ACCOUNT_IMPORT_FIXTURE=/Users/admin/Downloads/sub2api-account-20260529180922.json go test ./internal/handler/admin -run TestImportDataAcceptsLocalGeminiExportFixture -count=1
  • cd backend && go test ./...
  • cd frontend && pnpm test:run src/components/keys/__tests__/UseKeyModal.spec.ts
  • cd frontend && pnpm typecheck
  • git diff --check

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