Repository navigation
Pin promptfoo 0.124.1 so Codex evals reach a model, and test that promptfoo accepts the pinned SDK - #1689
Conversation
…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
left a comment
There was a problem hiding this comment.
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]>
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, andevals/pins the SDK at 0.160.0 to matchcodex_versionincodex/action.yaml, the Codex that CI ships. This pins promptfoo to 0.124.1, the newest release without the check. The@hono/node-serveroverride from #1682 still applies, andnpm auditreports 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.cjsruns 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 failstest-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=optionalinstall),uv run pytest evals/test_prepare.py,pre-commit run --all-files.