Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c2be0a3
feat(providers): add vendor endpoints with probes and failover
ding113 Jan 21, 2026
c65cf16
fix(providers): auto-backfill vendor aggregation for legacy providers…
ding113 Jan 21, 2026
72c6341
fix(probe): remove success log filtering to enable latency curve rend…
ding113 Jan 21, 2026
ae1e422
refactor(UI): UX Improvements (#637)
ding113 Jan 22, 2026
085c86b
Fix user rate limit enforcement (#643)
ding113 Jan 22, 2026
319d18b
i18n: add translations for availability dashboard and provider networ…
ding113 Jan 22, 2026
cba22fc
fix(proxy): add SSL certificate error detection and endpoint retry li…
ding113 Jan 22, 2026
63d8ed5
fix(proxy): handle extra signature field error in thinking signature …
ding113 Jan 22, 2026
65df5f4
feat(session): add batch concurrent count query and session status ut…
ding113 Jan 22, 2026
2dd5043
refactor(proxy): introduce Agent Pool for connection management
ding113 Jan 22, 2026
4ae3cc9
feat(dashboard): add availability dashboard with provider/endpoint co…
ding113 Jan 22, 2026
b57da8e
refactor(dashboard): improve live sessions panel UX
ding113 Jan 22, 2026
fb045dc
fix(ui): improve chart and tag-input components
ding113 Jan 22, 2026
3cdec3f
chore: format code (feat-multi-improvements-batch-319883c)
github-actions[bot] Jan 22, 2026
a79c351
fix(proxy): fix stats counter inconsistency in AgentPool pending wait…
ding113 Jan 22, 2026
25f0f38
fix: address code review issues from PR #646
ding113 Jan 22, 2026
885a772
chore: bump version to v0.5.0
ding113 Jan 22, 2026
2976216
feat(dashboard): standardize session status labels to 4-letter format
ding113 Jan 22, 2026
bad9e28
chore: format code (dev-2976216)
github-actions[bot] Jan 22, 2026
bf2ada2
fix(ui): dashboard UX improvements and i18n fixes (#650)
miraserver Jan 24, 2026
6643eb4
feat(dashboard): filter zero-usage users from statistics chart legend
ding113 Jan 24, 2026
8fe1b7f
fix(proxy): implement endpoint stickiness on retries (#651)
ding113 Jan 24, 2026
97af7ee
Update .gitignore
ding113 Jan 24, 2026
0f05b31
fix(dashboard): restore availability chart colors by removing hsl() w…
ding113 Jan 24, 2026
b6747e6
chore: format code (dev-0f05b31)
github-actions[bot] Jan 24, 2026
9bd1cc5
feat(dashboard): enhance logs UI with modular filters and error detai…
ding113 Jan 25, 2026
8b11e43
feat(dashboard): improve UI consistency and fix display issues
ding113 Jan 26, 2026
ed7d39e
chore: format code (dev-8b11e43)
github-actions[bot] Jan 26, 2026
43e8f84
feat(session): change STORE_SESSION_MESSAGES to control redaction ins…
ding113 Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 18 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ REDIS_TLS_REJECT_UNAUTHORIZED=true # 是否验证 Redis TLS 证书(默认

# Session 配置
SESSION_TTL=300 # Session 过期时间(秒,默认 300 = 5 分钟)
STORE_SESSION_MESSAGES=false # 是否存储请求 messages 到 Redis(用于实时监控页面查看详情,默认:false)
# 警告:启用后会增加 Redis 内存使用,且可能包含敏感信息
STORE_SESSION_MESSAGES=false # 会话消息存储模式(默认:false)
# - false:存储请求/响应体但对 message 内容脱敏 [REDACTED]
# - true:原样存储 message 内容(注意隐私和存储空间影响)
# 警告:启用后会增加 Redis/DB 存储空间,且包含敏感信息

# 熔断器配置
# 功能说明:控制网络错误是否计入熔断器失败计数
Expand Down Expand Up @@ -119,8 +121,17 @@ ENABLE_SMART_PROBING=false
PROBE_INTERVAL_MS=30000
PROBE_TIMEOUT_MS=5000
Comment on lines 121 to 122
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

PROBE_INTERVAL_MSPROBE_TIMEOUT_MS 这两个变量似乎已被新的 ENDPOINT_PROBE_* 变量所取代。如果它们已不再使用,建议将其移除以避免配置混淆。如果它们仍用于其他目的,最好添加注释说明其具体用途。


# 多提供商类型支持(实验性功能)
# - false (默认):仅支持 Claude、Codex类型供应商
# - true:支持 Gemini CLI、OpenAI Compatible 等其他类型
# 警告:其他类型功能仍在开发中,暂不建议启用
ENABLE_MULTI_PROVIDER_TYPES=false
# Provider Endpoint Probing (always enabled)
# 功能说明:每 10 秒探测所有启用端点的速度与连通性,并刷新端点选择排序。
# 注意:没有 ENABLE 开关,默认启用;可通过下列参数调优。
ENDPOINT_PROBE_INTERVAL_MS=10000
ENDPOINT_PROBE_TIMEOUT_MS=5000
ENDPOINT_PROBE_CONCURRENCY=10
ENDPOINT_PROBE_CYCLE_JITTER_MS=1000
ENDPOINT_PROBE_LOCK_TTL_MS=30000

# 探测日志保留与清理
# - 所有探测结果(成功/失败)均记录到历史表
# - 自动清理任务每 24 小时运行,删除过期记录
ENDPOINT_PROBE_LOG_RETENTION_DAYS=1
ENDPOINT_PROBE_LOG_CLEANUP_BATCH_SIZE=10000
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ docs-site/node_modules/

# local scratch
tmp/
.trae/
.sisyphus
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.3
0.5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

此文件中的版本号已更新为 0.5.0package.json 中也是如此,但 Pull Request 的标题是 v0.5.1。请确保版本号在各处保持一致,以避免发布混淆。

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERSION file shows 0.5.0 but PR title says v0.5.1 - check which version is correct and ensure consistency

Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1

Comment:
VERSION file shows `0.5.0` but PR title says `v0.5.1` - check which version is correct and ensure consistency

How can I resolve this? If you propose a fix, please make it concise.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version file shows 0.5.0 but PR title indicates v0.5.1

Suggested change
0.5.0
0.5.1
Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1

Comment:
Version file shows `0.5.0` but PR title indicates `v0.5.1`

```suggestion
0.5.1
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version should be 0.5.1 to match PR title

Suggested change
0.5.0
0.5.1
Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1

Comment:
Version should be `0.5.1` to match PR title

```suggestion
0.5.1
```

How can I resolve this? If you propose a fix, please make it concise.

67 changes: 67 additions & 0 deletions drizzle/0056_tidy_quasar.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
CREATE TABLE IF NOT EXISTS "provider_endpoint_probe_logs" (
"id" serial PRIMARY KEY NOT NULL,
"endpoint_id" integer NOT NULL,
"source" varchar(20) DEFAULT 'scheduled' NOT NULL,
"ok" boolean NOT NULL,
"status_code" integer,
"latency_ms" integer,
"error_type" varchar(64),
"error_message" text,
"created_at" timestamp with time zone DEFAULT now()
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "provider_endpoints" (
"id" serial PRIMARY KEY NOT NULL,
"vendor_id" integer NOT NULL,
"provider_type" varchar(20) DEFAULT 'claude' NOT NULL,
"url" text NOT NULL,
"label" varchar(200),
"sort_order" integer DEFAULT 0 NOT NULL,
"is_enabled" boolean DEFAULT true NOT NULL,
"last_probed_at" timestamp with time zone,
"last_probe_ok" boolean,
"last_probe_status_code" integer,
"last_probe_latency_ms" integer,
"last_probe_error_type" varchar(64),
"last_probe_error_message" text,
"created_at" timestamp with time zone DEFAULT now(),
"updated_at" timestamp with time zone DEFAULT now(),
"deleted_at" timestamp with time zone
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "provider_vendors" (
"id" serial PRIMARY KEY NOT NULL,
"website_domain" varchar(255) NOT NULL,
"display_name" varchar(200),
"website_url" text,
"favicon_url" text,
"created_at" timestamp with time zone DEFAULT now(),
"updated_at" timestamp with time zone DEFAULT now()
);
--> statement-breakpoint
ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "provider_vendor_id" integer;--> statement-breakpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "provider_vendor_id" integer; 语句添加了一个可为空的整数列。然而,相应的快照文件 drizzle/meta/0056_snapshot.json 将此列定义为 notNull: true。对于已有数据的表,这将导致新列的值为 NULL,与应用程序的 schema 定义(Drizzle schema object)冲突,很可能在运行时引发错误。

为了确保迁移的安全性,建议分步操作:

  1. 添加可为空的列。
  2. 编写一个数据迁移脚本,为 providers 表中的现有行填充 provider_vendor_id 的值。
  3. 添加 NOT NULL 约束。

DO $$ BEGIN
ALTER TABLE "provider_endpoint_probe_logs" ADD CONSTRAINT "provider_endpoint_probe_logs_endpoint_id_provider_endpoints_id_fk" FOREIGN KEY ("endpoint_id") REFERENCES "public"."provider_endpoints"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN NULL;
END $$;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "provider_endpoints" ADD CONSTRAINT "provider_endpoints_vendor_id_provider_vendors_id_fk" FOREIGN KEY ("vendor_id") REFERENCES "public"."provider_vendors"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN NULL;
END $$;--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoint_probe_logs_endpoint_created_at" ON "provider_endpoint_probe_logs" USING btree ("endpoint_id","created_at" DESC NULLS LAST);--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoint_probe_logs_created_at" ON "provider_endpoint_probe_logs" USING btree ("created_at");--> statement-breakpoint
CREATE UNIQUE INDEX IF NOT EXISTS "uniq_provider_endpoints_vendor_type_url" ON "provider_endpoints" USING btree ("vendor_id","provider_type","url");--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoints_vendor_type" ON "provider_endpoints" USING btree ("vendor_id","provider_type") WHERE "provider_endpoints"."deleted_at" IS NULL;--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoints_enabled" ON "provider_endpoints" USING btree ("is_enabled","vendor_id","provider_type") WHERE "provider_endpoints"."deleted_at" IS NULL;--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoints_created_at" ON "provider_endpoints" USING btree ("created_at");--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_endpoints_deleted_at" ON "provider_endpoints" USING btree ("deleted_at");--> statement-breakpoint
CREATE UNIQUE INDEX IF NOT EXISTS "uniq_provider_vendors_website_domain" ON "provider_vendors" USING btree ("website_domain");--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_provider_vendors_created_at" ON "provider_vendors" USING btree ("created_at");--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "providers" ADD CONSTRAINT "providers_provider_vendor_id_provider_vendors_id_fk" FOREIGN KEY ("provider_vendor_id") REFERENCES "public"."provider_vendors"("id") ON DELETE restrict ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN NULL;
END $$;--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "idx_providers_vendor_type" ON "providers" USING btree ("provider_vendor_id","provider_type") WHERE "providers"."deleted_at" IS NULL;
Loading
Loading