1
0
Fork 0

fix(ai): keep the Compose seed helper off the connection selector

The plugin's generateText runs while seeding field prompt instructions,
which can happen during boot. Resolving a connection there calls
getPayload, which would wait on the boot it is inside. Seeding is a
one-off admin concern, so it stays on the env default.
This commit is contained in:
Jason Fraley 2026-11-24 13:05:29 -05:00
parent 7abca7185c
commit 3896071632

View file

@ -817,14 +817,12 @@ export default buildConfig({
return createTextStreamResponse({ textStream });
},
// Deliberately does not follow the connection selector: the plugin
// calls this while seeding field prompt instructions, which can happen
// during boot, and resolving a connection boots Payload (deadlock).
// Seeding is a one-off admin concern; prose Compose is unaffected.
generateText: async (prompt: string, system: string) => {
const connection = await resolveConnection(null, "compose");
const { text } = await generatePlainText(
prompt,
system,
connection?.modelId || DEFAULT_MODEL,
{ connection },
);
const { text } = await generatePlainText(prompt, system, DEFAULT_MODEL);
return text;
},
output: "text",