Skip to main content

Interface: AzureOpenAIConfig

Extends

  • AzureClientOptions

Properties

apiKey?

optional apiKey: string

Defaults to process.env['AZURE_OPENAI_API_KEY'].

Inherited from

AzureClientOptions.apiKey

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:244


apiVersion?

optional apiVersion: string

Defaults to process.env['OPENAI_API_VERSION'].

Inherited from

AzureClientOptions.apiVersion

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:231


azureADTokenProvider()?

optional azureADTokenProvider: () => Promise<string>

A function that returns an access token for Microsoft Entra (formerly known as Azure Active Directory), which will be invoked on every request.

Returns

Promise<string>

Inherited from

AzureClientOptions.azureADTokenProvider

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:249


baseURL?

optional baseURL: null | string

Override the default base URL for the API, e.g., "https://api.example.com/v2/"

Defaults to process.env['OPENAI_BASE_URL'].

Inherited from

AzureClientOptions.baseURL

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:25


dangerouslyAllowBrowser?

optional dangerouslyAllowBrowser: boolean

By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. Only set this option to true if you understand the risks and have appropriate mitigations in place.

Inherited from

AzureClientOptions.dangerouslyAllowBrowser

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:73


defaultHeaders?

optional defaultHeaders: Headers

Default headers to include with every request to the API.

These can be removed in individual requests by explicitly setting the header to undefined or null in request options.

Inherited from

AzureClientOptions.defaultHeaders

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:61


defaultQuery?

optional defaultQuery: DefaultQuery

Default query parameters to include with every request to the API.

These can be removed in individual requests by explicitly setting the param to undefined in request options.

Inherited from

AzureClientOptions.defaultQuery

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:68


deployment?

optional deployment: string

A model deployment, if given, sets the base client URL to include /deployments/{deployment}. Note: this means you won't be able to use non-deployment endpoints. Not supported with Assistants APIs.

Inherited from

AzureClientOptions.deployment

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:240


deploymentName?

optional deploymentName: string

Deprecated

use "deployment" instead

Defined in

packages/llm/openai/dist/index.d.ts:11


endpoint?

optional endpoint: string

Your Azure endpoint, including the resource, e.g. https://example-resource.azure.openai.com/

Inherited from

AzureClientOptions.endpoint

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:235


fetch?

optional fetch: Fetch

Specify a custom fetch function implementation.

If not provided, we use node-fetch on Node.js and otherwise expect that fetch is defined globally.

Inherited from

AzureClientOptions.fetch

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:47


httpAgent?

optional httpAgent: Agent

An HTTP agent used to manage HTTP(S) connections.

If not provided, an agent will be constructed by default in the Node.js environment, otherwise no agent is used.

Inherited from

AzureClientOptions.httpAgent

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:40


maxRetries?

optional maxRetries: number

The maximum number of times that the client will retry a request in case of a temporary failure, like a network error or a 5XX error from the server.

Default

2

Inherited from

AzureClientOptions.maxRetries

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:54


organization?

optional organization: null | string

Defaults to process.env['OPENAI_ORG_ID'].

Inherited from

AzureClientOptions.organization

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:15


project?

optional project: null | string

Defaults to process.env['OPENAI_PROJECT_ID'].

Inherited from

AzureClientOptions.project

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:19


timeout?

optional timeout: number

The maximum amount of time (in milliseconds) that the client should wait for a response from the server before timing out a single request.

Note that request timeouts are retried by default, so in a worst-case scenario you may wait much longer than this timeout before the promise succeeds or fails.

Inherited from

AzureClientOptions.timeout

Defined in

node_modules/.pnpm/openai@4.60.1_encoding@0.1.13_zod@3.23.8/node_modules/openai/index.d.mts:33