contracts: pin the CLI contract from InferenceInfra's code-complete line (draft, do not merge yet)
What this is
InferenceInfra's new_infra -> staging promotion runs consumer-impact, which compares this repo's main pin of the control-plane contract with the document at the promotion head. Against Wally main today it reports two stale pins (probe run 39821135687):
| Pin | Wally main | Source head |
|---|---|---|
contracts/wally-cli-v1.openapi.json (CLI slice digest) | 874aaee1b08b | fa883210af07 |
contracts/wally-decisions-public-v1.openapi.json | c58df52d97cd | 592f19f7d594 |
The same check is already red against InferenceInfra staging itself (874aaee1b08b -> ef52e0dcf18f): Wally's pin was cut from the live line (fix/codex-harness-live, 3fb1fd00).
Two commits
contracts: carve GET /v1/models down to the default form the CLI reads:extract-cli-contract.pyleaves theformatquery out oflistModelsand readsModelListResponseasModelList. Needed because InferenceInfra'strack/api-paritymakes the models list answer a second form (?format=openrouter-v2) as aoneOfwith no discriminator; the CLI never sendsformat. Without this, the binding generator stops withunsupported schema shapeatOpenRouterV2ParameterDescriptor.properties. Three new tests intests/test_contract_sync.py(red before the change). No pin moves in this commit.contracts: pin the CLI contract from InferenceInfra's code-complete line (a8259392): output ofpython3 contracts/sync_from_inferenceinfra.py --from <InferenceInfra @ a8259392>. Additive only: 34 newApiErrorCodevalues,x-request-idon the models response, anonymous-capableGET /v1/models, description wording.console_contract.rsis regenerated; the only use of the enum outside it is== ApiErrorCode::KCardRequired.
The decisions pin is deliberately not touched
Wally main already carries the Eve prompt_format_version 4 revision (ecd738b2, sha256 2201716c...). track/api-parity brings the same bytes to InferenceInfra's integration branch; new_infra is the one that lacks them today. So that red clears when track/api-parity merges, and re-vendoring the older document here would drop format 4 from what production accepts.
Checked
python3 tests/test_contract_sync.py: 8 tests OKpython3 contracts/generate_console_binding.py --check: both bindings match their pinspython3 contracts/sync_from_inferenceinfra.py --check:Wally CLI lock OK (a8259392, track/api-parity)console_contract.rscompiles standalone (cargo check, serde_json only)- InferenceInfra's gate,
python3 contracts/check_consumer_impact.py --against-wally-pin --head <track/api-parity checkout> --wally-repo <this branch>:consumer-impact: none - Not run: a full
cargo checkof wally (build.rs needs the CMake kit); CI compiles it.
DRAFT: do not merge yet
- Merge only when the InferenceInfra owner says so. This pin gets ahead of what production serves today.
- Ready condition: InferenceInfra
integration/code-completecontainstrack/api-parity. Then re-run the gate against the integration head; if its control-plane document changed since a8259392, re-run the sync (the slice digest, not the stamp, is what is compared). - Merge order: this PR first, then the InferenceInfra promotion PR (list this URL under "Required downstream PRs").
š¤ Generated with Claude Code
Summary by cubic
Re-syncs the CLI contract pin to InferenceInfra's track/api-parity line (a8259392), which is what its new_infra ā staging promotion compares against; the current pin (from the live line) is stale against both Wally main and InferenceInfra staging. The decisions contract is deliberately not touched: Wally main already carries the format 4 revision the new line serves.
Changes
extract-cli-contract.pynow carvesGET /v1/modelsdown to the defaultModelListform the CLI reads, dropping theformatquery and theopenrouter-v2oneOfbranch; the binding generator cannot read that shape, and a change to it must not flag the pin stale. Older sources without the query are carried unchanged.- The slice adds 34
ApiErrorCodevalues, anonymousGET /v1/models, thex-request-idresponse header, and updated description wording.console_contract.rsis regenerated; its only external use is== ApiErrorCode::KCardRequired.
Merge note
Do not merge yet: this pin gets ahead of what production serves. Merge only after InferenceInfra's owner confirms, once integration/code-complete contains track/api-parity; re-run the sync if the control-plane document changed since a8259392. This PR lands before the promotion PR.