docs(spec): correct the llm() comment; config reads off globalThis.generator

This commit is contained in:
pj committed 2026-07-30 22:35:06 +05:30
1 parent e9935a15b6
commit 8c4e6719bb
1 file changed
+7 -7
+7 -7
View File
@@ -35,13 +35,13 @@ export function actions(generator: () => Action[]): GeneratorNode {
}
// llm selects the LLM action backend: instead of the seeded picker drawing a
// random candidate, Go drives an OpenAI-compatible model that chooses which
// candidate to act on from the screenshot + the candidate list. The returned
// marker is inert on the JS picker (pick.ts walks it to null); Go reads its
// config off globalThis.actions. API key comes from OPENROUTER_API_KEY
// (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter wins when both are set.
// Optional `instructions` are appended to the model's prompt as generic
// bug-hunting guidance for this spec; the model still only ranks candidates.
// random candidate, Go drives an OpenAI-compatible model that picks one
// candidate from the screenshot + the numbered candidate list. Assign it to the
// `generator` export; Go reads the config off globalThis.generator and the
// marker is inert on the JS picker (pick.ts walks it to null). API key comes
// from OPENROUTER_API_KEY (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter
// wins when both are set. Optional `instructions` are appended to the model's
// prompt to describe the app under test.
export function llm(config: { model: string; instructions?: string }): GeneratorNode {
return { kind: "llm", config };
}