Repository navigation
[v0.5.0] benchmark adapters — define OpenAI/Google model matrix #73
Description
Context
Parent: #63. Methodology: docs/benchmarks/PUBLIC-BENCHMARK-METHODOLOGY.md.
Aymen explicitly wants OpenAI and Google model families included. This issue defines the model/client matrix and provider adapter contracts without letting model choice blur into a single fake tool-quality score.
Goal
Add the benchmark model matrix and provider adapter contracts for OpenAI and Google-backed runs, with tests that use mocks rather than paid/live calls.
Acceptance criteria
- The runner/model design cross-multiplies the evaluation matrix: every eligible tool is evaluated against every model in the matrix independently.
- Tool scores are not averaged across different model families; any aggregate must remain secondary and clearly labeled.
- Token metrics are labeled as
Claude Tokens (Normalized Payload)when using the methodology tokenizer, so they are not confused with OpenAI or Google API billing tokens. -
docs/benchmarks/model-matrix.ymldefines the model/client families to run, including at least one OpenAI-backed and one Google-backed model family. - The matrix format records provider, model ID, client/wrapper, token-count method, latency scope, and whether the result is eligible for headline claims.
- Provider adapter interfaces support request, response, latency, token metadata, and failure capture.
- Tests cover mock OpenAI and mock Google adapter behavior without making network calls.
- The report design keeps per-model results visible and marks any aggregate as aggregate.
- The implementation refuses to run live providers unless explicit environment variables/config are present.
Scope boundaries
In scope:
- Model matrix spec.
- Provider adapter interfaces.
- Mock adapter tests.
- Live-call guardrails.
Out of scope:
- Running the full benchmark.
- Spending API credits.
- Adding README claims.
- Choosing final headline wording.
Forbidden-territory reminder
Do not modify MCP tool names, parameters, return shapes, schema.sql, .github/workflows/, pyproject.toml project metadata, .planning/POSITIONING.md, the README hero section, LICENSE, SECURITY.md, or existing tests by weakening/deleting assertions.
If a new third-party runtime dependency is proposed, trigger supervisor review and justify why stdlib/httpx is insufficient.
Validation commands
uv run ruff check src/ tests/
uv run pyright src/
uv run pytest --tb=short -q
uv run python-docs-mcp-server doctorRun any new adapter tests directly as well.
PR template
Use Refs #63, not Closes #63.
The PR must include:
- Model matrix summary.
- Explanation of live-call guardrails.
- Test output.
- Confirmation that no paid/live provider calls were made.
Recovery
If token counting cannot be made comparable across providers, stop and comment with the exact mismatch instead of averaging incompatible numbers.
Effort estimate
4-6 hours. This can be agent-ready for mocked adapter plumbing only; live benchmark execution remains Vision-controlled.
Activity
ayhammouda commentedon Jul 8, 2026
Agent context — #73 [v0.5.0] benchmark adapters — define OpenAI/Google model matrix
Status: FINAL (verified against merged
main@ad18406, PR #75 squash-merged 2026-07-08). Merge-readiness fixes now on main: snapshots are byte-for-byte copies via_write_snapshot; a non-empty--outdir is refused withBenchmarkValidationError(exit 2);yaml.YAMLErrorre-raises asBenchmarkValidationError.Auditable copy: this content is mirrored as a comment on issue #73 (
.planning/is gitignored — the issue comment is the copy pre-flight verifies and dispatch links).1. Roadmap excerpt (why this exists)
STRATEGIC-ROADMAP-2026-05-29.md §4 (v0.5.0): "Public benchmark harness — all eligible target docs MCPs + no-MCP baseline; 50-question Python eval… Reproducible from a clean clone. Methodology disclosure mandatory."
Decision 5.8: token methodology = Claude tokenizer, measured after client-side rewrap, tokens AND latency reported.
Decision 5.17 (evidence ladder): no comparative claim in any public copy until the harness produces reproducible data.
Maintainer decision (PLAN.md Amendment 2026-07-08): Claude token counting uses the Anthropic count-tokens API confined to the maintainer-run live phase — your adapter contracts record
token_count_methodper matrix entry, but no adapter you write ever calls that API.2. Code touch-points (verify against merged main before starting)
benchmarks/runner.py— the runner core you extend:_EXECUTABLE_ADAPTERS = {"fake", "no-mcp-baseline", "no_mcp_baseline"}— the adapter dispatch set._execute_cell(cell)/_fake_provider_answer(cell)— per-cell execution; failure capture viaBenchmarkCellFailure(category, message)with categoriestool_failure | timeout | mcp_protocol_crash.Competitordataclass — manifest entries carryid,adapter, and free-formraw(e.g.provider,model,fake_answer,force_failure)._tool_model_key(competitor)— producesid:provider/modelkeys; your matrix must keep tool×model cells separate (no cross-family averaging; aggregates secondary and labeled).benchmarks/__main__.py— argparse subparser tree (runsubcommand). Add adapter/matrix wiring conservatively; T4 will add a siblingreportmodule later — keep__main__.pychurn minimal.snapshots/,environment.json,planned-cells.json,run-summary.json, and per-celltranscripts|tokens|latency|scoring|failures/<competitor>/<qid>.json. Token records currently carryclient_wrapped_tokens: Noneplaceholders — your interfaces define where real values would go, mocks only.docs/benchmarks/model-matrix.yml— ≥1 OpenAI-backed and ≥1 Google-backed family; each entry records provider, model ID, client/wrapper, token-count method, latency scope, headline-eligibility.3. Test patterns to follow
tests/benchmarks/test_runner.py: module-level helpers_write_yaml/_corpus/_manifestbuild YAML fixtures undertmp_path; tests callrun_benchmark(BenchmarkConfig(...))directly and assert artifact paths/JSON content. Follow the same shape for adapter tests. New tests MUST live undertests/benchmarks/(souv run pytest tests/benchmarks -qexercises them). Mock OpenAI and mock Google adapters — zero network calls; the implementation must refuse live providers unless explicit env/config is present, and tests must cover that refusal.4. Known pitfalls
benchmarks/— you must also runuv run ruff check benchmarks/anduv run pyright benchmarks/(see [v0.5.0] ci — lint and type-check the benchmarks/ package (maintainer-only) #84).Claude Tokens (Normalized Payload)— never confusable with OpenAI/Google billing tokens.Refs #63(neverCloses #63),Closes #73only if all criteria met. Diff >500 lines →supervisor-reviewlabel + explanation section.5. Decision log (worker fills in)
ayhammouda commentedon Jul 8, 2026
Decision log (worker T3)
PR opened: #85 (
agent/73-benchmark-adapter-matrix→main).docs/benchmarks/model-matrix.yml(2 OpenAI + 2 Google model families) andbenchmarks/model_matrix.py(loader +tool_model_cells()cross-multiplication contract).benchmarks/adapters/(request/response/latency/token-metadata/failure-capture interface, mock OpenAI/Google adapters, live-provider refusal guardrail). No SDK or network library imported anywhere; live adapters are guarded stubs that always raiseLiveExecutionNotImplementedErroreven when guard env vars are set.benchmarks/runner.py's_execute_celldispatch or touchbenchmarks/__main__.py— see PR [v0.5.0] benchmark adapters — define OpenAI/Google model matrix #85's "Why this approach" section for the reasoning (avoiding an unprescribed design guess against the merged, byte-assertedtests/benchmarks/test_runner.pyartifact shapes). Zero diff onrunner.py,__main__.py, andtest_runner.py, confirmed viagit diff ad18406 --name-only.Refs #63+ does not useCloses #73.supervisor-reviewlabel added: diff is 1088 total lines / 582 source-only lines across the newbenchmarks/model_matrix.py+benchmarks/adapters/*.py, over the 500-line §7 threshold. No forbidden-territory file touched, no existing test modified, no new runtime dependency, nopyproject.tomlchange.I am not stopping pending guidance — this is a normal §7 supervisor-review pause, not a blocker. Ready for Vision/maintainer review.
[v0.5.0] benchmark adapters — define OpenAI/Google model matrix (#85)
ayhammouda commentedon Jul 8, 2026
Closing: PR #85 merged (1f202b6) delivers 8/9 acceptance criteria. The remaining criterion — report design keeping per-model results visible with aggregates marked as aggregates — is #74's deliverable by design (methodology work-package sequencing). The deliberate runner-wiring deferral (composition of tool×model cells with the runner's tool×question artifact shapes) is tracked for the maintainer-filed WP3 product-runner-adapter issue or a scoped follow-up; see the decision-log comment above. Merge performed by the orchestrator under the maintainer's explicit delegation recorded in this session (PLAN.md Amendment 2026-07-08).