Files
Mason Daugherty b08c3913fb test(openai): skip Codex VCR tests before cassette setup (#38690)
Codex integration tests need to be skipped in CI whenever VCR is not in
playback mode, but the setup-time skip ran too late: `pytest-recording`
could already try to open a cassette and hit the missing on-disk OAuth
token first. Moving the skip to collection time marks the matching Codex
tests before cassette setup while keeping the existing VCR-token fake
for playback runs.

## Changes
- Add a `pytest_collection_modifyitems` hook that marks Codex chat-model
integration tests as skipped in CI unless VCR is replaying existing
cassettes.
- Scope collection-time matching to the local chat-model
integration-test directory so same-named modules collected elsewhere are
not skipped accidentally.
- Keep the OAuth-token fake path active for VCR playback by preserving
`_fake_codex_oauth_token` behavior when `record_mode` is `none`.
2026-07-06 11:29:03 -04:00
..