Skip to content

Use native OpenAI Chat token limits without duplicate overrides - #260

Open
qduc wants to merge 1 commit into
mainfrom
codex/openai-chat-token-field
Open

qduc wants to merge 1 commit into
mainfrom
codex/openai-chat-token-field

Conversation

@qduc

@qduc qduc commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Native OpenAI Chat requests with a token cap currently send max_tokens, which the current model rejects. Select max_completion_tokens from the actual SDK endpoint (api.openai.com), preserve compatible endpoints and explicit dialect overrides, and retain the inferred cap when an override is undefined. No model-name guessing or reasoning-setting changes.

Validation: final provider black-box suite 278 passed / 5 skipped; typecheck, build, lint (40 existing warnings), and 22 static tests passed. Eight registry/SDK/loopback regressions cover native and compatible endpoints, both explicit spellings, missing caps, and undefined options. Independent verification accepted 25 SDK cases, four real HTTP captures, and the eight regressions, including baseline failures and unchanged non-limit request fields.

This removes the native token-field rejection. The separately observed native Chat tools/reasoning incompatibility remains; this PR does not claim a successful live Chat task or infer a native upstream from an opaque localhost proxy.

This branch has not been deployed

No deployments
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