Google Gemini, OpenAI-compatible Proxy

 1---
 2# Passthrough access to the Google Gemini API's OpenAI-compatible endpoints, with the platform's
 3# API key. Use the OpenAI SDK, with this Proxy's URL as its base_url:
 4#
 5#   client = OpenAI(base_url="https://<smarter>/api/v1/proxy/googleai_openai/", api_key="<Smarter API key>")
 6#   client.chat.completions.create(model="gemini-2.5-flash", messages=[...])
 7#
 8# It is the same Provider as the googleai Proxy, with another baseUrl and auth.
 9apiVersion: smarter.sh/v1
10kind: Proxy
11metadata:
12  name: googleai_openai
13  description: Passthrough access to the Google Gemini API's OpenAI-compatible chat completions, embeddings and models.
14  version: 1.0.0
15  tags:
16    - google
17    - gemini
18    - openai-compatible
19    - builtin
20  annotations:
21    - smarter.sh/proxy/builtin: "true"
22    - smarter.sh/proxy/documentation: https://ai.google.dev/gemini-api/docs/openai
23spec:
24  provider: googleai
25  apiKey: gemini_api_key
26  baseUrl: https://generativelanguage.googleapis.com/v1beta/openai/
27  auth:
28    header: Authorization
29    scheme: Bearer
30  allowedPaths:
31    - chat/completions
32    - embeddings
33    - models
34    - models/*
35  timeout: 300
36  isActive: true