# AzureResponsesModel

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/runtime/model-adapter.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/runtime/model-adapter.ts#L29)

Azure OpenAI Model — implements the SDK's Model interface using Azure Responses API.

**Implements:** `Model`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `getResponse` | `getResponse(request: ModelRequest)` | `Promise<ModelResponse>` |
| `getStreamedResponse` | `getStreamedResponse(request: ModelRequest)` | `AsyncIterable<import('@openai/agents').ResponseStreamEvent>` |
| `getRetryAdvice` | `getRetryAdvice(args: ModelRetryAdviceRequest)` | `ModelRetryAdvice | undefined` |

## Where it refuses work

- `AzureResponsesModel` stops the work with an early return when `!event?.type`.
- `AzureResponsesModel` stops the work with an early return when `!usage`.
- `AzureResponsesModel` stops the work with an early return when `!Array.isArray(output)`.
- `AzureResponsesModel` stops the work with an early return when `!item || typeof item !== 'object'`.
- `AzureResponsesModel` stops the work with an early return when `message.includes('429') || message.includes('throttled')`.
- `AzureResponsesModel` stops the work with an early return when `message.includes('500') || message.includes('502') || message.includes('503')`.

## When something fails

- `AzureResponsesModel` handles failure in 4 places: it lets it reach the caller in 2, turns it into a return value in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
