{"record":{"id":"e77d78c7ea4034bd","repo":"diegosouzapw/OmniRoute","slug":"promptql-stream-timeout-after-timeoutms-ms-thre","errorCode":null,"errorMessage":"PromptQL stream timeout after ${timeoutMs}ms (thread ${opts.threadId}, events=${collected.length})","messagePattern":"PromptQL stream timeout after (.+?)ms \\(thread (.+?), events=(.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/promptql.ts","lineNumber":442,"sourceCode":"      if (msg) best = msg;\n      if (isFinalAgentEvent(ev.event_data) && msg) {\n        sawFinal = true;\n      }\n      // Strict stop: final_response_sent\n      if (JSON.stringify(ev.event_data || {}).includes(\"final_response_sent\") && best) {\n        return { text: best, lastEventId: cursor, events: collected };\n      }\n    }\n    if (sawFinal && best) {\n      // one extra idle poll to catch trailing metadata\n      await new Promise((r) => setTimeout(r, intervalMs));\n      return { text: best, lastEventId: cursor, events: collected };\n    }\n    await new Promise((r) => setTimeout(r, intervalMs));\n  }\n\n  if (best) return { text: best, lastEventId: cursor, events: collected };\n  throw new Error(\n    `PromptQL stream timeout after ${timeoutMs}ms (thread ${opts.threadId}, events=${collected.length})`\n  );\n}\n\n// ─── Executor ───────────────────────────────────────────────────────────────\n\nexport class PromptQlExecutor extends BaseExecutor {\n  constructor() {\n    super(\"promptql\", {\n      id: \"promptql\",\n      baseUrl: PLAYGROUND_GQL,\n    });\n  }\n\n  async execute(input: ExecuteInput) {\n    const { model, body, stream: wantStream, credentials, signal } = input;\n    const requestBody = (body || {}) as PromptQlRequestBody;\n    let { token, projectId, cookie, timezone } = resolvePromptQlCredentials(credentials);","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/promptql.ts#L424-L460","documentation":"Error \"PromptQL stream timeout after ${timeoutMs}ms (thread ${opts.threadId}, events=${collected.length})\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/promptql.ts:442 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}