improved

Breaking change: Updated complexity budget exhausted error

🏷️ API version: 2025-07

We've simplified the complexity budget exhausted error response to better align with other rate and limit errors. The response no longer includes budget-related fields such as complexity, complexity_budget_left, or status_code.

If you still need access to this data, you can retrieve it using the complexity endpoint.

Here’s a comparison of the old and new responses:

{
  "errors": [
    {
      "message": "Complexity budget exhausted",
      "extensions": {
        "code": "COMPLEXITY_BUDGET_EXHAUSTED",
        "retry_in_seconds": 60
      }
    }
  ]
}
{
  "errors": [
    {
      "message": "Complexity budget exhausted",
      "extensions": {
        "code": "COMPLEXITY_BUDGET_EXHAUSTED",
        "retry_in_seconds": 7,
        "complexity": 11,
        "complexity_budget_left": 4999967,
        "complexity_budget_limit": 5000000,
        "status_code": 429
      }
    }
  ]
}