Gộp nhiều tài khoản OpenAI Codex thành một pool thống nhất. Route request tự động. Theo dõi quota real-time.
scrollOpenAI giới hạn rate limit theo từng tài khoản subscription. Với 3–5 tài khoản Codex, bạn phải xoay xở thủ công.
Chuyển đổi thủ công khi hết quota
Không biết account nào còn dư
Không aggregate được throughput
Với team 5–10 người dùng chung gateway, vấn đề nhân lên gấp bội.
Mỗi tài khoản Codex/ChatGPT thành một named provider riêng biệt. GoClaw lưu refresh token, tự xử lý token refresh.
Chọn provider owner, thêm members vào codex_pool.extra_provider_names.
Cấu hình cách phân bổ request: primary first, round robin, hoặc priority order.
Set override_mode: "inherit" — agent tự nhận pool config từ provider.
| Strategy | Hành vi |
|---|---|
primary_first | Luôn dùng owner trước, failover sang member khi lỗi |
round_robin | Xoay vòng đều giữa tất cả accounts trong pool |
priority_order | Dùng theo thứ tự ưu tiên, tự chuyển khi account gặp lỗi |
Agent inherit routing config từ provider — cấu hình một lần, tất cả agents tự hưởng.
override_mode: "custom"GoClaw gọi OpenAI Usage API để lấy quota cho mỗi account trong pool.
Gateway track health mỗi account qua tracing data. Khi một account liên tục lỗi, routing engine tự chuyển sang account khác.
Chỉ admin/operator quản lý pool
Viewer: dashboard read-only
Tenant isolation — no cross-tenant leak
Badge needs_reauth khi token expired
round_robininheritcodex-heavy (Pro) → agent xử lý task nặngcodex-light (Plus) → agent chat thường| Component | File | Vai trò |
|---|---|---|
| Pool Validation | chatgpt_oauth_pool_validation.go | Validate graph: no cycles, no dual-ownership |
| Pool HTTP API | agents_codex_pool.go | CRUD pool config, activity, health |
| Quota Fetcher | oauth/openai_quota.go | OpenAI Usage API, parse quota windows |
| Quota Transport | oauth/openai_quota_transport.go | HTTP transport + auth injection |
| Token Mgmt | oauth/token.go | Refresh token, metadata backfill |
| Routing | agent/resolver.go | Resolve provider theo strategy |
| Store Types | store/agent_store.go | Constants, routing config structs |
| Dashboard | agent-codex-pool-page.tsx | Pool management UI |
| Quota UI | chatgpt-oauth-quota-*.tsx | Bars, badges, readiness |