Skip to content

Fix chat completion token limit for GPT-5 models#1

Merged
black-yt merged 1 commit into
mainfrom
codex/fix-chat-completion-token-limit
Jun 17, 2026
Merged

Fix chat completion token limit for GPT-5 models#1
black-yt merged 1 commit into
mainfrom
codex/fix-chat-completion-token-limit

Conversation

@black-yt

@black-yt black-yt commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • choose the Chat Completions token-limit argument based on the model family
  • use max_completion_tokens for GPT-5 and o-series models, including provider-prefixed IDs such as openai/gpt-5.1
  • keep max_tokens for legacy chat-completions models
  • add requests to package dependencies because the public structai import path imports structai.pdf
  • bump the package version to 0.1.23 for the PyPI release
  • add a no-network unittest suite covering public imports, LLM request kwargs, parsing helpers, IO round trips, Judge exact-match behavior, concurrency ordering, and utility functions
  • add a GitHub Actions test workflow that runs the unittest suite on Python 3.10, 3.11, and 3.12

Testing

  • PYTHONDONTWRITEBYTECODE=1 /home/xwh/miniconda3/envs/agent/bin/python -m unittest discover -s tests -p "test_*.py"

@black-yt black-yt force-pushed the codex/fix-chat-completion-token-limit branch 3 times, most recently from 59e4594 to dbdc40d Compare June 17, 2026 02:30
@black-yt black-yt force-pushed the codex/fix-chat-completion-token-limit branch from dbdc40d to ff3d4c4 Compare June 17, 2026 02:31
@black-yt black-yt merged commit aac1721 into main Jun 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant