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

agent: Per-step model hints in workflow YAML

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

説明

## Component

Agent (Python runtime)

## Describe the feature

Allow workflow YAML steps to declare an optional `model` override so different phases of a task can use different Bedrock models without defining separate workflows.

Example (single `run_agent` step permitted today):

```yaml
steps:
- { kind: clone_repo, name: setup }
- { kind: run_agent, name: implement, model: { id: anthropic.claude-sonnet-4-6 } }
- { kind: verify_build, name: build, gate: regression_only }
```

Resolution follows [WORKFLOWS.md model selection](https://github.com/aws-samples/sample-autonomous-cloud-coding-agents/blob/main/docs/design/WORKFLOWS.md#model-selection): Blueprint allow-list bounds all choices; per-task API override remains highest unless `allow_task_override: false`.

## Use case

Model fit is task-phase-specific. Today `agent_config.model` applies workflow-wide. Per-step `model` on the lone `run_agent` step documents intent and prepares the schema for future multi-step agent graphs.

Distinct from #439 (runtime per-turn adaptive router) — this is **declarative workflow data**, not a heuristic.

## Proposed solution

1. Add optional `model: { id, allow_task_override? }` to step objects in workflow JSON Schema (`run_agent` only initially).
2. Validator: step `model.id` must be on platform/Blueprint allow-list.
3. Runner: merge step-level model over `workflow.agent_config.model` over Blueprint default in `_handle_run_agent`.
4. Telemetry: record resolved model per step on TaskEvents / OTEL spans.
5. Tests and WORKFLOWS.md update.

## Other information

- Related: #439 (per-turn router — complementary), ADR-014 / #248 workflows.

## Acknowledgements

- [ ] I may be able to implement this feature
- [x] This might be a breaking change (schema addition only — backward compatible if optional)

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

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

調査の方向性

ワークフローの JSON Schema、WORKFLOWS.md のモデル選択セクション、runner の _handle_run_agent エントリポイントから始めます。workflow.agent_config.model と Blueprint のデフォルト値がどのように解決されるかを追跡し、その後 TaskEvents と OTEL span のテストを調べます。任意の run_agent ステップのモデルが allow-list に対して検証され、指定された順序で解決され、解決済みモデルが出力され、テスト付きで文書化されていれば完了です。

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

評価

技術スタック
aws, python, yaml
領域
backend, observability
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

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

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