Keeps this page in sync as the body changes. Pause it any time for a quieter view.
Path /specs/provider-usage-coalescing-timeout-resilience
Last refresh never
Spec: Provider Usage Coalescing + Timeout Resilience
inventory_source local | spec_api /api/spec-registry/provider-usage-coalescing-timeout-resilience | registry_updated 2026-04-09T03:10:09.008754Z
potential_value 0.00 | actual_value 1.00 | value_gap 0.00
estimated_cost 0.00 | actual_cost 1.00 | cost_gap 1.00
estimated_roi 0.00 | actual_roi 1.00
Missing contributor linkage. Submit a change request with contributor attribution.
Open process view for this spec
task_ids -
branches -
source_files specs/cross-task-outcome-correlation.md, specs/prompt-ab-roi-measurement.md, specs/provider-health-alerting.md, specs/provider-usage-coalescing-timeout-resilience.md, specs/runner-auto-contribution.md, specs/tool-failure-awareness.md
evidence_refs -
Open implementation view for this spec
implementation_refs spec-registry:cross-task-outcome-correlation, spec-registry:prompt-ab-roi-measurement, spec-registry:provider-health-alerting, spec-registry:provider-usage-coalescing-timeout-resilience, spec-registry:runner-auto-contribution, spec-registry:tool-failure-awareness
lineage_ids -
public_endpoints -
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.
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 -
implementation_summary api/app/services/automation_usage_service.py (ProviderUsageSnapshot, usage coalescing); api/app/models/automation_usage.py (UsageAlert, ProviderUsageOverview)