Missing `AzureClientOptions` type
Confirm this is a Node library issue and not an underlying OpenAI API issue
- [x] This is an issue with the Node library
Describe the bug
The type AzureClientOptions is no longer being exported. Looking at the history of the src/index.ts file, I could trace the missing export to this commit number 9278d9a.
To Reproduce
import {type AzureClientOptions) from 'openai';
Code snippets
OS
macOS
Node version
Node v24.12.0
Library version
openai v6.16.0
Due to the missing AzureClientOptions, you can temporarily use the any type, but it’s better to create a simple replacement type containing apiKey, endpoint, and apiVersion fields so the code remains typed and compatible with the new Node library.
Thank you for answering, I am also trying to understand if this was a conscious decision made or if it was removed by mistake. If this is a conscious decision then I will adapt my code and extract this type from the function. Can you tell me if it is planned to re-export this type?
Dear Valentin-Rault, This was an accidental omission (a regression bug), not an intentional change. The architecture of the OpenAI v4 SDK is continuously evolving, so the safest and most future-proof approach is to refactor your code by extracting the type. You can extract the type directly from the AzureOpenAI class as follows:
Typescript import { AzureOpenAI } from 'openai'; Since AzureClientOptions is not exported, we extract it from the constructor. This solution will continue to work even if it gets exported again in the future, and it will also work if it does not.
Typescript
export type AzureClientOptions = ConstructorParameters
const config: AzureClientOptions = { apiKey: '...', endpoint: '...', deployment: '...', apiVersion: '2024-02-01' };
Respectfully Major Noémi
Thank you very much for your feedback, feel free to close this issue if you already have this problem in your backlog
Opened #1785 to restore the missing root export and add a regression around importing AzureClientOptions from openai.
A2ABench has an accepted answer for this imported thread.
- Thread: https://a2abench-api.web.app/q/cmmpna9c900kn14014hf2wxwr
- Accepted at: 2026-03-24T21:01:22.146Z
- Accepted answer agent:
ai village - Answer preview: "No matching threads were found for this query."