mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
feat: 适配 Antigravity 账户余额查询与流式响应优化
1. Antigravity 账户适配: - 新增 GeminiBalanceProvider,支持 Antigravity 账户的额度查询(API 模式) - AccountBalanceService 增加 queryMode 逻辑与安全限制 - 前端 BalanceDisplay 适配 Antigravity 配额显示 2. 流式响应增强: - 优化 thoughtSignature 捕获与回填,支持思维链透传 - 修复工具调用签名校验 3. 其他: - 请求体大小限制提升至 100MB - .gitignore 更新
This commit is contained in:
@@ -693,8 +693,8 @@ router.post('/v1/chat/completions', authenticateApiKey, async (req, res) => {
|
||||
return undefined
|
||||
})
|
||||
|
||||
// OpenAI 兼容的模型列表端点
|
||||
router.get('/v1/models', authenticateApiKey, async (req, res) => {
|
||||
// 获取可用模型列表的共享处理器
|
||||
async function handleGetModels(req, res) {
|
||||
try {
|
||||
const apiKeyData = req.apiKey
|
||||
|
||||
@@ -782,8 +782,13 @@ router.get('/v1/models', authenticateApiKey, async (req, res) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
return undefined
|
||||
})
|
||||
}
|
||||
|
||||
// OpenAI 兼容的模型列表端点 (带 v1 版)
|
||||
router.get('/v1/models', authenticateApiKey, handleGetModels)
|
||||
|
||||
// OpenAI 兼容的模型列表端点 (根路径版,方便第三方加载)
|
||||
router.get('/models', authenticateApiKey, handleGetModels)
|
||||
|
||||
// OpenAI 兼容的模型详情端点
|
||||
router.get('/v1/models/:model', authenticateApiKey, async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user