mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 09:25:59 +03:00
[PR #123] [MERGED] feat(usage): 添加provider健康检查接口 #268
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/123
Author: @unihon
Created: 12/22/2025
Status: ✅ Merged
Merged: 12/22/2025
Merged by: @justlovemaki
Base:
main← Head:feature/provider-health-api📝 Commits (2)
5dc1c5efeat(usage): 添加provider健康检查接口f9d8357Merge branch 'justlovemaki:main' into feature/provider-health-api📊 Changes
2 files changed (+128 additions, -1 deletions)
View changed files
📝
src/request-handler.js(+34 -1)📝
src/service-manager.js(+94 -0)📄 Description
概要
添加独立的provider健康检查接口(有别于web UI管理中provider信息接口),用于系统provider检测
数据源基于providerPoolManager、PROVIDER_POOLS_FILE_PATH
应用场景
通过获取provider状态,结合相关监控、告警系统整合
使用案例
结合Uptime Kuma,实现provider异常告警通知
响应样例
Provider Health 状态查询接口说明
接口地址
GET /provider_health
请求参数(Query Parameters)
gemini-antigravity)0 ~ 1,用于判断整体是否健康响应体结构说明(Response Body)
unhealthyCount / count)unhealthRatioThreshold计算出的整体健康状态items 数组字段说明
items中的每一项表示一个 Provider 实例的健康状态。gemini-antigravity、claude-kiro-oauth)nullcustomName + provider + 配置路径/BaseURL组合生成🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.