E0-3/E0-4 groundwork: provider options, pinned docs, Track A/B in the protocol

- providers: per-model request extras (e.g. reasoning_effort), key_env,
  token_param (max_completion_tokens on api.openai.com); recorded
- docs pinned to the toolchain being run: Rust offline docs from the
  sysroot, Zig langref and std source of the same installation; several
  mounts under a read-only /docs; hashes recorded (cached for big trees)
- protocol: neutral model labels and calibration before classes (§2);
  smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of
  degradation (§39a); Track A controlled vs Track B native agents (§39b)
- plan: E-C calibration, E-G gates, E-N native-agent run
This commit is contained in:
dev committed 2026-10-04 17:28:15 +03:00
1 parent b49003bdb9
commit d7bb9273f3
14 files changed
+250 -60

No files matched your search

+7 -2
View File
@@ -30,7 +30,8 @@ def cmd_run(a):
run_dir, rec = record.run_one(
a.task, a.language, a.provider, a.model, a.out, model_class=a.model_class, seed=a.seed, sandbox_kind=a.sandbox,
evaluator=shlex.split(a.evaluator) if a.evaluator else None, evaluator_hash_path=a.evaluator_hash_path,
pricing=load_pricing(a.pricing), base_url=a.base_url, max_tokens=a.max_tokens, temperature=a.temperature)
pricing=load_pricing(a.pricing), base_url=a.base_url, max_tokens=a.max_tokens, temperature=a.temperature,
provider_options={k: v for k, v in {"extra": json.loads(a.extra) if a.extra else None, "key_env": a.key_env, "token_param": a.token_param}.items() if v})
m = rec["metrics"]
print(json.dumps({"run": run_dir, "termination": m["termination"], "accepted": rec["accepted"], "tool_calls": m["tool_calls"],
"input_tokens": m["input_tokens"], "output_tokens": m["output_tokens"], "cost_usd": rec["cost_usd"]}))
@@ -64,7 +65,8 @@ def cmd_matrix(a):
tpath, lang, mdl["provider"], mdl["model"], out, model_class=mdl.get("class"), seed=seed,
sandbox_kind=plan.get("sandbox", "bwrap"), evaluator=evaluator, evaluator_hash_path=hash_path,
pricing=pricing, base_url=mdl.get("base_url"), max_tokens=mdl.get("max_tokens", 8192), temperature=mdl.get("temperature"),
limits=plan.get("limits"))
limits=plan.get("limits"),
provider_options={k: mdl[k] for k in ("extra", "key_env", "token_param") if k in mdl})
print(f" -> {rec['metrics']['termination']}, accepted={rec['accepted']}", file=sys.stderr)
report.print_report([out])
@@ -96,6 +98,9 @@ def main(argv=None):
r.add_argument("--base-url")
r.add_argument("--max-tokens", type=int, default=8192)
r.add_argument("--temperature", type=float)
r.add_argument("--extra", help='JSON merged into every request body, e.g. {"reasoning_effort": "medium"}')
r.add_argument("--key-env", help="name of the environment variable holding the API key (openai provider)")
r.add_argument("--token-param", help="max_tokens or max_completion_tokens (openai provider)")
r.set_defaults(fn=cmd_run)
m = sub.add_parser("matrix", help="run every cell of a plan file (resumable)")