aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(agent): adaptive / complexity-aware model router

オープン
#439 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
agent-runtime cost-finops enhancement
主要言語
TypeScript
スター
143
フォーク
46
平均マージ
3日 10時間
マージ済み PR(30日)
24

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

docs/design/COST_MODEL.md から始め、次に agent/src/runner.py を調べて現在のターンごとのモデルフローを理解します。複雑性、許可されたモデル、max_budget_usd、Cedar policy、フォールバック動作、テレメトリ、評価がどのように連携するかを定義します。ポリシーや予算に違反することなく、コストと merge-rate への router の影響が測定されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
ai
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。