feat(FN-965): add per-task planning model override

- Add planningModelProvider and planningModelId fields to core Task type
- Update backend API validation to accept planning model fields on create/update
- Update frontend API client and TaskForm to handle planning model
- Add planning model selector row to ModelSelectorTab component
- Wire up planning model in TaskDetailModal edit mode with save support
- Update AGENTS.md with planning model override documentation
- Add comprehensive tests for ModelSelectorTab and API routes
- Bump schema version from 10 to 11
This commit is contained in:
gsxdsm
2026-04-06 22:55:25 -07:00
parent 6d98946aeb
commit ab064ebc26
12 changed files with 473 additions and 66 deletions

View File

@@ -59,7 +59,7 @@ export function fromJson<T>(json: string | null | undefined): T | undefined {
// ── Schema Definition ────────────────────────────────────────────────
const SCHEMA_VERSION = 10;
const SCHEMA_VERSION = 11;
function normalizeTaskComments(
steeringComments: SteeringComment[] | undefined,
@@ -141,6 +141,8 @@ CREATE TABLE IF NOT EXISTS tasks (
modelId TEXT,
validatorModelProvider TEXT,
validatorModelId TEXT,
planningModelProvider TEXT,
planningModelId TEXT,
mergeRetries INTEGER,
recoveryRetryCount INTEGER,
nextRecoveryAt TEXT,
@@ -449,7 +451,7 @@ export class Database {
}
// Future migrations go here:
// if (version < 11) { this.applyMigration(11, () => { ... }); }
// if (version < 12) { this.applyMigration(12, () => { ... }); }
if (version < 10) {
this.applyMigration(10, () => {
@@ -458,6 +460,13 @@ export class Database {
this.addColumnIfMissing("missions", "lastAutopilotActivityAt", "TEXT");
});
}
if (version < 11) {
this.applyMigration(11, () => {
this.addColumnIfMissing("tasks", "planningModelProvider", "TEXT");
this.addColumnIfMissing("tasks", "planningModelId", "TEXT");
});
}
}
/**