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

# llm-call-without-max-tokens

> An OpenAI chat or responses call sets no output token limit.

## What it flags

An OpenAI `chat.completions.create` or `responses.create` call passes an options object with no `max_tokens`, `max_completion_tokens` or `max_output_tokens`, so the output length is unbounded. Calls with a spread or non-literal options are skipped. Anthropic `messages.create` is not checked because its types require `max_tokens`.

## Configuration

Set `maxOutputTokens` to your feature's output budget in tokens to enable a review-only edit. The option accepts positive safe integers from 1 to 9,007,199,254,740,991 and has no default. The edit uses the parameter supported by the installed OpenAI SDK. Review how the feature handles truncated output before applying it.

Preview the individual edit with `loadwise fix perf --id <id> --dry-run`. Apply it with `loadwise fix perf --id <id>` after review. If the configured budget changes, scan again for the new ID. In the editor, choose **Review fix** to see the exact token budget and confirm the edit.

```json theme={null}
{
  "rules": { "llm-call-without-max-tokens": { "level": "warn", "options": { "maxOutputTokens": 1200 } } }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.