{"spec_id":"provider-usage-coalescing-timeout-resilience","title":"Spec: Provider Usage Coalescing + Timeout Resilience","summary":"Automation usage responses currently expose provider-family duplicates (for example `openai` with `openai-codex`, and `claude` with `claude-code`), often show `usage_remaining` as null even when quota metrics exist, and can timeout under slow provider probes. This spec unifies family-level provider reporting, improves remaining-quota selection, and guarantees fast fallback behavior when live collection exceeds endpoint latency budgets.","potential_value":0.0,"actual_value":1.0,"estimated_cost":0.0,"actual_cost":1.0,"value_gap":0.0,"cost_gap":1.0,"estimated_roi":0.0,"actual_roi":1.0,"idea_id":"pipeline-optimization","process_summary":"`GET /api/automation/usage` returns one row per provider family (`openai`, `claude`) instead of duplicate family variant; Provider snapshots set `usage_remaining` from the best quota-bearing summary metric when available, even if the primary ; `GET /api/automation/usage` avoids long hangs by returning a valid fallback payload when live collection exceeds a confi","pseudocode_summary":null,"implementation_summary":"api/app/services/automation_usage_service.py (ProviderUsageSnapshot, usage coalescing); api/app/models/automation_usage.py (UsageAlert, ProviderUsageOverview)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:09.008754Z","updated_at":"2026-04-09T03:10:09.008754Z","content_path":"specs/provider-usage-coalescing-timeout-resilience.md","content_hash":"a5da12727019ed29","workspace_id":"coherence-network"}