Member Junction
    Preparing search index...
    TestLLMOutcome:
        | {
            content: string;
            delayMS?: number;
            kind: "succeed";
            model?: string;
            thinking?: string;
            usage?: ModelUsage;
        }
        | { delayMS?: number; error: Error; kind: "fail" }
        | { kind: "failResult"; result: ChatResult }
        | { delayMS?: number; error: Error; kind: "throw" }
        | { kind: "hang" }
        | { chunks: string[]; kind: "stream"; model?: string; usage?: ModelUsage }

    One scripted per-call outcome for TestLLM.Script.

    • succeed — resolves with a successful real ChatResult carrying content (and optionally a specific usage / reported model / thinking text).
    • fail — DRIVER-style failure: resolves with ChatResult{success:false} whose errorInfo is built by the REAL ErrorAnalyzer from error, exactly how production drivers report provider errors (the historical failover bug class — failover must trigger off the returned result, not just exceptions).
    • failResult — resolves with a test-supplied failed ChatResult verbatim, for cases where the test controls errorInfo (including leaving it absent).
    • throw — SDK-style failure: the returned promise rejects with error.
    • hang — never settles; models a hung provider socket (timeout tests).
    • stream — streams chunks through the real BaseLLM streaming template method when the caller requested streaming; in a non-streaming call the chunks resolve joined as one successful result.