# StreamChunkTimeoutError

> **Class** in `langchain_openai`

📖 [View in docs](https://reference.langchain.com/python/langchain-openai/chat_models/_client_utils/StreamChunkTimeoutError)

Raised when no streaming chunk arrives within `stream_chunk_timeout`.

`issubclass(StreamChunkTimeoutError, asyncio.TimeoutError)` and
`issubclass(StreamChunkTimeoutError, TimeoutError)` both hold on all
supported Python versions, so existing `except asyncio.TimeoutError:`
and `except TimeoutError:` handlers keep catching the exception. On
Python 3.11+ the two exceptions are the same object, so only
`asyncio.TimeoutError` appears in `__bases__`.

Structured attributes (`timeout_s`, `model_name`, `chunks_received`)
mirror the WARNING log's `extra=` payload so diagnostic code doesn't
need to regex the message.

## Signature

```python
StreamChunkTimeoutError(
    self,
    timeout_s: float,
    *,
    model_name: str | None = None,
    chunks_received: int = 0,
)
```

## Extends

- `*_StreamChunkTimeoutBases`

## Constructors

```python
__init__(
    self,
    timeout_s: float,
    *,
    model_name: str | None = None,
    chunks_received: int = 0,
) -> None
```

| Name | Type |
|------|------|
| `timeout_s` | `float` |
| `model_name` | `str \| None` |
| `chunks_received` | `int` |


## Properties

- `timeout_s`
- `model_name`
- `chunks_received`

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/85a5a04210452aec2eb3a06a02961c8fefd5c8b6/libs/partners/openai/langchain_openai/chat_models/_client_utils.py#L578)