From 3fc4621dc149d2d6bba52e738c3178a8aab2b881 Mon Sep 17 00:00:00 2001 From: Gagan Date: Tue, 7 Jul 2026 14:14:05 +0530 Subject: [PATCH] fix(apps): pin the host default model on materialized bundled agents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bundled agents can't ship a model override (the author's providers are not the installer's), so materialized tasks ran on the bg-task category default — gemini flash lite — which reliably mangles large app-set-data payloads (invalid JSON string → contract rejection → the installed app never gets data; observed with pr-dashboard's refresh agent). Materialization now resolves getDefaultModelAndProvider() on the host and pins that on the new task — the installer's machine picks the strong model, the package still pins nothing. Existing tasks keep their user-set model (update path unchanged). --- apps/x/packages/core/src/apps/agents.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/x/packages/core/src/apps/agents.ts b/apps/x/packages/core/src/apps/agents.ts index de27918f..ff20b8ee 100644 --- a/apps/x/packages/core/src/apps/agents.ts +++ b/apps/x/packages/core/src/apps/agents.ts @@ -5,6 +5,7 @@ import { parse as parseYaml, stringify as stringifyYaml } from 'yaml'; import { TriggersSchema, type BackgroundTask } from '@x/shared/dist/background-task.js'; import type { AppSummary } from '@x/shared/dist/rowboat-app.js'; import { WorkDir } from '../config/config.js'; +import { getDefaultModelAndProvider } from '../models/defaults.js'; import { appDir, agentTaskSlug } from './indexer.js'; // Bundled background agents (spec §8). Definitions ship in the app package at @@ -94,6 +95,17 @@ async function materializeAgent(folder: string, agentFile: string): Promise undefined);