Skip to content

[Feat] Add Beveridge (Large-C / Pro-C / Pro-C-Web) as a decision backend - #136

Open
Birfy wants to merge 1 commit into
mainfrom
issue-135-beveridge
Open

Birfy wants to merge 1 commit into
mainfrom
issue-135-beveridge

Conversation

@Birfy

@Birfy Birfy commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Required human contributor answers

Danyang (repo owner) asked scheduled coding runs to fill these from the issue and not wait for a separate human form (ignore PR #71's gate). Source: #135.

  1. What outcome are you trying to achieve?

    Answer: A first-class --model beveridge adapter so Agents can use Beveridge Large-C / Pro-C / Pro-C-Web on the same fronts as the other text backends, without pretending their published benchmark numbers are ours.

  2. What is the highest-leverage variable for that outcome?

    Answer: A faithful mapping onto Beveridge's real request path (bev.load() or POST /v1/decide), with fail-closed limits (15 questions, no score, no invented images field) and contract tests that never download weights.

  3. How will this work move that variable rather than create busywork?

    Answer: It lands the adapter and registration only. Live qualification on ticket_router or Allrecipes is explicitly out of scope for [Feat] Add Beveridge (Large-C / Pro-C / Pro-C-Web) as a decision backend #135 and left as a follow-up.

  4. Who is the customer or user, and what do they actually need?

    Answer: Agents contributors and eval runners who want to point --model beveridge at a local Large-C (CPU) or a bev serve process, with clear docs on checkpoints, /v1/decide, and limits.

After answering the four questions: is a PR needed at all to achieve this outcome?

Human decision and rationale (or explicit source reference): Yes — #135 asks for the adapter to land this way, same split as #129.

For a bug fix: link actual observed failure evidence.

Evidence: Not a bug fix.

Why

Beveridge is an Apache-2.0 family of open-weight System One decision models (arXiv:2611.18655). Its HTTP server speaks POST /v1/decide, not /v1/systemone, so it cannot ride --model jev. Large-C is a laptop-CPU encoder in the same niche as in-process Laya. See #135.

How

New adapter s1a/decision_models/beveridge.py, registered on build_model, tool, rails, browser, decide/probe, and MCP:

  • In-process default: bev.load() of Beveridge-Large-C after uv sync --extra beveridge. BEV_MODEL selects large-c / pro-c / pro-c-web (or a repo id / path).
  • Served path: BEV_URL wins and posts to /v1/decide. Optional BEV_API_KEY only for a gateway; upstream bev serve has no auth.
  • Maps Observation.state plus named choice/noul questions onto Beveridge state + questions (string instructions, flattened criteria). Fails closed on more than 15 questions and on a missing or malformed answers object. Screenshots are dropped; no images field is sent.
  • Provenance on raw: in-process vs served, requested checkpoint, and the model name the package or server echoes when it sends one.

Files to open first: s1a/decision_models/beveridge.py, tests/test_decision_models_beveridge.py, docs/decision-models.md.

What

  • --model beveridge on the text fronts (tool, rails, browser, s1a decide/probe, MCP decide).
  • Extra: uv sync --extra beveridge (bev-decisions>=0.2.5). The served path needs no extra.
  • Env: BEV_URL, BEV_MODEL, BEV_DEVICE, BEV_API_KEY, BEV_TIMEOUT_S (see .env.example and docs/configuration.md).
  • Docs and CHANGELOG describe the real path, checkpoints, the 15-question and 4,096-token limits, and that Large-C has no images. Paper percentages are not copied as Agents results.
  • Callers do not have to change existing backends.

Verification

  • uv run ruff format --check . && uv run ruff check . && uv run ty check
  • uv run pytest -q — 1415 passed, 136 skipped (plus a later targeted re-run after format); scripts/smoke.sh — smoke: ok
  • CHANGELOG.md and the docs say what the code does now

Demo / evidence

  • Video link, or exemption/blocker with follow-up: N/A for this adapter-only change. [Feat] Add Beveridge (Large-C / Pro-C / Pro-C-Web) as a decision backend #135 says a live qualification run is not required to land the adapter (same split as [Feat] Add Fastino GLiDE as a served System One decision backend #129). Follow-up: a recorded Large-C or served run (command, SHA, checkpoint, device, date).
  • Application/task → agent actions → independently checked result: Offline stub /v1/decide and fake bev.load contract tests only (choice, noul, 15-question cap, missing/malformed answers, in-process vs served env selection). CI does not call Hugging Face or a GPU.
  • System1-Agents / System1-Omni commits, checkpoint and worker/frontend provenance: Head e4d07ee on issue-135-beveridge, based on main c4da7c3. No live worker.

Closes #135.

--model beveridge talks to bev.load() in process (Large-C by default; CPU is
enough) or, when BEV_URL is set, to bev serve at POST /v1/decide. Choice and
noul only; no images; at most 15 questions per call. Contract tests use a stub
server and a fake bev.load so CI never downloads weights.

Closes #135.

@Birfy Birfy left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review (Birfy) — comment only, own PR, not approving

Head e4d07eee, CI green (core 3.11/3.13, full, benchmarks). This matches #135: --model beveridge against in-process bev.load() (default Large-C after uv sync --extra beveridge, BEV_MODEL selects large-c / pro-c / pro-c-web or a repo/path) or a local bev serve (BEV_URL wins and posts to /v1/decide, not /v1/systemone). Optional BEV_API_KEY is only for a gateway; upstream bev serve has no auth. Choice and noul only; instructions are a non-empty string; browser element rows are flattened via omnijev_option. Screenshots are dropped and no images field is sent. More than 15 questions is a config error (paper cap; the 0.2.5 package allows 16). Missing or malformed answers fail closed. In-process decide is the answers dict itself, not an {"answers": ...} envelope; the served path uses the envelope and Usage.from_payload. Provenance keeps path, requested checkpoint, and on the served path URL, request id, and Server-Timing. One transport / 502 / 504 retry sits inside BEV_TIMEOUT_S.

Offline stub tests cover served vs in-process bodies, aliases, the 15-question cap, missing/malformed answers, image dropping, and env selection (BEV_URL wins over an installed package). No live Large-C or bev serve run in this PR, as stated. Do not copy Beveridge-Bench / automation-rate / web-navigation percentages as Agents results. I did not find a blocker in the adapter.

Two non-blocking notes for the first live run:

  • BEV_URL is treated as the server origin and always has /v1/decide appended. If a first run pastes http://127.0.0.1:8000/v1/decide, the client will post to /v1/decide/v1/decide. The .env.example already shows the origin form; just don't treat a 404 from a pasted path as a model failure.
  • Images are dropped with a warning rather than refused, so the browser front can still use the text page state. A live browser write-up should say the screenshot was not sent, and should not be read as a multimodal Beveridge run. /health also does not name the checkpoint, so served provenance falls back to BEV_MODEL until a payload model field appears (already tested when the server echoes one).

I am not approving this PR (it is mine). The adapter looks ready for review.

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.

[Feat] Add Beveridge (Large-C / Pro-C / Pro-C-Web) as a decision backend

1 participant