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

# Current limits

> Current Anthropic wrapper limits and fail-closed behavior.

The Anthropic wrapper intentionally fails closed for unsupported inputs. That is not a nice-to-have; silently skipping a checkpoint would be a security bug.

## Supported

| Capability                    | Status                                                      |
| ----------------------------- | ----------------------------------------------------------- |
| `client.messages.create(...)` | Supported for non-streaming calls.                          |
| Request preflight             | Supported for latest user text and supported base64 images. |
| User-defined client tools     | Supported when tools have a stable `name`.                  |
| Tool exposure filtering       | Supported through request decisions and `restrict_tools`.   |
| Tool-call checks              | Supported for returned `tool_use` blocks.                   |
| Tool-result checks            | Supported for pure tool-result continuation turns.          |
| Output checks and rewrites    | Supported for non-streaming final text.                     |

## Not Supported Yet

| Input or API                         | Behavior                                            |
| ------------------------------------ | --------------------------------------------------- |
| `messages.create({ stream: true })`  | Fails closed before Anthropic is called.            |
| `messages.stream(...)`               | Fails closed before Anthropic is called.            |
| URL image sources                    | Fails closed.                                       |
| GIF images                           | Fails closed.                                       |
| Document blocks                      | Fails closed.                                       |
| Non-text tool-result blocks          | Fails closed.                                       |
| Mixed tool-result continuation turns | Fails closed.                                       |
| Server-hosted Anthropic tools        | Fails closed in the current wrapper.                |
| Bedrock or Vertex Anthropic clients  | Not covered by the current JavaScript wrapper docs. |

## Rich Media Rules

Supported image blocks must use:

```typescript theme={null}
{
  type: "image",
  source: {
    type: "base64",
    media_type: "image/jpeg", // or image/png, image/webp
    data: imageBase64,
  },
}
```

Any other media shape is rejected before request preflight.

## Error Handling

Unsupported inputs and blocked checkpoints throw `AvertaSdkError` from `@averta-security/sdk-core`.

```typescript theme={null}
import { AvertaSdkError } from "@averta-security/sdk-core";

try {
  await client.messages.create({
    model: process.env.ANTHROPIC_MODEL ?? "claude-sonnet-4-5",
    max_tokens: 512,
    stream: true,
    messages: [{ role: "user", content: "Hello" }],
  });
} catch (error) {
  if (error instanceof AvertaSdkError) {
    console.error(error.code);
  }
}
```

Use non-streaming `messages.create(...)` when you need Averta request, tool, tool-result, and output checks around Anthropic today.
