mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
feat: 添加 Zeabur 部署文档,Models API 支持 CLI 格式
- 新增 Zeabur 平台部署指南文档 - Models API 格式列表增加对应的 CLI 格式支持
This commit is contained in:
@@ -39,14 +39,17 @@ from src.services.system.config import SystemConfigService
|
||||
|
||||
router = APIRouter(tags=["System Catalog"])
|
||||
|
||||
# 各格式对应的 API 格式列表
|
||||
# 注意: CLI 格式是透传格式,Models API 只返回非 CLI 格式的端点支持的模型
|
||||
_CLAUDE_FORMATS = [APIFormat.CLAUDE.value]
|
||||
_OPENAI_FORMATS = [APIFormat.OPENAI.value]
|
||||
_GEMINI_FORMATS = [APIFormat.GEMINI.value]
|
||||
# 各格式对应的 API 格式列表(包括对应的 CLI 格式)
|
||||
_CLAUDE_FORMATS = [APIFormat.CLAUDE.value, APIFormat.CLAUDE_CLI.value]
|
||||
_OPENAI_FORMATS = [APIFormat.OPENAI.value, APIFormat.OPENAI_CLI.value]
|
||||
_GEMINI_FORMATS = [APIFormat.GEMINI.value, APIFormat.GEMINI_CLI.value]
|
||||
|
||||
# 所有非 CLI 格式(用于格式转换时的查询)
|
||||
_ALL_CHAT_FORMATS = [APIFormat.CLAUDE.value, APIFormat.OPENAI.value, APIFormat.GEMINI.value]
|
||||
# 所有格式(用于格式转换时的查询)
|
||||
_ALL_CHAT_FORMATS = [
|
||||
APIFormat.CLAUDE.value, APIFormat.CLAUDE_CLI.value,
|
||||
APIFormat.OPENAI.value, APIFormat.OPENAI_CLI.value,
|
||||
APIFormat.GEMINI.value, APIFormat.GEMINI_CLI.value,
|
||||
]
|
||||
|
||||
|
||||
def _extract_api_key_from_request(
|
||||
|
||||
@@ -1151,8 +1151,12 @@ class ListAvailableModelsAdapter(AuthenticatedApiAdapter):
|
||||
from src.core.api_format.conversion.compatibility import is_format_compatible
|
||||
from src.models.database import ProviderEndpoint
|
||||
|
||||
# 主流 API 格式列表
|
||||
all_formats = [APIFormat.OPENAI.value, APIFormat.CLAUDE.value, APIFormat.GEMINI.value]
|
||||
# 所有 API 格式列表(包括 CLI 格式)
|
||||
all_formats = [
|
||||
APIFormat.OPENAI.value, APIFormat.OPENAI_CLI.value,
|
||||
APIFormat.CLAUDE.value, APIFormat.CLAUDE_CLI.value,
|
||||
APIFormat.GEMINI.value, APIFormat.GEMINI_CLI.value,
|
||||
]
|
||||
|
||||
# 步骤 1:一次性查询所有活跃端点(单次 DB 查询)
|
||||
endpoint_rows = (
|
||||
|
||||
Reference in New Issue
Block a user