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
Copy file name to clipboardExpand all lines: plugins/wasm-go/extensions/ai-proxy/README.md
+82Lines changed: 82 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,6 +331,20 @@ Express Mode 是 Vertex AI 推出的简化访问模式,只需 API Key 即可
331
331
|`apiTokens`| array of string | 必填 | - | Express Mode 使用的 API Key,从 Google Cloud Console 的 API & Services > Credentials 获取 |
332
332
|`geminiSafetySetting`| map of string | 非必填 | - | Gemini AI 内容过滤和安全级别设定。参考[Safety settings](https://ai.google.dev/gemini-api/docs/safety-settings)|
333
333
334
+
**OpenAI 兼容模式**(使用 Vertex AI Chat Completions API):
335
+
336
+
Vertex AI 提供了 OpenAI 兼容的 Chat Completions API 端点,可以直接使用 OpenAI 格式的请求和响应,无需进行协议转换。详见 [Vertex AI OpenAI 兼容性文档](https://cloud.google.com/vertex-ai/generative-ai/docs/migrate/openai/overview)。
Copy file name to clipboardExpand all lines: plugins/wasm-go/extensions/ai-proxy/README_EN.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,20 @@ Express Mode is a simplified access mode introduced by Vertex AI. You can quickl
277
277
|`apiTokens`| array of string | Required | - | API Key for Express Mode, obtained from Google Cloud Console under API & Services > Credentials |
278
278
|`vertexGeminiSafetySetting`| map of string | Optional | - | Gemini model content safety filtering settings. |
279
279
280
+
**OpenAI Compatible Mode** (using Vertex AI Chat Completions API):
281
+
282
+
Vertex AI provides an OpenAI-compatible Chat Completions API endpoint, allowing you to use OpenAI format requests and responses directly without protocol conversion. See [Vertex AI OpenAI Compatibility documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/migrate/openai/overview).
283
+
284
+
| Name | Data Type | Requirement | Default | Description |
|`vertexAuthKey`| string | Required | - | Google Service Account JSON Key for authentication |
288
+
|`vertexRegion`| string | Required | - | Google Cloud region (e.g., us-central1, europe-west4) |
289
+
|`vertexProjectId`| string | Required | - | Google Cloud Project ID |
290
+
|`vertexAuthServiceName`| string | Required | - | Service name for OAuth2 authentication |
291
+
292
+
**Note**: OpenAI Compatible Mode and Express Mode are mutually exclusive. You cannot configure both `apiTokens` and `vertexOpenAICompatible` at the same time.
293
+
280
294
#### AWS Bedrock
281
295
282
296
For AWS Bedrock, the corresponding `type` is `bedrock`. It supports two authentication methods:
@@ -1848,6 +1862,71 @@ provider:
1848
1862
}
1849
1863
```
1850
1864
1865
+
### Utilizing OpenAI Protocol Proxy for Google Vertex Services (OpenAI Compatible Mode)
1866
+
1867
+
OpenAI Compatible Mode uses Vertex AI's OpenAI-compatible Chat Completions API. Both requests and responses use OpenAI format, requiring no protocol conversion.
"content": "Hello! I am Gemini, an AI model developed by Google. I can help answer questions, provide information, and engage in conversations. How can I assist you today?"
1915
+
},
1916
+
"finish_reason": "stop"
1917
+
}
1918
+
],
1919
+
"created": 1729986750,
1920
+
"model": "gemini-2.0-flash",
1921
+
"object": "chat.completion",
1922
+
"usage": {
1923
+
"prompt_tokens": 12,
1924
+
"completion_tokens": 35,
1925
+
"total_tokens": 47
1926
+
}
1927
+
}
1928
+
```
1929
+
1851
1930
### Utilizing OpenAI Protocol Proxy for AWS Bedrock Services
0 commit comments