feat: add HK LiteLLM Vertex relay

This commit is contained in:
Codex
2026-07-22 00:20:28 -07:00
parent 290c7620bf
commit cb796981ee
3 changed files with 60 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# LiteLLM Vertex AI Relay
- 仅通过 HK 节点的 Tailscale IPv4 地址监听;`LISTEN_IP` 不要填写公网地址或 `0.0.0.0`
- ADC、LiteLLM key 仅存放于 Arcane `.env`,不得提交 Git。
- 后续 Vertex Anthropic 模型在 `config.yaml` 增加独立模型项。
+40
View File
@@ -0,0 +1,40 @@
services:
adc-init:
image: alpine:3.22
restart: "no"
environment:
GOOGLE_ADC_B64: ${GOOGLE_ADC_B64}
volumes:
- google-adc:/credentials
command:
- /bin/sh
- -c
- |
umask 077
printf '%s' "$${GOOGLE_ADC_B64}" | base64 -d > /credentials/application_default_credentials.json
litellm:
image: ghcr.io/berriai/litellm:main-stable
restart: unless-stopped
depends_on:
adc-init:
condition: service_completed_successfully
ports:
- "${LISTEN_IP}:${HOST_PORT:-4000}:4000"
environment:
GOOGLE_APPLICATION_CREDENTIALS: /credentials/application_default_credentials.json
VERTEXAI_PROJECT: ${VERTEXAI_PROJECT}
VERTEXAI_LOCATION: ${VERTEXAI_LOCATION:-global}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
volumes:
- ./config.yaml:/app/config.yaml:ro
- google-adc:/credentials:ro
command: ["--config", "/app/config.yaml", "--port", "4000"]
logging:
driver: json-file
options:
max-size: 1m
max-file: "2"
volumes:
google-adc:
+15
View File
@@ -0,0 +1,15 @@
model_list:
- model_name: gemini-3.6-flash
litellm_params:
model: vertex_ai/gemini-3.6-flash
vertex_project: os.environ/VERTEXAI_PROJECT
vertex_location: os.environ/VERTEXAI_LOCATION
- model_name: gemini-3.5-flash-lite
litellm_params:
model: vertex_ai/gemini-3.5-flash-lite
vertex_project: os.environ/VERTEXAI_PROJECT
vertex_location: os.environ/VERTEXAI_LOCATION
general_settings:
master_key: os.environ/LITELLM_MASTER_KEY