#891·utopia

Graph extraction fails with OpenAI models in 0.1.0-rc6 (max_tokens too large)

Author: HDI865Created Sep 23, 2026Updated Sep 23, 2026

Graph extraction fails with OpenAI models in 0.1.0-rc6 (max_tokens too large)

Version: 0.1.0-rc6 (worked in <0.1.0-rc5>) Provider / model: OpenAI / gpt-4o-mini

Description Graph extraction fails for every chunk when using an OpenAI model. The request is sent with max_tokens: 65536, but the model only supports up to 16384 completion tokens, so the API returns 400.

Error

本轮 1 个分块里 1 个没能抽取:#0 调用失败:LLM request failed (400 Bad Request): max_tokens is too large: 65536. This model supports at most 16384 completion tokens, whereas you provided 65536.

(Translation of prefix: "1 of 1 chunks in this round failed to extract: #0 call failed")

Steps to reproduce

  1. Configure the OpenAI provider with model gpt-4o-mini endpoint: https://api.openai.com/v1
  2. Run graph extraction on any document
  3. Extraction fails with the error above

Expected behavior max_tokens should respect the selected model's completion limit (or be configurable), and extraction should succeed.

Additional context

  • OS / install method: docker