From c8121b8781d58fafa362975f18f6daaed1e19b36 Mon Sep 17 00:00:00 2001 From: Raashish Aggarwal <94279692+raashish1601@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:59:22 +0530 Subject: [PATCH] Export AzureClientOptions from root package --- src/index.ts | 2 +- tests/lib/azure.test.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7ae9b1b4e..5a220bf74 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,4 +23,4 @@ export { InvalidWebhookSignatureError, } from './core/error'; -export { AzureOpenAI } from './azure'; +export { AzureOpenAI, type AzureClientOptions } from './azure'; diff --git a/tests/lib/azure.test.ts b/tests/lib/azure.test.ts index 82af3ec85..43de82e20 100644 --- a/tests/lib/azure.test.ts +++ b/tests/lib/azure.test.ts @@ -1,4 +1,4 @@ -import { AzureOpenAI } from 'openai'; +import { AzureOpenAI, type AzureClientOptions } from 'openai'; import { APIUserAbortError } from 'openai'; import { type Response, RequestInit, RequestInfo } from 'openai/internal/builtin-types'; @@ -11,6 +11,16 @@ const model = 'unused model'; describe('instantiate azure client', () => { const env = process.env; + test('exports AzureClientOptions from the root package', () => { + const options: AzureClientOptions = { + endpoint: 'https://example-resource.openai.azure.com', + apiKey: 'My API Key', + apiVersion, + }; + + expect(options.apiVersion).toEqual(apiVersion); + }); + beforeEach(() => { jest.resetModules(); process.env = { ...env };