Readiness trung thực: vì sao 'coming soon' tạo niềm tin hơn 'fake active'
AI platforms phụ thuộc nhiều services. Hiển thị configured/unconfigured/degraded trung thực ngăn incidents, xây dựng niềm tin và giúp operators ngủ ngon.
Tôi từng tham gia team có dashboard hiển thị mọi model 'active' — chấm xanh khắp nơi. Trông đẹp đến khi khách thử Gemini và nhận 500 error. API key hết hạn hai tuần trước nhưng readiness check hardcode return true. Khách mất hai ngày debug. Trải nghiệm đó định hình cách tôi nghĩ về readiness.
Bốn states, không hơn
- Configured: Dependency đã kết nối, tested, responding trong latency chấp nhận được. Xanh nghĩa là thật.
- Unconfigured: Cần setup. Feature tồn tại trong code nhưng chưa có credentials. Hiển thị setup guide, không phải error.
- Degraded: Respond nhưng latency hoặc error rate cao. Hoạt động nhưng nên dùng cẩn thận. Hiển thị warning với metrics hiện tại.
- Coming soon: Chưa implemented. Không hứa production API. Hiển thị estimated timeline nếu có, không bao giờ fake active.
// Cached readiness checks with timeouts
const store = new Map<string, ReadinessStatus>();
async function checkReadiness(provider: string) {
const cache = store.get(provider);
if (cache && Date.now() - cache.checkedAt < 30_000) return cache;
try {
const start = performance.now();
const res = await fetch(healthUrl(provider), { signal: AbortSignal.timeout(5000) });
const status = { state: res.ok ? "configured" : "degraded",
latencyMs: Math.round(performance.now() - start), checkedAt: Date.now() };
store.set(provider, status);
return status;
} catch {
return { state: "unconfigured", checkedAt: Date.now(), error: "Health check failed" };
}
}Cập nhật:
Sẵn sàng dựng sản phẩm AI của bạn?
Bắt đầu free, route nhiều provider, đo chi phí và readiness trung thực ngay từ ngày đầu.
Bài viết liên quan
- Product
VeloxAI: control plane multi-model cho đội sản phẩm
Vì sao đội sản phẩm cần một API cho models, agents, RAG, billing, analytics và readiness thay vì thêm một proxy mỏng.
- Models
Cách chọn AI model phù hợp cho từng workflow sản phẩm
Framework chọn model được kiểm chứng thực tế, bao gồm cost, latency, context window, tool calling, vision, reasoning — kèm số liệu thật và ma trận quyết định.
- Knowledge Base
Xây hệ thống RAG production không nói dối users
Pipeline RAG production-grade cần ingestion state, chunk metadata, vector isolation, citations, queue-based indexing và honest failure modes.