---
title: "ChatStreamChunkMetadata"
---

Structured error metadata


## Fields

| Field                                                          | Type                                                           | Required                                                       | Description                                                    | Example                                                        |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `error_type`                                                   | [components.APIErrorType](../components/apierrortype.mdx)       | :heavy_check_mark:                                             | Canonical OpenRouter error type, stable across all API formats | rate_limit_exceeded                                            |
| `provider_code`                                                | *Optional[str]*                                                | :heavy_minus_sign:                                             | Upstream provider-specific error code, when available          |                                                                |