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 // llm selects the LLM action backend: instead of the seeded picker drawing a
// random candidate, Go drives an OpenAI-compatible model that chooses which // random candidate, Go drives an OpenAI-compatible model that picks one
// candidate to act on from the screenshot + the candidate list. The returned // candidate from the screenshot + the numbered candidate list. Assign it to the
// marker is inert on the JS picker (pick.ts walks it to null); Go reads its // `generator` export; Go reads the config off globalThis.generator and the
// config off globalThis.actions. API key comes from OPENROUTER_API_KEY // marker is inert on the JS picker (pick.ts walks it to null). API key comes
// (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter wins when both are set. // from OPENROUTER_API_KEY (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter
// Optional `instructions` are appended to the model's prompt as generic // wins when both are set. Optional `instructions` are appended to the model's
// bug-hunting guidance for this spec; the model still only ranks candidates. // prompt to describe the app under test.
export function llm(config: { model: string; instructions?: string }): GeneratorNode { export function llm(config: { model: string; instructions?: string }): GeneratorNode {
return { kind: "llm", config }; return { kind: "llm", config };
} }