Skip to content

test: align SDK max_output_tokens coverage with Magpie contract - #16

Merged
reonokiy merged 1 commit into
mainfrom
test/sdk-output-token-contract
Oct 10, 2026
Merged

reonokiy merged 1 commit into
mainfrom
test/sdk-output-token-contract

Conversation

@reonokiy

Copy link
Copy Markdown
Owner

Summary

Fix the stale SDK compatibility assertion left after #15: max_output_tokens=32 is accepted as a discarded compatibility hint, so the rejection case must use zero instead.

  • Exercise null, 1, 32, and u64::MAX through the official Python SDK for standard and Lite models, with both streaming and non-streaming responses.
  • Assert the complete fixture response, usage, and preserved extra field, including streamed text, rather than merely successful HTTP status. A hint of 1 must not truncate the response.
  • Preserve existing zero, negative, fraction, and string rejection coverage; add boolean and unsigned-64-bit-overflow rejection cases.
  • No gateway behavior or dependency changes.

Validation

  • Passed: uv sync --locked --group dev (pinned OpenAI SDK 3.16.0).
  • Passed: python -m compileall -q tests/sdk and git diff --check.
  • Passed: pytest collection for the two changed modules with a two-model fixture configuration: 194 cases collected.
  • Not run locally: Rust tests, gateway-backed SDK execution, official CLI fixtures, and source audit, because this execution environment has no Cargo/Rust toolchain. The existing PR workflow runs these checks; collection alone is not an execution pass.
  • Live subscription E2E not run; this test-only change targets local fixtures.

The existing workflow may publish its normal pr-N test image after checks pass. No merge or production rollout is part of this change.

@reonokiy
reonokiy marked this pull request as ready for review October 10, 2026 09:34
@reonokiy
reonokiy merged commit 297c75d into main Oct 10, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T09:35:54.384317Z e717cd4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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