contracts: sync the CLI contract from InferenceInfra #4768 (model reasoning object)

Merged
AM
22d ago
+211-3

Syncs the CLI contract pin from InferenceInfra #4768 (fix/reasoning-budget @ d4b4877a56). Merge this before InferenceInfra #4768: that PR's consumer-impact gate stays red until Wally main carries this pin.

What changed

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

python3 contracts/sync_from_inferenceinfra.py --from <InferenceInfra @ d4b4877a56>
  • contracts/wally-cli-v1.openapi.json, the extract of InferenceInfra's control-plane-v1.openapi.json:
    • Two new schemas: ModelReasoning and ModelReasoningLevel.
      • ModelReasoning describes how a model reasons: levels, default_level, thinking_off, thinking_ceiling_tokens, budget_enforced.
      • ModelReasoningLevel is the reasoning_effort enum none, minimal, low, medium, high, xhigh, max.
    • The model entry gains an optional reasoning field.
    • The source stamp moves from feat/decisions-images-eve @ 520f0780 to fix/reasoning-budget @ d4b4877a.
    • Nothing else in the extract moves.
  • src/account/console_contract.rs, the binding regenerated from that extract (DO NOT EDIT):
    • CONTRACT_SHA256 moves with the extract.
    • The two new types are added.
    • reasoning is an Option, read tolerantly, so the CLI keeps working against a server that doesn't send it.
    • No CLI code reads the new field yet.

The decisions contract (wally-decisions-public-v1.openapi.json) is unchanged by #4768, so decisions_contract.rs doesn't move.

Checks run locally

  • cmake configure against the pinned kit, then build and ctest --test-dir build (runs cargo test).
  • cargo clippy --all-targets -- -D warnings.
  • cargo fmt --check.
  • CI's "Console binding matches its pinned contract" step: tests/test_contract_sync.py, generate_console_binding.py --check, sync_from_inferenceinfra.py --check.
  • tests/test_versions.py and scripts/ci/check-versions.py.
  • tests/test_wally_rust_cmake_guard.py.
  • The retired-model-id checks.
  • scripts/test/test-ledger.py.
  • scripts/ci/check-agents-sync.sh.

Against InferenceInfra #4768's gate

InferenceInfra's contracts/check_consumer_impact.py --against-wally-pin --head d4b4877a56:

Wally treeresult
this branchconsumer-impact: none (exit 0)
today's mainstale, 5ebb11bde30e -> 6e4009badbfe (exit 1), the same failure #4768's CI reports

Overlap with open PRs

#194 (decisions response metadata) touches src/account/console.rs and tests/test_wally_contract.rs but neither generated file. Nothing it adds depends on the model-list schema, so the two can merge in either order.

Merge order

  1. Runanywhere-monorepo #234 (InferenceInfra contract pin for reasoning budgets).
  2. This PR.
  3. Rerun InferenceInfra #4768's gate.
  4. InferenceInfra #4768.

No release is needed for the gate: it reads Wally main.


Summary by cubic

Syncs the CLI contract pin from InferenceInfra #4768, adding a model reasoning object to the API schema and regenerating the Rust binding to match. The new reasoning field is optional, so the CLI continues to work against servers that don't send it; no CLI code reads the field yet.

Merge order (due to InferenceInfra's consumer-impact gate):

  1. This PR.
  2. InferenceInfra #4768.

The contract is generated by the repo's sync tool; nothing is hand-edited.

Summary by CodeRabbit

  • New Features
    • Model listings can now include reasoning configuration details, such as supported effort levels, a default level, thinking-token limits, and whether thinking can be disabled.
    • The model information supports reasoning budgets that are enforced separately from thinking-token usage.