修改config,添加模型;指定litellm主版本规避风险

This commit is contained in:
root
2026-04-01 12:12:34 +08:00
parent 1e27201675
commit 63658dadd2
3 changed files with 45 additions and 11 deletions
+40 -8
View File
@@ -64,6 +64,39 @@ model_list:
extra_body:
reasoning_effort: "minimal"
- model_name: doubao-seed-2-0-pro
litellm_params:
<<: *token_pricing
model: volcengine/doubao-seed-2-0-pro-260215
api_base: os.environ/HUOSHAN_BASE_URL
api_key: os.environ/HUOSHAN_API_KEY
timeout: 1800
extra_headers:
Connection: "close"
# doubao-seed-2-0-pro 强制中等思考,用作回退
- model_name: doubao-seed-2-0-pro-medium
litellm_params:
<<: *token_pricing
model: volcengine/doubao-seed-2-0-pro-260215
api_base: os.environ/HUOSHAN_BASE_URL
api_key: os.environ/HUOSHAN_API_KEY
timeout: 1800
extra_headers:
Connection: "close"
extra_body:
reasoning_effort: "medium"
- model_name: doubao-seed-2-0-lite
litellm_params:
<<: *token_pricing
model: volcengine/doubao-seed-2-0-lite-260215
api_base: os.environ/HUOSHAN_BASE_URL
api_key: os.environ/HUOSHAN_API_KEY
extra_headers:
Connection: "close"
- model_name: glm-4.7
litellm_params:
<<: *token_pricing
@@ -100,20 +133,20 @@ model_list:
extra_body:
reasoning_effort: "minimal"
- model_name: fanyi
litellm_params:
<<: *token_pricing
model: volcengine/glm-4-7-251222
model: volcengine/doubao-seed-2-0-lite-260215
api_base: os.environ/HUOSHAN_BASE_URL
api_key: os.environ/HUOSHAN_API_KEY
api_key: os.environ/HUOSHAN_API_KEY
timeout: 120
stream: false
extra_headers:
Connection: "close"
Connection: "close"
extra_body:
thinking:
type: "disabled"
reasoning_effort: "minimal"
@@ -124,7 +157,7 @@ litellm_settings:
# fallbacks: [
# {"gemini-2.5-flash": ["gemini-2.5-pro"]}
# ]
# default_fallbacks: ["gemini-2.5-flash"]
default_fallbacks: ["doubao-seed-2-0-pro-medium"]
request_timeout: 120 # raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout
cache: False # 开启缓存
# cache_params:
@@ -132,7 +165,6 @@ litellm_settings:
# supported_call_types: ["completion", "embedding", "acompletion"] # 支持的类型
allowed_fails: 3 # cooldown model if it fails > 1 call in a minute.
# 关键配置:注册自定义回调,实现单上游模型每日token限制的关键
#callbacks: ["daily_limit.proxy_handler_instance"]
callbacks: ["volc_limit_sync.proxy_handler_instance"]
router_settings: # router_settings are optional
+3 -2
View File
@@ -48,9 +48,10 @@ REDIS_PASSWORD = os.getenv("REDIS_PASSWORD", None)
MODEL_QUOTAS = {
"deepseek-v3-2-251201:ba0383d3": 1600000,
"doubao-seed-1-8-251228:ba0383d3": 1800000, # 测试限额
"doubao-seed-1-8-251228:ba0383d3": 1800000,
"glm-4-7-251222:ba0383d3": 1800000,
"doubao-seed-1-8-251228:d57edef4": 1500000, # 测试重名
"doubao-seed-2-0-pro-260215:ba0383d3": 1900000,
"doubao-seed-2-0-lite-260215:ba0383d3": 1900000,
}
+2 -1
View File
@@ -1,7 +1,8 @@
services:
litellm:
mem_limit: 2048m
image: ghcr.io/berriai/litellm:main-latest
#image: ghcr.io/berriai/litellm:main-latest # 注意:1.82.7,1.82.8被投毒
image: ghcr.io/berriai/litellm@sha256:7c311546c25e7bb6e8cafede9fcd3d0d622ac636b5c9418befaa32e85dfb0186
container_name: litellm
restart: unless-stopped
volumes: