Skip to content

fix(evals): use cancel endpoint for evaluation runs - #3812

Draft
arvindg-openai wants to merge 1 commit into
openai:mainfrom
arvindg-openai:codex/fix-eval-run-cancel-endpoint
Draft

fix(evals): use cancel endpoint for evaluation runs#3812
arvindg-openai wants to merge 1 commit into
openai:mainfrom
arvindg-openai:codex/fix-eval-run-cancel-endpoint

Conversation

@arvindg-openai

Copy link
Copy Markdown
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Append /cancel to the request path in both Runs.cancel and AsyncRuns.cancel. They currently send POST requests to /evals/{eval_id}/runs/{run_id}.

Add mocked HTTP transport regressions that assert the POST method and full cancellation URL for synchronous and asynchronous clients, including parsed, raw, and streaming response modes. All six cases fail before the endpoint correction and pass afterward.

Additional context & links

The curl example in the public Cancel an eval run reference uses /evals/{eval_id}/runs/{run_id}/cancel. The endpoint heading on that page currently omits /cancel; this change follows the HTTP example.

The resource file is generated. Please incorporate the endpoint correction into the generation source so subsequent regeneration retains it. This PR preserves the method signatures, options, and response types.

Validation

  • .venv/bin/python -m pytest tests/test_eval_run_cancel.py -q -n 0: 6 passed; the same tests fail against the original code.
  • .venv/bin/ruff check .: passed.
  • .venv/bin/ruff format --check src/openai/resources/evals/runs/runs.py tests/test_eval_run_cancel.py: passed.
  • git diff --check: passed.
  • Generated-code budget check against the public snapshot: passed (6,630 custom lines; limit 10,000).

The unchanged checkout reports a stale lockfile under uv sync --locked --all-extras. Tests used the exact committed dependencies installed with uv sync --frozen --all-extras; no dependency or lockfile changes are included.

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