aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(agent): adaptive / complexity-aware model router
- Vorherrschende Sprache
- TypeScript
- Sterne
- 143
- Forks
- 46
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
**Context:** ROADMAP.md → Adaptive model router + Complexity-aware model router (Cost governance)
---
## Component
Agent (Python runtime)
## Describe the feature
**Per-turn model selection** by task complexity: cheaper models for reads/simple edits, stronger models for complex reasoning—while honoring `max_budget_usd` and Cedar policy. Target ~30–40% cost reduction.
## Use case
Using Opus-class models for every turn is expensive. Many turns are file reads or trivial edits that a smaller model handles well.
## Proposed solution
1. Router heuristic or lightweight classifier (turn type, diff size, tool invoked).
2. Blueprint: allowed model set + routing policy.
3. Fallback to strong model on failure or low confidence.
4. Emit per-turn model choice in telemetry for cost attribution (#215).
5. A/B measure cost vs merge rate in evaluation pipeline.
## Other information
- Single issue covers both roadmap entries (compute + cost governance).
- Design context: `docs/design/COST_MODEL.md`, `agent/src/runner.py`.
- [ ] This might be a breaking change
Beitragsleitfaden
Rechercherichtung
Beginne mit docs/design/COST_MODEL.md und untersuche anschließend agent/src/runner.py, um den aktuellen Modellfluss pro Turn zu verstehen. Definiere, wie Komplexität, zulässige Modelle, max_budget_usd, Cedar policy, Fallback-Verhalten, Telemetrie und Evaluierung zusammenspielen. Als abgeschlossen gilt die Aufgabe, wenn der Router hinsichtlich seiner Auswirkungen auf Kosten und Merge-Rate gemessen wird, ohne Policy oder Budget zu verletzen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- ai
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100