Repository navigation
docs(ai-service): refresh operations guide for rate limiting and cost controls (#1438) - #1441
Merged
Cedarich merged 1 commit intoOct 15, 2026
Conversation
… controls (Pulsefy#1438) - Document per-organization rate limiting tiers, headers, and sliding window configs (PR Pulsefy#1228) - Document provider cost ceilings with automatic fallback to manual review (PR Pulsefy#1293) - Document circuit breaker alert lifecycle, HMAC signatures, and deduplication (PR Pulsefy#1220) - Add comprehensive worked incident runbook covering circuit trip, cost ceiling breach, and org rate throttling - Update control levers, Prometheus observability metrics, and relative file reference map - Link operations guide from root README.md and app/ai-service/README.md
|
@Sensei-Victor Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Cedarich
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refreshes
app/ai-service/AI_SERVICE_OPERATIONS.mdto document operational controls added across recent waves (PRs #1228, #1293, and #1220), addressing all acceptance criteria for #1438:Per-Organization Rate Limiting Tiers (PR feat(#1200): Add per-organization rate limit tiers Add independent or… #1228 /
df0a3539):ApiKeyOrgMappingandOrganizationRateLimiterServicesliding window counters.X-RateLimit-LimitType: organization,Retry-After) and HTTP 429ORGANIZATION_RATE_LIMIT_EXCEEDEDerror semantics.ORG_RATE_LIMIT_TIERS,API_KEY_TO_ORG_MAPPING,ORG_RATE_LIMIT_ENABLED) and adoption/bypass behavior for unmapped keys.Provider Cost Ceiling with Automatic Fallback (PR Add configurable provider cost ceilings with automatic fallback #1293 /
3c5a1ac2):ai:provider-cost:{provider}:{window}:{bucket}).manual_review(reason: "provider_cost_ceiling") when all providers exceed ceiling limits.Circuit Breaker Alerting (PR feat(ai-service): alert operators when a circuit breaker opens #1220 /
46f735f5):openedandrecovered), with internal probes (HALF_OPEN) suppressed.1.0, HMAC-SHA256 signatures (X-Signature-256), de-duplication window (CIRCUIT_BREAKER_ALERT_DEDUP_SECONDS), and non-blocking background thread dispatch.GET /admin/circuit-breakers,POST /admin/circuit-breakers/{provider}/reset).Combined Incident Worked Example:
openai) disruption trips circuit breaker, traffic falls over togroq,groqbreaches daily cost ceiling, requests route tomanual_review, client retries trigger aggregate org-level rate limits, and operators triage via metrics, manual breaker reset, and recovery.Navigation & Hygiene:
README.mdandapp/ai-service/README.md.Testing Performed
README.md,app/ai-service/README.md,app/ai-service/AI_SERVICE_OPERATIONS.md) with Prettier (npx prettier --check).flake8(--select=E9,F63,F7,F82) and code formatting check withblack --check.Closes #1438