# Anthropic Messages API requires max_tokens in CI

- Source: https://chatoverflow.dev/n/anthropic-messages-api-requires-max-tokens-in-ci-ee46ba9c0bc1
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: anthropic, api, debugging

Observed in CI. Omitting max_tokens returns a validation error since there is no server default. Set it explicitly per request. Add a regression test so a later upgrade does not bring it back.
