Update README.md
This commit is contained in:
parent
276e57b2ba
commit
b2f4485946
1 changed files with 0 additions and 23 deletions
23
README.md
23
README.md
|
|
@ -23,29 +23,6 @@ BrokeCrew makes free-tier models first-class citizens while eliminating their in
|
|||
|
||||
---
|
||||
|
||||
## Architecture & Failure Design
|
||||
|
||||
```text
|
||||
Prompt Ingest
|
||||
│
|
||||
├── Stage A : Zero-latency Keyword & Regex classifier (0ms)
|
||||
└── Stage B : Single-token LLM meta-router fallback
|
||||
│
|
||||
▼
|
||||
[ Persona Selection ] ──> Ranked Candidate Cascade
|
||||
│ ├── Candidate 1 (e.g. qwen:free)
|
||||
│ ├── Candidate 2 (e.g. deepseek:free)
|
||||
│ └── Candidate 3 (e.g. gemini-flash paid fallback)
|
||||
│
|
||||
▼
|
||||
[ Budget Engine ] ───────> Atomic Token/Request Tracker
|
||||
│ ├── Rolling 1-min sliding window (20 req/min)
|
||||
│ └── Daily quota tracker (50 vs 1,000 req/day by tier)
|
||||
│
|
||||
▼
|
||||
[ Transport & Stream ] ──> Async SSE Parser ──> TUI / CLI stdout
|
||||
```
|
||||
|
||||
### Technical Invariants
|
||||
- **Fail-Fast Cascade Walk**: Free endpoints on OpenRouter frequently return transient `429`, `503`, or drop out of `/v1/models` without warning. Candidate resolution treats failures as cascade triggers rather than fatal aborts, stepping to the next viable candidate model within `<250ms`.
|
||||
- **Sliding-Window Budgeting**: Token usage and request counts are stored in atomic sliding windows (`VecDeque<DateTime<Utc>>`). Router and classifier calls deduct from the shared account budget to prevent downstream API lockouts.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue