contracts: sync the CLI contract from InferenceInfra staging (release 2's contract family and the codex harness)

Merged
SA
16d ago
+162-9

Syncs the CLI contract pin from an InferenceInfra commit that holds staging plus release 2's contract changes plus the codex harness (InferenceInfra #4854). Merge this before #4854 reaches the start train: #4854's consumer-impact job stays red until Wally main carries this pin. The previous attempt at it, #158, is closed and unmerged.

What changed

Both files are generated by the repo's own tool; nothing is hand-edited:

python3 contracts/sync_from_inferenceinfra.py --from <InferenceInfra @ 78fbc52a76>

The source commit is 78fbc52a76 on the InferenceInfra branch mig/devsync/wally-pin-source (pushed so the stamp names a commit anyone can fetch). It is staging (bc48453f13) merged with the end of the release 2 chat image family (5376a6b0b0, which carries the reasoning levels #4840, the image contracts #4863 and the chat image pull requests) and with #4854 (6f5d334646).

Every difference from the current pin is additive:

  • ApiErrorCode gains 30 values that InferenceInfra staging added (organisations, operator and price-version errors).
  • Harness gains codex (append-only; this is what #4854 adds).
  • The models response declares the x-request-id header; the cancel operation declares its 429 with Retry-After.
  • ModelReasoning's description cites InferenceInfra's docs/reference/models.md. No schema of the #4768 pin (#195) changes.
  • The source stamp moves from fix/reasoning-budget to mig/devsync/wally-pin-source.
  • src/account/console_contract.rs is regenerated from the extract (CONTRACT_SHA256 moves). No CLI code reads the new values.

The decisions contract (wally-decisions-public-v1.openapi.json) is unchanged: it already equals the source's, so decisions_contract.rs does not move.

Checks run locally

  • CI's "Console binding matches its pinned contract" step: tests/test_contract_sync.py (OK), generate_console_binding.py --check (matches), sync_from_inferenceinfra.py --check (Wally CLI lock OK (78fbc52a, mig/devsync/wally-pin-source, ...)).
  • tests/test_versions.py (OK).
  • cargo check --locked --all-targets (exit 0), cargo clippy --locked --all-targets -- -D warnings (exit 0) and cargo fmt --check (exit 0). check --all-targets compiles every test target against the regenerated binding, so no match on ApiErrorCode or Harness is left non-exhaustive. The build used placeholder console endpoints (https://console-api.invalid, https://console.invalid) in the environment, no .env.
  • Codex round 1 on this diff (gpt-6.1-sol, high, fast, exit 0): "No findings." It confirmed the extract matches the stamped commit, the schema changes are additive and no Rust match or secret is affected.
  • Not run: cargo test / ctest. On this host the test binaries fail to link (undefined Brotli* symbols; the cmake build the CI uses supplies them), which is the host, not the diff: it touches only the two generated files. CI's ctest is the check that runs them.

Against InferenceInfra's gate

contracts/check_consumer_impact.py --against-wally-pin --head <the source commit> with this tree as --wally-repo:

Wally treeresult
this branchconsumer-impact: none (exit 0)
today's mainstale, CLI pin 6e4009badbfe -> ef52e0dcf18f (exit 1)

The pin equals InferenceInfra staging after release 2 plus #4854. It does not equal staging today (the reasoning levels and image contracts are still in review there), so InferenceInfra pull requests that land before release 2 will still see the job red. The start train is the first place it is meant to be green. If the contract set in staging differs when that train starts, the command above re-syncs it; it is deterministic.

Overlap with open PRs

None of the open PRs (#196, #166) touches the generated files.

Merge order

  1. This PR.
  2. InferenceInfra release 2 (the contract family above), then InferenceInfra #4854 on the start train.

Runanywhere-monorepo is also reached by the same InferenceInfra changes (its pins are not read by the staging gate; a warning only).

🤖 Generated with Claude Code


Summary by cubic

Synced the CLI contract pin to InferenceInfra staging commit d7e2304d, which carries release 2's contract family and the codex harness. All differences from the previous pin are additive, so no current CLI behavior changes.

  • ApiErrorCode gains 30 values; Harness gains codex.
  • The models response declares x-request-id; the cancel operation declares its 429 with Retry-After and documents pull-mode cancellation.
  • The decisions contract is unchanged.
  • The re-pin replaces the earlier 78fbc52a source; a main merge (release 0.8.8) touched no generated files.

Merge this before InferenceInfra #4854 reaches the start train; its consumer-impact check stays red until this pin lands.

Summary by CodeRabbit

  • API Updates
    • Added support for the Codex harness and expanded documented error responses for account, identity, organization, invitation, membership, partner, gateway, pricing, and operational scenarios.
    • Clarified that the Authorization header may contain a console session token, and added documentation for the models endpoint’s request ID response header.
    • Documented pull-mode cancellation behavior, including its wait limits, rate limits, and retry guidance.
  • Documentation
    • Updated the model reasoning description to link to the model reference.