Documents the automation foundation plan (nine epics, Epic 1 taskified) and the accepted model-provider registry contract. Updates .env.example for backlog import workspace id and local/cloud AI provider env guidance. Co-authored-by: Cursor <cursoragent@cursor.com>
77 lines
1.9 KiB
Markdown
77 lines
1.9 KiB
Markdown
---
|
|
kind: task
|
|
slug: agent-runs-model-logging
|
|
title: agent_runs model metadata and complete_task logging fields
|
|
plan_slug: automation-foundation
|
|
epic_slug: model-provider-registry
|
|
status: ready
|
|
priority: P1
|
|
tenant_id: global
|
|
owner: unassigned
|
|
cursor_todo_id: null
|
|
updated_at: "2026-07-03"
|
|
agent_prompt: |
|
|
Read docs/adr-model-routing.md. Extend agent_runs schema + complete_task MCP +
|
|
runs UI columns. Migration via db:generate. claim_task before work;
|
|
complete_task when done — include modelAlias on your own completion as
|
|
dogfood proof.
|
|
---
|
|
|
|
# Task summary
|
|
|
|
Persist model routing metadata on `agent_runs` and accept optional model fields on `complete_task` so dogfooded pipeline sessions record which alias was used.
|
|
|
|
## Description
|
|
|
|
### DB (`agent_runs`)
|
|
|
|
Add nullable columns:
|
|
|
|
- `model_alias` varchar
|
|
- `provider_type` varchar
|
|
- `model_id` varchar
|
|
- `model_tier` varchar
|
|
|
|
Migration via `pnpm db:generate`.
|
|
|
|
### MCP `complete_task`
|
|
|
|
Extend zod input (optional):
|
|
|
|
- `modelAlias?: string`
|
|
- `modelTier?: string`
|
|
- `providerType?: string`
|
|
- `modelId?: string`
|
|
|
|
Write to `agent_runs` on close. Document in tool description.
|
|
|
|
### Runs UI
|
|
|
|
`apps/web/app/(app)/[workspaceSlug]/settings/runs/page.tsx` — show model alias column in table and expanded row detail.
|
|
|
|
### `.env.example`
|
|
|
|
Add commented entries: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`, `NVIDIA_API_KEY`, `OLLAMA_API_KEY`, `OPENAI_BASE_URL` with note pointing to ADR.
|
|
|
|
## Subtasks
|
|
|
|
- [ ] Schema + migration
|
|
- [ ] complete_task schema + handler
|
|
- [ ] Runs UI column
|
|
- [ ] .env.example update
|
|
|
|
## Estimation
|
|
|
|
S
|
|
|
|
## Acceptance criteria
|
|
|
|
- [ ] Completing a run with `modelAlias: "qwen-coder"` persists and displays in runs UI
|
|
- [ ] Existing complete_task callers unchanged (fields optional)
|
|
- [ ] ADR logging contract satisfied
|
|
|
|
## Links
|
|
|
|
- Epic: `./Epic-model-provider-registry.md`
|
|
- Plan: `../Plan-automation-foundation.md`
|
|
- Related: `plans/Plan-agent-coordination/`
|