You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,7 +41,10 @@ A proxy server that lets you use Anthropic clients with Gemini, OpenAI, or Anthr
40
41
41
42
*`ANTHROPIC_API_KEY`: (Optional) Needed only if proxying *to* Anthropic models.
42
43
*`OPENAI_API_KEY`: Your OpenAI API key (Required if using the default OpenAI preference or as fallback).
43
-
*`GEMINI_API_KEY`: Your Google AI Studio (Gemini) API key (Required if PREFERRED_PROVIDER=google).
44
+
*`GEMINI_API_KEY`: Your Google AI Studio (Gemini) API key (Required if `PREFERRED_PROVIDER=google` and `USE_VERTEX_AUTH=true`).
45
+
*`USE_VERTEX_AUTH` (Optional): Set to `true` to use Application Default Credentials (ADC) will be used (no static API key required). Note: when USE_VERTEX_AUTH=true, you must configure `VERTEX_PROJECT` and `VERTEX_LOCATION`.
46
+
*`VERTEX_PROJECT` (Optional): Your Google Cloud Project ID (Required if `PREFERRED_PROVIDER=google` and `USE_VERTEX_AUTH=true`).
47
+
*`VERTEX_LOCATION` (Optional): The Google Cloud region for Vertex AI (e.g., `us-central1`) (Required if `PREFERRED_PROVIDER=google` and `USE_VERTEX_AUTH=true`).
44
48
*`PREFERRED_PROVIDER` (Optional): Set to `openai` (default), `google`, or `anthropic`. This determines the primary backend for mapping `haiku`/`sonnet`.
45
49
*`BIG_MODEL` (Optional): The model to map `sonnet` requests to. Defaults to `gpt-4.1` (if `PREFERRED_PROVIDER=openai`) or `gemini-2.5-pro-preview-03-25`. Ignored when `PREFERRED_PROVIDER=anthropic`.
46
50
*`SMALL_MODEL` (Optional): The model to map `haiku` requests to. Defaults to `gpt-4.1-mini` (if `PREFERRED_PROVIDER=openai`) or `gemini-2.0-flash`. Ignored when `PREFERRED_PROVIDER=anthropic`.
@@ -151,13 +155,24 @@ GEMINI_API_KEY="your-google-key" # Needed if PREFERRED_PROVIDER=google
151
155
# SMALL_MODEL="gpt-4.1-mini" # Optional, it's the default
152
156
```
153
157
154
-
**Example 2: Prefer Google**
158
+
**Example 2a: Prefer Google (using GEMINI_API_KEY)**
155
159
```dotenv
156
160
GEMINI_API_KEY="your-google-key"
157
161
OPENAI_API_KEY="your-openai-key" # Needed for fallback
158
162
PREFERRED_PROVIDER="google"
159
-
# BIG_MODEL="gemini-2.5-pro-preview-03-25" # Optional, it's the default for Google pref
160
-
# SMALL_MODEL="gemini-2.0-flash" # Optional, it's the default for Google pref
163
+
# BIG_MODEL="gemini-2.5-pro" # Optional, it's the default for Google pref
164
+
# SMALL_MODEL="gemini-2.5-flash" # Optional, it's the default for Google pref
165
+
```
166
+
167
+
**Example 2b: Prefer Google (using Vertex AI with Application Default Credentials)**
168
+
```dotenv
169
+
OPENAI_API_KEY="your-openai-key" # Needed for fallback
170
+
PREFERRED_PROVIDER="google"
171
+
VERTEX_PROJECT="your-gcp-project-id"
172
+
VERTEX_LOCATION="us-central1"
173
+
USE_VERTEX_AUTH=true
174
+
# BIG_MODEL="gemini-2.5-pro" # Optional, it's the default for Google pref
175
+
# SMALL_MODEL="gemini-2.5-flash" # Optional, it's the default for Google pref
161
176
```
162
177
163
178
**Example 3: Use Direct Anthropic ("Just an Anthropic Proxy" Mode)**
0 commit comments