Skip to content

Pin promptfoo 0.124.1 so Codex evals reach a model, and test that promptfoo accepts the pinned SDK - #1689

Merged
max-sixty merged 2 commits into
mainfrom
promptfoo-codex-sdk-gate
Nov 14, 2026
Merged

max-sixty merged 2 commits into
mainfrom
promptfoo-codex-sdk-gate

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Since Dependabot's #1604 moved promptfoo to 0.125.1, every Codex eval attempt has errored before reaching a model: The OpenAI Codex SDK provider requires @openai/codex-sdk@^0.156.1 (found 0.160.0). promptfoo 0.125.0 added that runtime check, and evals/ pins the SDK at 0.160.0 to match codex_version in codex/action.yaml, the Codex that CI ships. This pins promptfoo to 0.124.1, the newest release without the check. The @hono/node-server override from #1682 still applies, and npm audit reports the same 8 transitive advisories at 0.124.0, 0.124.1 and 0.125.1, so the downgrade reintroduces none. promptfoo's main branch already accepts >=0.156.1 <0.167.0, but no release carries it yet.

Nothing in CI caught this because the provider test replaced promptfoo's provider with a fake. The new test in evals/test_codex-provider.cjs runs promptfoo's real Codex provider and the pinned SDK against a stand-in Codex binary. It fails at 0.125.1 with promptfoo's own error and passes at 0.124.1, so a bump that brings the check back fails test-eval-capture. It also passes against 0.125.1 with the range widened to promptfoo main's, so a fixed release won't trip it.

With this pin, a live run of one focused case (issue-recovery, current arm, --repeat 1) reached the model and passed both rubrics, with no SDK error.

Tests: npm --prefix evals test (also with CI's --omit=optional install), uv run pytest evals/test_prepare.py, pre-commit run --all-files.

This was written by Claude Code on behalf of max-sixty

…mptfoo accepts the pinned SDK

promptfoo 0.125.0 added a runtime check that refuses @openai/codex-sdk
outside ^0.156.1, so since the Dependabot bump to 0.125.1 every Codex eval
attempt has errored before reaching a model. evals/ pins the SDK at 0.160.0
to match the Codex that CI ships. 0.124.1 is the newest promptfoo without the
check, and npm audit reports the same advisories at 0.124.1 as at 0.125.1.

The provider test replaced promptfoo's provider with a fake, so CI never
loaded promptfoo. The new test runs promptfoo's real Codex provider and the
pinned SDK against a stand-in Codex binary, so a bump that brings the check
back fails test-eval-capture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test-eval-capture fails before any test runs, because CI's npm --prefix evals ci --ignore-scripts --omit=optional (Node 22.23.4) rejects the regenerated lockfile:

npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
npm error Missing: [email protected] from lock file
npm error Missing: [email protected] from lock file
npm error Missing: [email protected] from lock file

These are the nested node_modules/mongoose/node_modules/{gcp-metadata,gaxios,google-logging-utils} entries that main's lockfile has and this one drops. They satisfy mongoose's bundled [email protected] optional peer gcp-metadata: ^7.0.1, which conflicts with the hoisted [email protected]. test-eval-capture passes on main at the merge base, so this lockfile is what breaks it. It also means the new provider test hasn't run in CI yet. Regenerating the lock under Node 22's npm (npm --prefix evals install --package-lock-only) should bring the entries back. An offline npm ci against my local cache didn't hit the sync error, so I couldn't produce the fixed lock here.

npm 11 dropped three optional peers (gaxios, gcp-metadata,
google-logging-utils) that npm 10's npm ci requires.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit 3c849af into main Nov 14, 2026
13 checks passed
@max-sixty
max-sixty deleted the promptfoo-codex-sdk-gate branch November 14, 2026 22:49
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.

2 participants