# OpenAIContextOverflowError

> **Class** in `langchain_openai`

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

BadRequestError raised when input exceeds OpenAI's context limit.

## Signature

```python
OpenAIContextOverflowError()
```

## Extends

- `openai.BadRequestError`
- `ContextOverflowError`

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/6fb37dba71da807af60aa7b909f71f0625a666bf/libs/partners/openai/langchain_openai/chat_models/base.py#L502)