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:
parent
7abca7185c
commit
3896071632
1 changed files with 5 additions and 7 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue