> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure

> JavaScript API reference for the azure llm plugin.

## AzureOpenAILLM

Azure OpenAI large language model provider.

Creates a configured Azure OpenAI LLM provider for use in a voice agent.

### Constructor

```typescript theme={null}
new AzureOpenAILLM(opts: AzureOpenAILLMOptions)
```

<ParamField path="apiKey" type="string | null">
  Azure OpenAI API key. Falls back to the `AZURE_OPENAI_API_KEY` env var, then `null`.
</ParamField>

<ParamField path="azureEndpoint" type="string | null">
  Azure OpenAI resource endpoint. Falls back to the `AZURE_OPENAI_ENDPOINT` env var, then `null`.
</ParamField>

<ParamField path="deployment" type="AzureOpenAILLMModel | string | null">
  Azure deployment name (used as the model). Default: `''`.
</ParamField>

<ParamField path="apiVersion" type="string">
  Azure OpenAI REST API version. Default: `'2024-10-21'`.
</ParamField>

<ParamField path="temperature" type="number">
  Sampling temperature. Range `0`-`2`. Default: `0.7`.
</ParamField>

<ParamField path="maxOutputTokens" type="number">
  Maximum number of tokens to generate. Default: `1024`.
</ParamField>

<ParamField path="topP" type="number | null">
  Nucleus sampling probability mass. Default: `null`.
</ParamField>

<ParamField path="frequencyPenalty" type="number | null">
  Frequency penalty. Range `-2`-`2`. Default: `null`.
</ParamField>

<ParamField path="presencePenalty" type="number | null">
  Presence penalty. Range `-2`-`2`. Default: `null`.
</ParamField>

<ParamField path="seed" type="number | null">
  Sampling seed for reproducible outputs. Default: `null`.
</ParamField>

<ParamField path="stop" type="string | null">
  Stop sequence(s). Default: `null`.
</ParamField>

<ParamField path="user" type="string | null">
  Opaque end-user identifier. Default: `null`.
</ParamField>

<ParamField path="toolChoice" type="string | null">
  Tool-selection strategy, e.g. `'auto'`, `'none'`. Default: `null`.
</ParamField>

<ParamField path="parallelToolCalls" type="boolean | null">
  Whether to allow parallel tool calls. Default: `null`.
</ParamField>

<ParamField path="responseFormat" type="Record<string, any> | null">
  Response format object, e.g. JSON mode. Default: `null`.
</ParamField>

<ParamField path="reasoningEffort" type="string | null">
  Reasoning effort level for reasoning models. Default: `null`.
</ParamField>

### cancelCurrentGeneration

```typescript theme={null}
cancelCurrentGeneration(): Promise<void>
```

Cancel the in-flight generation for the current session, if any.

### chat

```typescript theme={null}
chat(_messages: any, _opts?: LLMChatOptions): AsyncIterator<LLMResponse>
```

Stream a completion for the given messages, yielding LLMResponse chunks.

<ResponseField name="returns" type="AsyncIterator<LLMResponse>" />

### close

```typescript theme={null}
close(): Promise<void>
```

Release any resources held by the provider.

### closeEmitter

```typescript theme={null}
closeEmitter(): Promise<void>
```

Close the emitter: drop all handlers and stop emitting. Waits up to 2 seconds
for in-flight async handlers to settle before returning.

### emit

```typescript theme={null}
emit(event: string, ...args: any[]): void
```

<ParamField path="event" type="string" required />

### getRuntimeConfig

```typescript theme={null}
getRuntimeConfig(): Record<string, any>
```

<ResponseField name="returns" type="Record<string, any>" />

### listenerCount

```typescript theme={null}
listenerCount(event: string): number
```

<ParamField path="event" type="string" required />

<ResponseField name="returns" type="number" />

### off

```typescript theme={null}
off(event: string, handler: EventHandler): void
```

<ParamField path="event" type="string" required />

<ParamField path="handler" type="EventHandler" required />

### on

```typescript theme={null}
on(event: string, handler: EventHandler): EventHandler
```

<ParamField path="event" type="string" required />

<ParamField path="handler" type="EventHandler" required />

<ResponseField name="returns" type="EventHandler" />

### once

```typescript theme={null}
once(event: string, handler: EventHandler): EventHandler
```

<ParamField path="event" type="string" required />

<ParamField path="handler" type="EventHandler" required />

<ResponseField name="returns" type="EventHandler" />

### removeAllListeners

```typescript theme={null}
removeAllListeners(event?: string): void
```

<ParamField path="event" type="string" />

***

## AzureOpenAILLMModel

Supported Azure OpenAI LLM deployment model names.

```typescript theme={null}
type AzureOpenAILLMModel = 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'o4-mini' | 'o3' | 'gpt-4o'
```
