TanStack
OSS
ai
fix(ai-openai): preserve native combined-mode `text.format` wiring in subclass override `OpenAITextAdapter.mapOptionsToRequest` reimplemented the base's request shaping inline, which silently dropped the new `outputSchema -> text.format` wiring (#605). Combined with the inherited `supportsCombinedToolsAndSchema()` returning true, the engine emitted `structured-output.start` and called `harvestCombinedStructuredOutput`, but the OpenAI request never carried a schema constraint — the model returned natural-language text and the harvest threw `structured-output-parse-failed` on every `chat({ adapter: openaiText(...), outputSchema, stream: true })`. Reproduced via examples/ts-react-chat structured-output demo on gpt-4o and gpt-5.2: bug present pre-fix, both pass post-fix with valid schema-conforming JSON and no `structuredOutput` middleware phase fired (native combined-mode path). Delegate to `super.mapOptionsToRequest` with a tools-less view of `options` to inherit the base's input mapping, system-prompt normalization, modelOptions precedence, and `text.format` wiring; then layer OpenAI's full tool converter (file_search, web_search, etc.) on top. Net: ~25-line override instead of 50, and future base-class additions flow through automatically.
nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build --exclude=examples/**,testing/**
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build --exclude=examples/**,testing/**
Click to copy
Linux
4 CPU cores
0ced7d0b
609
Get faster results
Learn how to enable distribution.
Atomizer enabled
33 groups of tasks optimized.