# AnthropicModel

**Kind:** Class

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

**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

- `AnthropicModel` stops the work with an early return when `this.azureHosted`.
- `AnthropicModel` stops the work with an early return when `msg.includes('429') || msg.includes('overloaded')`.
- `AnthropicModel` stops the work with an early return when `msg.includes('500') || msg.includes('529') || msg.includes('ECONNRESET')`.
- `AnthropicModel` stops the work with an early return when `typeof request.input === 'string'`.
- `AnthropicModel` stops the work with an early return when `!request.tools || request.tools.length === 0`.

## When something fails

- `AnthropicModel` handles failure in 4 places: it discards it silently in 2, logs it and continues in 1, and lets it reach the caller in 1.
