feat: 新增智谱 GLM 供应商(6 模型,3 视觉;密钥走 data/.env)

This commit is contained in:
api-gateway committed 2026-09-16 09:16:27 +08:00
1 parent 329ebf089e
commit 2a1f0d19d9
8 files changed
+80 -9

No files matched your search

+37 -2
View File
@@ -1,6 +1,6 @@
# AI 网关配置文件(data/ 目录)
# 供应商:Agnes / b.ai / 火山方舟 Coding
# 密钥统一走 token_env 指向的环境变量(本机见 .env),不再在 yaml 存明文
# 供应商:Agnes / b.ai / 火山方舟 Coding / 智谱 GLM(bigmodel)
# 密钥统一走 token_env 指向的环境变量(本机见 data/.env),不再在 yaml 存明文
# 端口默认 8808
#
# 说明:本文件是项目的**唯一配置文件**(run.py 默认读取;GATEWAY_CONFIG 可覆盖)。
@@ -63,6 +63,41 @@ providers:
display_name: "火山方舟 ark-code-latest"
type: "text"
# ── 智谱 GLM(OpenAI 兼容 /chat/completions)──────────
# 密钥走 token_env(data/.env → ZHIPU_API_KEY),不在 yaml 存明文。
# Flash 系文本模型免费档可用;GLM-4V/4.6V/4.1V 系支持「图像输入」:
# 已用 200×200 红图真图实测 4V-Flash 与 4.1V-Thinking-Flash 均认出「红色」;
# 4.6V-Flash 实侧遇上游瞬时过载(1305)未取到视觉结果,型号带 V 故仍标 vision。
bigmodel:
name: "智谱 GLM"
base_url: "https://open.bigmodel.cn/api/paas/v4"
auth:
token_env: "ZHIPU_API_KEY"
extra_headers: {}
media: {}
models:
- id: "GLM-4.7-Flash"
display_name: "GLM-4.7-Flash"
type: "text"
- id: "GLM-4-Flash-250414"
display_name: "GLM-4-Flash-250414"
type: "text"
- id: "GLM-Z1-Flash"
display_name: "GLM-Z1-Flash"
type: "text"
- id: "GLM-4.6V-Flash"
display_name: "GLM-4.6V-Flash"
type: "text"
vision: true
- id: "GLM-4V-Flash"
display_name: "GLM-4V-Flash"
type: "text"
vision: true
- id: "GLM-4.1V-Thinking-Flash"
display_name: "GLM-4.1V-Thinking-Flash"
type: "text"
vision: true
server:
host: "127.0.0.1"
port: 8808