From f16ee599d12a1654ab25df79cdb1406bf9f1743b Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 17 Nov 2026 14:37:01 -0500 Subject: [PATCH 01/19] Add GPT-6.2 Astra's and GPT-6.2 Sol's model cards, list prices and release dates Cards for OpenAI's GPT-6.2 Astra and GPT-6.2 Sol, released 2026-11-17, written before their onboarding. The change touches no published artifact. With no --model, eval-no-tools now sends requests to both models along with the rest of config.MODELS. - Route: both ids join GPT_6_MODELS, so they take the Responses-API transport, the local litellm registration and the Responses pricing branch. OpenAI's API changelog says tool calling on these models requires the Responses API. - Price: Astra $8 / $40 per 1M input/output tokens and $0.40 cached input; Sol $2 / $10 and $0.10 (OpenAI's model and pricing pages, read 2026-11-17). Cache reads are a twentieth of input, as on the GPT-6.1 rows, so each override carries its cache_read rate. Cache writes at the 30-minute rate are 1.25x input, the harness default. The listed long-context rates (double input and cached input, 1.5x output above 272k input tokens) are the structure the harness already applies to every Responses row. - Cards: written from OpenAI's documentation before any request to either model, and their notes say so. They take the GPT-6.1 Sol and Terra treatment: the forced answer tool, thinking_budget=True (the 16,384-token starting budget and 300s timeout) and no reasoning parameter. OpenAI's pages state no default reasoning effort and do not say whether a forced tool_choice works on these models; the onboarding gauntlet settles both and supplies the expected cost per scenario. The module docstring now says a card written before its model's onboarding says so in its notes. - Release dates: 2026-11-17 for both, from OpenAI's API changelog and its Developer Community announcement, in paper_results and the app's mirror. - Tests: the cards' treatments, cost reconstruction at the listed standard and long-context rates, the request shape (forced tool; no reasoning, temperature, top_p or logprobs), the listed cache rates and litellm entries, and the release dates. Co-Authored-By: Claude Opus 5.5 --- app/src/modelMeta.ts | 2 + policybench/config.py | 23 +++++++ policybench/eval_no_tools.py | 5 +- policybench/model_cards.py | 92 ++++++++++++++++++++++++- policybench/paper_results.py | 8 +++ tests/test_eval_no_tools.py | 128 +++++++++++++++++++++++++++++++++-- tests/test_model_cards.py | 2 + tests/test_paper_results.py | 9 +++ 8 files changed, 260 insertions(+), 9 deletions(-) diff --git a/app/src/modelMeta.ts b/app/src/modelMeta.ts index a605bcb6..296f485d 100644 --- a/app/src/modelMeta.ts +++ b/app/src/modelMeta.ts @@ -162,6 +162,8 @@ export const MODEL_RELEASE_DATES: Record = { "gpt-6-sol": "2026-09-22", "gpt-6.1-sol": "2026-09-29", "gpt-6.1-terra": "2026-10-26", + "gpt-6.2-astra": "2026-11-17", + "gpt-6.2-sol": "2026-11-17", "gpt-6-luna": "2026-09-22", "gpt-5.6-sol": "2026-07-09", "gpt-5.6-terra": "2026-07-09", diff --git a/policybench/config.py b/policybench/config.py index dee10e7a..3e6627e1 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -39,11 +39,18 @@ # GPT-6.1 Sol (2026-09-29) and GPT-6.1 Terra (announced and available # 2026-10-26) share it too, with cache reads at a twentieth of input; their # overrides' cache_read rates carry that (eval_no_tools._gpt_responses_cache_rates). +# GPT-6.2 Astra and GPT-6.2 Sol (both released 2026-11-17) share it as well, +# with cache reads at a twentieth of input. OpenAI's API changelog and its +# latest-model guide say tool calling on these two models requires the +# Responses API (developers.openai.com/api/docs/changelog and +# /api/docs/guides/latest-model, read 2026-11-17). GPT_6_MODELS = { "gpt-6-astra": "gpt-6-astra", "gpt-6-sol": "gpt-6-sol", "gpt-6.1-sol": "gpt-6.1-sol", "gpt-6.1-terra": "gpt-6.1-terra", + "gpt-6.2-astra": "gpt-6.2-astra", + "gpt-6.2-sol": "gpt-6.2-sol", "gpt-6-luna": "gpt-6-luna", } GPT_RESPONSES_MODELS = {**GPT_56_MODELS, **GPT_6_MODELS} @@ -202,6 +209,22 @@ # gpt-6.1-terra, read 2026-10-26, the day OpenAI announced it; the Models # API lists the id with created 2026-10-13T16:26Z). "gpt-6.1-terra": {"input": 1.0, "output": 5.0, "cache_read": 0.05}, + # gpt-6.2-astra: $8 / $40 per 1M input/output, $0.40 cached input, $10 + # cache writes (30-minute retention); $16 / $60 and $0.80 cached input for + # the whole request above 272k input tokens (developers.openai.com/api/ + # docs/models/gpt-6.2-astra and /api/docs/pricing, read 2026-11-17, the + # day OpenAI released it; the Models API lists the id with created + # 2026-10-31T07:00Z). These are the Standard tier's rates; the harness + # prices every request at them. + "gpt-6.2-astra": {"input": 8.0, "output": 40.0, "cache_read": 0.40}, + # gpt-6.2-sol: $2 / $10 per 1M input/output, $0.10 cached input, $2.50 + # cache writes (30-minute retention); $4 / $15 and $0.20 cached input for + # the whole request above 272k input tokens (developers.openai.com/api/ + # docs/models/gpt-6.2-sol and /api/docs/pricing, read 2026-11-17, the day + # OpenAI released it; the Models API lists the id with created + # 2026-11-02T18:07Z). These are the Standard tier's rates; the harness + # prices every request at them. + "gpt-6.2-sol": {"input": 2.0, "output": 10.0, "cache_read": 0.10}, "gpt-6-luna": {"input": 0.10, "output": 0.50}, "gpt-5.6-sol": {"input": 5.0, "output": 30.0}, "gpt-5.6-terra": {"input": 2.5, "output": 15.0}, diff --git a/policybench/eval_no_tools.py b/policybench/eval_no_tools.py index 279eb145..185a304b 100644 --- a/policybench/eval_no_tools.py +++ b/policybench/eval_no_tools.py @@ -149,8 +149,9 @@ def _gpt_responses_cache_rates(prices: dict[str, float]) -> tuple[float, float]: """Per-token cache read and write rates of a Responses-API GPT model. The default is the GPT-5.6 line's structure: cache reads at a tenth of - input and cache writes at 1.25x. GPT-6.1 Sol and GPT-6.1 Terra list cache - reads at a twentieth (their ``PRICE_OVERRIDES_PER_1M`` entries), so an + input and cache writes at 1.25x. GPT-6.1 Sol, GPT-6.1 Terra, GPT-6.2 Astra + and GPT-6.2 Sol list cache reads at a twentieth (their + ``PRICE_OVERRIDES_PER_1M`` entries), so an override's own ``cache_read`` or ``cache_write`` rate replaces the default. The caller doubles both above 272k prompt tokens, as it does input. diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 3a57d0fe..e6f2eb28 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -7,7 +7,8 @@ completion budget. None of this is model *configuration* — every model still runs unconfigured at its provider-default reasoning effort. Cards only encode serving-stack facts discovered during onboarding (see -``policybench onboard``). +``policybench onboard``); a card written before its model's onboarding says +so in its notes. Cards OVERRIDE the family-prefix heuristics in ``eval_no_tools``; models without a card (or with a field left ``None``) keep the heuristic treatment. @@ -130,6 +131,95 @@ class ModelCard: "reasoning tokens on every request." ), ), + # GPT-6.2 Astra. This card is written from OpenAI's documentation, read + # 2026-11-17, the day OpenAI released the model, and from the GPT-6.1 Sol + # and GPT-6.1 Terra cards above. It records no request to the model. + # Field by field: + # - answer_contract "tool": the GPT-6.1 cards' contract, the board's + # forced answer tool on the Responses API. OpenAI's model page lists + # function calling and structured outputs as supported + # (developers.openai.com/api/docs/models/gpt-6.2-astra), and its API + # changelog says tool calling on the model requires the Responses API + # (developers.openai.com/api/docs/changelog). No page read says whether + # a forced tool_choice works on this model; the onboarding gauntlet's + # tool probes settle that. + # - explanation_chunk_size None: the canonical whole-scenario request + # (chunking is closed to new models). + # - thinking_budget True: OpenAI's reasoning guide lists the model as a + # reasoning model, its model page says the API rejects reasoning effort + # "none", and the guide says reasoning tokens are billed as output + # tokens (developers.openai.com/api/docs/guides/reasoning). The card + # therefore takes the thinking class's 16,384-token starting budget and + # 300s timeout, as the GPT-6.1 cards do. The harness sends no reasoning + # parameter. The model page states no default effort, so the onboarding + # probes record whether the model reasons on the board's request. + # - request_timeout_seconds None: the thinking class's 300s. + # - provider_max_completion_tokens None: the model page lists a maximum + # output of 128,000 tokens, the harness's escalation ceiling. + # - expected_cost_per_scenario_usd is not set: no per-scenario cost has + # been measured. + "gpt-6.2-astra": ModelCard( + litellm_id="gpt-6.2-astra", + answer_contract="tool", + thinking_budget=True, + notes=( + "Written 2026-11-17 from OpenAI's documentation, read that day, " + "the day OpenAI released the model; the card records no request " + "to the model. It takes the treatment of the GPT-6.1 Sol and " + "GPT-6.1 Terra cards: the board's forced answer tool on the " + "whole-scenario request, over the Responses API, which OpenAI " + "says tool calling on this model requires. OpenAI lists it as a " + "reasoning model whose API rejects reasoning effort none; the " + "model page states no default effort, and the harness sends no " + "reasoning parameter. The onboarding gauntlet settles whether " + "the forced tool works and what the model's default reasoning " + "costs per scenario." + ), + ), + # GPT-6.2 Sol. Like the Astra card above, this card is written from + # OpenAI's documentation, read 2026-11-17, the day OpenAI released the + # model, and records no request to the model. Field by field: + # - answer_contract "tool": the GPT-6.1 cards' contract, the board's + # forced answer tool on the Responses API. OpenAI's model page gives + # the model the same endpoints as GPT-6.2 Astra + # (developers.openai.com/api/docs/models/gpt-6.2-sol), and its API + # changelog says tool calling on the model requires the Responses API + # (developers.openai.com/api/docs/changelog). No page read says whether + # a forced tool_choice works on this model; the onboarding gauntlet's + # tool probes settle that. + # - explanation_chunk_size None: the canonical whole-scenario request + # (chunking is closed to new models). + # - thinking_budget True: as on the Astra card, OpenAI lists the model as + # a reasoning model whose API rejects reasoning effort "none", and + # reasoning tokens are billed as output tokens + # (developers.openai.com/api/docs/guides/reasoning), so the card takes + # the thinking class's 16,384-token starting budget and 300s timeout. + # The harness sends no reasoning parameter. The model page states no + # default effort, so the onboarding probes record whether the model + # reasons on the board's request. + # - request_timeout_seconds None: the thinking class's 300s. + # - provider_max_completion_tokens None: the model page lists a maximum + # output of 128,000 tokens, the harness's escalation ceiling. + # - expected_cost_per_scenario_usd is not set: no per-scenario cost has + # been measured. + "gpt-6.2-sol": ModelCard( + litellm_id="gpt-6.2-sol", + answer_contract="tool", + thinking_budget=True, + notes=( + "Written 2026-11-17 from OpenAI's documentation, read that day, " + "the day OpenAI released the model; the card records no request " + "to the model. It takes the treatment of the GPT-6.1 Sol and " + "GPT-6.1 Terra cards: the board's forced answer tool on the " + "whole-scenario request, over the Responses API, which OpenAI " + "says tool calling on this model requires. OpenAI lists it as a " + "reasoning model whose API rejects reasoning effort none; the " + "model page states no default effort, and the harness sends no " + "reasoning parameter. The onboarding gauntlet settles whether " + "the forced tool works and what the model's default reasoning " + "costs per scenario." + ), + ), "gpt-6-luna": ModelCard( litellm_id="gpt-6-luna", answer_contract="tool", diff --git a/policybench/paper_results.py b/policybench/paper_results.py index 9297b3fc..4be6643e 100644 --- a/policybench/paper_results.py +++ b/policybench/paper_results.py @@ -3663,6 +3663,14 @@ def last_engine_upgrade(self) -> EngineUpgrade: # API (id gpt-6.1-terra) the same day (x.com/OpenAI/status/ # 2114780711664398349; 9to5mac.com 2026-10-26). "gpt-6.1-terra": "2026-10-26", + # developers.openai.com/api/docs/changelog dates the release of GPT-6.2 + # Astra and GPT-6.2 Sol (API ids gpt-6.2-astra and gpt-6.2-sol) 2026-11-17; + # OpenAI's Developer Community announcement of that day + # (community.openai.com/t/gpt-6-2-astra-and-sol-are-now-available/1417531) + # opens both in the API and, for Plus, Pro, Enterprise and Edu users, in + # ChatGPT Work and Codex. Both read 2026-11-17. + "gpt-6.2-astra": "2026-11-17", + "gpt-6.2-sol": "2026-11-17", "gpt-6-luna": "2026-09-22", # piunikaweb.com 2026-04-17 SuperGrok beta (paid public tier) "grok-4.3": "2026-04-17", diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 7dfac707..5b1f07e5 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3470,12 +3470,126 @@ def test_gpt_6_1_terra_override_reconstructs_token_costs( assert reconstructed.is_estimated is False +@pytest.mark.parametrize( + ( + "model", + "prompt_tokens", + "completion_tokens", + "cached_prompt_tokens", + "cache_write_prompt_tokens", + "expected", + ), + [ + # GPT-6.2 Astra: $8 / $40 per 1M, $0.40 cached input and $10 cache + # writes (30-minute retention) up to 272k input tokens. + ("gpt-6.2-astra", 200_000, 0, 0, 0, 1.6), + ("gpt-6.2-astra", 0, 1_000_000, 0, 0, 40.0), + ("gpt-6.2-astra", 200_000, 0, 200_000, 0, 0.08), + ("gpt-6.2-astra", 200_000, 0, 0, 200_000, 2.0), + # Above 272k input tokens, the whole request: $16 input, $0.80 cached + # input and $60 output per 1M. + ("gpt-6.2-astra", 300_000, 0, 0, 0, 4.8), + ("gpt-6.2-astra", 300_000, 10_000, 300_000, 0, 0.84), + # GPT-6.2 Sol: $2 / $10 per 1M, $0.10 cached input and $2.50 cache + # writes (30-minute retention) up to 272k input tokens. + ("gpt-6.2-sol", 200_000, 0, 0, 0, 0.4), + ("gpt-6.2-sol", 0, 1_000_000, 0, 0, 10.0), + ("gpt-6.2-sol", 200_000, 0, 200_000, 0, 0.02), + ("gpt-6.2-sol", 200_000, 0, 0, 200_000, 0.5), + # Above 272k input tokens: $4 input, $0.20 cached input and $15 output. + ("gpt-6.2-sol", 300_000, 0, 0, 0, 1.2), + ("gpt-6.2-sol", 300_000, 10_000, 300_000, 0, 0.21), + ], +) +def test_gpt_6_2_overrides_reconstruct_token_costs( + model, + prompt_tokens, + completion_tokens, + cached_prompt_tokens, + cache_write_prompt_tokens, + expected, +): + """GPT-6.2 Astra and GPT-6.2 Sol are priced at OpenAI's Standard-tier list + rates, cache reads at a twentieth of input, and the long-context rates + for a request above 272k input tokens (developers.openai.com/api/docs/ + models/gpt-6.2-astra and /gpt-6.2-sol, and /api/docs/pricing, read + 2026-11-17). OpenAI lists no long-context cache-write rate for either + model, so no case here prices one.""" + assert PRICE_OVERRIDES_PER_1M["gpt-6.2-astra"] == { + "input": 8.0, + "output": 40.0, + "cache_read": 0.40, + } + assert PRICE_OVERRIDES_PER_1M["gpt-6.2-sol"] == { + "input": 2.0, + "output": 10.0, + "cache_read": 0.10, + } + reconstructed = _reconstruct_token_cost( + model_name=model, + model_id=model, + prompt_tokens=prompt_tokens, + completion_tokens=completion_tokens, + cached_prompt_tokens=cached_prompt_tokens, + cache_write_prompt_tokens=cache_write_prompt_tokens, + ) + + assert reconstructed.usd == pytest.approx(expected) + assert reconstructed.is_estimated is False + + +@pytest.mark.parametrize("model_id", ["gpt-6.2-astra", "gpt-6.2-sol"]) +def test_gpt_6_2_requests_force_the_answer_tool_and_set_no_reasoning( + mini_scenario, model_id +): + """The GPT-6.2 Astra and Sol cards, written before onboarding, take the + GPT-6.1 cards' treatment: the board's forced answer tool on the Responses + API, which OpenAI says tool calling on these models requires, and the + thinking class's 16,384-token starting budget and 300s timeout. The + request carries no reasoning parameter, so each model reasons at + OpenAI's default effort. It also leaves out temperature, top_p, logprobs + and top_logprobs, which OpenAI's latest-model guide says to omit for + these models.""" + from policybench.eval_no_tools import ( + ANSWER_FUNCTION_NAME, + _answer_contract_for_model, + _uses_responses_api, + ) + + assert MODELS[model_id] == GPT_RESPONSES_MODELS[model_id] == model_id + assert _uses_responses_api(model_id) + assert _answer_contract_for_model(model_id, env={}) == "tool" + assert _thinking_configuration(model_id) == {"mode": "provider_default"} + assert _request_timeout_seconds(model_id) == 300 + + _, kwargs = _responses_request_kwargs(mini_scenario, ["income_tax"], model_id) + + assert kwargs["tool_choice"] == { + "type": "function", + "name": ANSWER_FUNCTION_NAME, + } + assert [tool["name"] for tool in kwargs["tools"]] == [ANSWER_FUNCTION_NAME] + assert kwargs["max_output_tokens"] == 16_384 + assert kwargs["timeout"] == 300 + for omitted in ( + "reasoning", + "reasoning_effort", + "temperature", + "top_p", + "logprobs", + "top_logprobs", + ): + assert omitted not in kwargs + + # Each Responses-API GPT row's cache read and write rates per 1M tokens, as # OpenAI lists them, written out here so the pricing tests do not derive their # expectations from the helper they test (Terra card review r2): the GPT-6.1 -# rows read at a twentieth of input, the rest at the GPT-5.6 line's tenth; -# every row writes at 1.25x input. +# and GPT-6.2 rows read at a twentieth of input, the rest at the GPT-5.6 +# line's tenth; every row writes at 1.25x input. LISTED_CACHE_RATES_PER_1M = { + "gpt-6.2-astra": (0.40, 10.0), + "gpt-6.2-sol": (0.10, 2.50), "gpt-6.1-terra": (0.05, 1.25), "gpt-6.1-sol": (0.10, 2.50), "gpt-6-sol": (0.20, 2.50), @@ -3498,8 +3612,8 @@ def test_every_responses_model_has_a_listed_cache_rate(): def test_responses_models_read_the_cache_at_their_listed_rate(model, read, write): """Each Responses-API GPT row prices its cache at the rate its override lists, or at the GPT-5.6 line's tenth and 1.25x when it lists none. The - two GPT-6.1 rows read at a twentieth (the bug the Terra card review found: - the reconstruction hard-coded a tenth).""" + GPT-6.1 and GPT-6.2 rows read at a twentieth (the bug the Terra card + review found: the reconstruction hard-coded a tenth).""" assert _gpt_responses_cache_rates(PRICE_OVERRIDES_PER_1M[model]) == ( pytest.approx(read / 1_000_000), pytest.approx(write / 1_000_000), @@ -3518,8 +3632,10 @@ def test_responses_models_read_the_cache_at_their_listed_rate(model, read, write assert reconstructed.usd == pytest.approx(rate / 5) -@pytest.mark.parametrize("model", ["gpt-6.1-terra", "gpt-6.1-sol"]) -def test_litellm_registers_the_gpt_6_1_cache_read_rate(model): +@pytest.mark.parametrize( + "model", ["gpt-6.1-terra", "gpt-6.1-sol", "gpt-6.2-astra", "gpt-6.2-sol"] +) +def test_litellm_registers_the_twentieth_cache_read_rate(model): """The local litellm entry carries the same cache rates as the reconstruction, doubled above 272k prompt tokens.""" entry = litellm.model_cost[GPT_RESPONSES_MODELS[model]] diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index cd426023..b7245869 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -73,6 +73,8 @@ "gpt-6-sol": ("tool", None, 300, 16_384), "gpt-6.1-sol": ("tool", None, 300, 16_384), "gpt-6.1-terra": ("tool", None, 300, 16_384), + "gpt-6.2-astra": ("tool", None, 300, 16_384), + "gpt-6.2-sol": ("tool", None, 300, 16_384), "gpt-6-luna": ("tool", None, 300, 16_384), "openrouter/deepseek/deepseek-v4-pro-0813": ("tool", None, 2400, 98_304), "openrouter/deepseek/deepseek-v4-flash-0731": ("tool", None, 2400, 98_304), diff --git a/tests/test_paper_results.py b/tests/test_paper_results.py index 57ef7a1f..38023a36 100644 --- a/tests/test_paper_results.py +++ b/tests/test_paper_results.py @@ -135,6 +135,15 @@ def test_gpt_6_1_terra_release_date_is_its_announcement_day(): assert MODEL_RELEASE_DATES["gpt-6.1-terra"] == "2026-10-26" +@pytest.mark.parametrize("model", ["gpt-6.2-astra", "gpt-6.2-sol"]) +def test_gpt_6_2_release_dates_are_the_api_release_day(model): + """OpenAI's API changelog dates the release of GPT-6.2 Astra and GPT-6.2 + Sol 2026-11-17, and OpenAI's Developer Community announcement of that day + opens both in the API and, for Plus, Pro, Enterprise and Edu users, in + ChatGPT Work and Codex.""" + assert MODEL_RELEASE_DATES[model] == "2026-11-17" + + def test_app_release_dates_mirror_the_paper_registry(): """app/src/modelMeta.ts copies MODEL_RELEASE_DATES (its comment says to update both together); every runnable model has a date, and the two From 26132a20fd82ca44704e88e85d8fc893338d8ebe Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 17 Nov 2026 14:59:23 -0500 Subject: [PATCH 02/19] Tidy the GPT-6.2 cards' comments after their independent check. The check found nothing above a nit. This takes four of its notes: Sol's long-context comment no longer says more than the pricing page does, the forum post is called a forum announcement, a test docstring stops claiming that the models reason by default, and one docstring is reflowed. Co-Authored-By: Claude Fable 5.2 --- policybench/config.py | 4 ++-- policybench/eval_no_tools.py | 7 +++---- policybench/paper_results.py | 2 +- tests/test_eval_no_tools.py | 8 ++++---- tests/test_paper_results.py | 6 +++--- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/policybench/config.py b/policybench/config.py index 3e6627e1..757f9f38 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -218,8 +218,8 @@ # prices every request at them. "gpt-6.2-astra": {"input": 8.0, "output": 40.0, "cache_read": 0.40}, # gpt-6.2-sol: $2 / $10 per 1M input/output, $0.10 cached input, $2.50 - # cache writes (30-minute retention); $4 / $15 and $0.20 cached input for - # the whole request above 272k input tokens (developers.openai.com/api/ + # cache writes (30-minute retention); $4 / $15 and $0.20 cached input + # above 272k input tokens (developers.openai.com/api/ # docs/models/gpt-6.2-sol and /api/docs/pricing, read 2026-11-17, the day # OpenAI released it; the Models API lists the id with created # 2026-11-02T18:07Z). These are the Standard tier's rates; the harness diff --git a/policybench/eval_no_tools.py b/policybench/eval_no_tools.py index 185a304b..0716463a 100644 --- a/policybench/eval_no_tools.py +++ b/policybench/eval_no_tools.py @@ -151,10 +151,9 @@ def _gpt_responses_cache_rates(prices: dict[str, float]) -> tuple[float, float]: The default is the GPT-5.6 line's structure: cache reads at a tenth of input and cache writes at 1.25x. GPT-6.1 Sol, GPT-6.1 Terra, GPT-6.2 Astra and GPT-6.2 Sol list cache reads at a twentieth (their - ``PRICE_OVERRIDES_PER_1M`` entries), so an - override's own ``cache_read`` or ``cache_write`` rate replaces the - default. The caller doubles both above 272k prompt tokens, as it does - input. + ``PRICE_OVERRIDES_PER_1M`` entries), so an override's own ``cache_read`` + or ``cache_write`` rate replaces the default. The caller doubles both + above 272k prompt tokens, as it does input. """ read = prices.get("cache_read", prices["input"] * 0.1) / 1_000_000 write = prices.get("cache_write", prices["input"] * 1.25) / 1_000_000 diff --git a/policybench/paper_results.py b/policybench/paper_results.py index 4be6643e..937dffb5 100644 --- a/policybench/paper_results.py +++ b/policybench/paper_results.py @@ -3665,7 +3665,7 @@ def last_engine_upgrade(self) -> EngineUpgrade: "gpt-6.1-terra": "2026-10-26", # developers.openai.com/api/docs/changelog dates the release of GPT-6.2 # Astra and GPT-6.2 Sol (API ids gpt-6.2-astra and gpt-6.2-sol) 2026-11-17; - # OpenAI's Developer Community announcement of that day + # an announcement of that day in OpenAI's Developer Community forum # (community.openai.com/t/gpt-6-2-astra-and-sol-are-now-available/1417531) # opens both in the API and, for Plus, Pro, Enterprise and Edu users, in # ChatGPT Work and Codex. Both read 2026-11-17. diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 5b1f07e5..7a6d027e 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3546,10 +3546,10 @@ def test_gpt_6_2_requests_force_the_answer_tool_and_set_no_reasoning( GPT-6.1 cards' treatment: the board's forced answer tool on the Responses API, which OpenAI says tool calling on these models requires, and the thinking class's 16,384-token starting budget and 300s timeout. The - request carries no reasoning parameter, so each model reasons at - OpenAI's default effort. It also leaves out temperature, top_p, logprobs - and top_logprobs, which OpenAI's latest-model guide says to omit for - these models.""" + request carries no reasoning parameter, so each model runs at OpenAI's + default effort, which OpenAI's pages do not state. It also leaves out + temperature, top_p, logprobs and top_logprobs, which OpenAI's + latest-model guide says to omit for these models.""" from policybench.eval_no_tools import ( ANSWER_FUNCTION_NAME, _answer_contract_for_model, diff --git a/tests/test_paper_results.py b/tests/test_paper_results.py index 38023a36..c6480a80 100644 --- a/tests/test_paper_results.py +++ b/tests/test_paper_results.py @@ -138,9 +138,9 @@ def test_gpt_6_1_terra_release_date_is_its_announcement_day(): @pytest.mark.parametrize("model", ["gpt-6.2-astra", "gpt-6.2-sol"]) def test_gpt_6_2_release_dates_are_the_api_release_day(model): """OpenAI's API changelog dates the release of GPT-6.2 Astra and GPT-6.2 - Sol 2026-11-17, and OpenAI's Developer Community announcement of that day - opens both in the API and, for Plus, Pro, Enterprise and Edu users, in - ChatGPT Work and Codex.""" + Sol 2026-11-17, and an announcement of that day in OpenAI's Developer + Community forum opens both in the API and, for Plus, Pro, Enterprise and + Edu users, in ChatGPT Work and Codex.""" assert MODEL_RELEASE_DATES[model] == "2026-11-17" From 00627249779dd3789300b76f04b7026335836b3c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 19:23:02 +0000 Subject: [PATCH 03/19] Record GPT-6.2 Astra's and GPT-6.2 Sol's onboarding on their cards. Both cards now begin "Onboarded 2026-11-19" and give the onboarding gauntlet's results, run under the cards' own request fields: the forced answer tool passed 3/3 and 16/16 whole-scenario for each model. Each card gains the expected cost per scenario the gauntlet suggested, $0.057 for Astra and $0.019 for Sol. A two-household smoke on each card parsed all 36 outputs with no budget escalation and reasoning tokens on every request, and every response named the requested model with no dated snapshot. No request field changes: the contract, the 16,384-token starting budget and the 300s timeout stay as they were. The module docstring drops its clause about cards written before onboarding, since no card is one now. The tests pin the two expected costs and price the smoke's four requests at the overrides. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 160 ++++++++++++++++++++---------------- tests/test_eval_no_tools.py | 18 +++- tests/test_model_cards.py | 13 +++ 3 files changed, 118 insertions(+), 73 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index e6f2eb28..2b69395a 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -7,8 +7,7 @@ completion budget. None of this is model *configuration* — every model still runs unconfigured at its provider-default reasoning effort. Cards only encode serving-stack facts discovered during onboarding (see -``policybench onboard``); a card written before its model's onboarding says -so in its notes. +``policybench onboard``). Cards OVERRIDE the family-prefix heuristics in ``eval_no_tools``; models without a card (or with a field left ``None``) keep the heuristic treatment. @@ -131,93 +130,116 @@ class ModelCard: "reasoning tokens on every request." ), ), - # GPT-6.2 Astra. This card is written from OpenAI's documentation, read - # 2026-11-17, the day OpenAI released the model, and from the GPT-6.1 Sol - # and GPT-6.1 Terra cards above. It records no request to the model. + # GPT-6.2 Astra. Written 2026-11-17, the day OpenAI released the model, + # from OpenAI's documentation read that day, and onboarded 2026-11-19: the + # gauntlet and a two-household smoke ran under this card's request fields + # (onboarding changed only this comment, the notes and the expected cost). # Field by field: - # - answer_contract "tool": the GPT-6.1 cards' contract, the board's - # forced answer tool on the Responses API. OpenAI's model page lists - # function calling and structured outputs as supported - # (developers.openai.com/api/docs/models/gpt-6.2-astra), and its API - # changelog says tool calling on the model requires the Responses API - # (developers.openai.com/api/docs/changelog). No page read says whether - # a forced tool_choice works on this model; the onboarding gauntlet's - # tool probes settle that. - # - explanation_chunk_size None: the canonical whole-scenario request - # (chunking is closed to new models). + # - answer_contract "tool": the board's forced answer tool on the + # Responses API, which OpenAI's API changelog says tool calling on the + # model requires (developers.openai.com/api/docs/changelog). The + # gauntlet's tool probes passed, 3/3 (459 completion tokens, 13s) and + # 16/16 whole-scenario (870 tokens, 17s), each response with status + # completed, and the smoke parsed all 36 outputs (16 and 20). + # - explanation_chunk_size None: 16/16 on the canonical whole-scenario + # request (chunking is closed to new models anyway). # - thinking_budget True: OpenAI's reasoning guide lists the model as a # reasoning model, its model page says the API rejects reasoning effort - # "none", and the guide says reasoning tokens are billed as output - # tokens (developers.openai.com/api/docs/guides/reasoning). The card - # therefore takes the thinking class's 16,384-token starting budget and - # 300s timeout, as the GPT-6.1 cards do. The harness sends no reasoning - # parameter. The model page states no default effort, so the onboarding - # probes record whether the model reasons on the board's request. - # - request_timeout_seconds None: the thinking class's 300s. + # "none" and states no default effort, and reasoning tokens are billed + # as output tokens (developers.openai.com/api/docs/guides/reasoning). + # The harness sends no reasoning parameter. Under the forced tool the + # model reasoned on both smoke requests: 212 of 848 completion tokens + # on the first household and 78 of 902 on the second (the gauntlet + # report records no reasoning count). The gauntlet used 3% and 5% of + # the 16,384-token starting budget and the smoke at most 902 tokens + # (6%), with no budget escalation. + # - request_timeout_seconds None: the thinking class's 300s. The probes + # took 13s and 17s and the smoke's households 16s and 15s, far under + # the 150s past which the gauntlet suggests a longer timeout. # - provider_max_completion_tokens None: the model page lists a maximum # output of 128,000 tokens, the harness's escalation ceiling. - # - expected_cost_per_scenario_usd is not set: no per-scenario cost has - # been measured. + # - expected_cost_per_scenario_usd 0.057: the cost `policybench onboard` + # suggested from the whole-scenario probe, rounded to three places, at + # $8/$40 per 1M (its report gives no prompt or cache counts). The + # smoke's two households cost $0.036 and $0.063: 2,104 of the first's + # 2,236 prompt tokens were cache reads, at $0.40 per 1M, and 2,578 of + # the second's 2,710 were cache writes, at $10. + # Both smoke responses name the model as gpt-6.2-astra, the requested + # name, with no dated snapshot (the Responses API's model field, which the + # harness records as provider_resolved_model). "gpt-6.2-astra": ModelCard( litellm_id="gpt-6.2-astra", answer_contract="tool", thinking_budget=True, + expected_cost_per_scenario_usd=0.057, notes=( - "Written 2026-11-17 from OpenAI's documentation, read that day, " - "the day OpenAI released the model; the card records no request " - "to the model. It takes the treatment of the GPT-6.1 Sol and " - "GPT-6.1 Terra cards: the board's forced answer tool on the " - "whole-scenario request, over the Responses API, which OpenAI " - "says tool calling on this model requires. OpenAI lists it as a " - "reasoning model whose API rejects reasoning effort none; the " - "model page states no default effort, and the harness sends no " - "reasoning parameter. The onboarding gauntlet settles whether " - "the forced tool works and what the model's default reasoning " - "costs per scenario." + "Onboarded 2026-11-19; OpenAI released the model on 2026-11-17. " + "Forced tool contract passed 3/3 (459 completion tokens) and 16/16 " + "whole-scenario (870 tokens) on the Responses API, which OpenAI " + "says tool calling on this model requires, about $0.057 per " + "scenario at $8/$40 per 1M. OpenAI lists it as a reasoning model " + "whose API rejects reasoning effort none; the model page states no " + "default effort, and the harness sends no reasoning parameter. A " + "two-household smoke parsed all 36 outputs for $0.10, with no " + "budget escalation and reasoning tokens on both requests (212 and " + "78). The responses name the model as gpt-6.2-astra, with no dated " + "snapshot." ), ), - # GPT-6.2 Sol. Like the Astra card above, this card is written from - # OpenAI's documentation, read 2026-11-17, the day OpenAI released the - # model, and records no request to the model. Field by field: - # - answer_contract "tool": the GPT-6.1 cards' contract, the board's - # forced answer tool on the Responses API. OpenAI's model page gives - # the model the same endpoints as GPT-6.2 Astra - # (developers.openai.com/api/docs/models/gpt-6.2-sol), and its API - # changelog says tool calling on the model requires the Responses API - # (developers.openai.com/api/docs/changelog). No page read says whether - # a forced tool_choice works on this model; the onboarding gauntlet's - # tool probes settle that. - # - explanation_chunk_size None: the canonical whole-scenario request - # (chunking is closed to new models). + # GPT-6.2 Sol. Like the Astra card above, written 2026-11-17 from + # OpenAI's documentation and onboarded 2026-11-19 under this card's + # request fields. Field by field: + # - answer_contract "tool": the board's forced answer tool on the + # Responses API, which OpenAI's API changelog says tool calling on the + # model requires (developers.openai.com/api/docs/changelog). The + # gauntlet's tool probes passed, 3/3 (1,145 completion tokens, 25s) and + # 16/16 whole-scenario (1,339 tokens, 32s), each response with status + # completed, and the smoke parsed all 36 outputs (16 and 20). + # - explanation_chunk_size None: 16/16 on the canonical whole-scenario + # request (chunking is closed to new models anyway). # - thinking_budget True: as on the Astra card, OpenAI lists the model as - # a reasoning model whose API rejects reasoning effort "none", and - # reasoning tokens are billed as output tokens - # (developers.openai.com/api/docs/guides/reasoning), so the card takes - # the thinking class's 16,384-token starting budget and 300s timeout. - # The harness sends no reasoning parameter. The model page states no - # default effort, so the onboarding probes record whether the model - # reasons on the board's request. - # - request_timeout_seconds None: the thinking class's 300s. + # a reasoning model whose API rejects reasoning effort "none", states + # no default effort, and bills reasoning tokens as output tokens + # (developers.openai.com/api/docs/guides/reasoning). The harness sends + # no reasoning parameter. Under the forced tool the model reasoned on + # both smoke requests, more than Astra did: 1,344 of 2,013 completion + # tokens on the first household and 547 of 1,377 on the second (the + # gauntlet report records no reasoning count). The gauntlet used 7% and + # 8% of the 16,384-token starting budget and the smoke at most 2,013 + # tokens (12%), with no budget escalation. + # - request_timeout_seconds None: the thinking class's 300s. The probes + # took 25s and 32s and the smoke's households 43s and 28s, under the + # 150s past which the gauntlet suggests a longer timeout. A first + # gauntlet run the same day stopped on its 3-variable probe after 150s + # with a litellm.Timeout and no response; the gauntlet treated it as an + # environment error, not a serving fact, and derived no card. The rerun + # is the one recorded here. # - provider_max_completion_tokens None: the model page lists a maximum # output of 128,000 tokens, the harness's escalation ceiling. - # - expected_cost_per_scenario_usd is not set: no per-scenario cost has - # been measured. + # - expected_cost_per_scenario_usd 0.019: the cost `policybench onboard` + # suggested from the whole-scenario probe, rounded to three places, at + # $2/$10 per 1M (its report gives no prompt or cache counts). The + # smoke's two households cost $0.021 and $0.020, with the same cache + # reads (2,104 tokens) and writes (2,578) as Astra's. + # Both smoke responses name the model as gpt-6.2-sol, the requested name, + # with no dated snapshot (provider_resolved_model). "gpt-6.2-sol": ModelCard( litellm_id="gpt-6.2-sol", answer_contract="tool", thinking_budget=True, + expected_cost_per_scenario_usd=0.019, notes=( - "Written 2026-11-17 from OpenAI's documentation, read that day, " - "the day OpenAI released the model; the card records no request " - "to the model. It takes the treatment of the GPT-6.1 Sol and " - "GPT-6.1 Terra cards: the board's forced answer tool on the " - "whole-scenario request, over the Responses API, which OpenAI " - "says tool calling on this model requires. OpenAI lists it as a " - "reasoning model whose API rejects reasoning effort none; the " - "model page states no default effort, and the harness sends no " - "reasoning parameter. The onboarding gauntlet settles whether " - "the forced tool works and what the model's default reasoning " - "costs per scenario." + "Onboarded 2026-11-19; OpenAI released the model on 2026-11-17. " + "Forced tool contract passed 3/3 (1,145 completion tokens) and " + "16/16 whole-scenario (1,339 tokens) on the Responses API, which " + "OpenAI says tool calling on this model requires, about $0.019 per " + "scenario at $2/$10 per 1M. OpenAI lists it as a reasoning model " + "whose API rejects reasoning effort none; the model page states no " + "default effort, and the harness sends no reasoning parameter. A " + "two-household smoke parsed all 36 outputs for $0.04, with no " + "budget escalation and reasoning tokens on both requests (1,344 " + "and 547). The responses name the model as gpt-6.2-sol, with no " + "dated snapshot." ), ), "gpt-6-luna": ModelCard( diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 7a6d027e..11f66a30 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3490,6 +3490,11 @@ def test_gpt_6_1_terra_override_reconstructs_token_costs( # input and $60 output per 1M. ("gpt-6.2-astra", 300_000, 0, 0, 0, 4.8), ("gpt-6.2-astra", 300_000, 10_000, 300_000, 0, 0.84), + # The onboarding smoke's two requests (2026-11-19): 2,236 prompt + # tokens, 2,104 of them cached, and 848 completion tokens; then 2,710 + # prompt tokens, 2,578 of them cache writes, and 902 completion tokens. + ("gpt-6.2-astra", 2_236, 848, 2_104, 0, 0.0358176), + ("gpt-6.2-astra", 2_710, 902, 0, 2_578, 0.062916), # GPT-6.2 Sol: $2 / $10 per 1M, $0.10 cached input and $2.50 cache # writes (30-minute retention) up to 272k input tokens. ("gpt-6.2-sol", 200_000, 0, 0, 0, 0.4), @@ -3499,6 +3504,10 @@ def test_gpt_6_1_terra_override_reconstructs_token_costs( # Above 272k input tokens: $4 input, $0.20 cached input and $15 output. ("gpt-6.2-sol", 300_000, 0, 0, 0, 1.2), ("gpt-6.2-sol", 300_000, 10_000, 300_000, 0, 0.21), + # The onboarding smoke's two requests, with Astra's prompt and cache + # counts and 2,013 and 1,377 completion tokens. + ("gpt-6.2-sol", 2_236, 2_013, 2_104, 0, 0.0206044), + ("gpt-6.2-sol", 2_710, 1_377, 0, 2_578, 0.020479), ], ) def test_gpt_6_2_overrides_reconstruct_token_costs( @@ -3542,10 +3551,11 @@ def test_gpt_6_2_overrides_reconstruct_token_costs( def test_gpt_6_2_requests_force_the_answer_tool_and_set_no_reasoning( mini_scenario, model_id ): - """The GPT-6.2 Astra and Sol cards, written before onboarding, take the - GPT-6.1 cards' treatment: the board's forced answer tool on the Responses - API, which OpenAI says tool calling on these models requires, and the - thinking class's 16,384-token starting budget and 300s timeout. The + """The GPT-6.2 Astra and Sol cards, onboarded 2026-11-19, keep the GPT-6.1 + cards' treatment: the board's forced answer tool on the Responses API, + which OpenAI says tool calling on these models requires and on which both + models' gauntlet tool probes passed, 3/3 and 16/16, and the thinking + class's 16,384-token starting budget and 300s timeout. The request carries no reasoning parameter, so each model runs at OpenAI's default effort, which OpenAI's pages do not state. It also leaves out temperature, top_p, logprobs and top_logprobs, which OpenAI's diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index b7245869..8fdc7345 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -173,6 +173,19 @@ def test_gemini_4_carbon_and_hydrogen_cards_record_the_gauntlet_cost( assert card_for(model_id).expected_cost_per_scenario_usd == expected_cost +@pytest.mark.parametrize( + ("model_id", "expected_cost"), + [("gpt-6.2-astra", 0.057), ("gpt-6.2-sol", 0.019)], +) +def test_gpt_6_2_cards_record_the_gauntlet_cost(model_id, expected_cost): + """Each card carries the cost ``policybench onboard`` suggested from its + whole-scenario probe on 2026-11-19, rounded to three places. The gauntlet + report gives completion tokens but no prompt or cache counts, so, unlike + the Gemini 4 cards' test above, this pins the value without rebuilding + it from token counts.""" + assert card_for(model_id).expected_cost_per_scenario_usd == expected_cost + + @pytest.mark.parametrize( ("provider_max", "expected"), [(30_000, 30_000), (200_000, 128_000)] ) From 8fb3a6b8eedb255fe289b5cf316cdfefeb9586de Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 21:47:19 +0000 Subject: [PATCH 04/19] State the GPT-6.2 cards' gauntlet cost basis with its cache writes. The cards gave each expected cost per scenario as "at $8/$40 per 1M" and "at $2/$10 per 1M", but the suggested $0.057 and $0.019 include cache-write pricing. The notes now say "at OpenAI's list rates", with the cache-write rate beside the input and output rates. Each card's comment gives the inferred reconstruction: the whole-scenario probe sends the manifest's first scenario, the smoke's first household, so its request had 2,236 prompt tokens, and it wrote the 2,104 tokens to the cache that the smoke's first household read. With the probe's completion tokens that gives $0.056896 and $0.018914; list input and output rates alone would round to 0.053 and 0.018. The cards' cost test now rebuilds both values from those counts at the price overrides, as the Gemini 4 cards' test does. Sol's comment now says the aborted first gauntlet stopped after 150s on the gauntlet's clock while litellm's error cites the 300s timeout, so the sentence does not read as the model's latency. Both notes now say that both smoke responses name the requested model. No request field changes. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 59 ++++++++++++++++++++++++-------------- tests/test_model_cards.py | 36 ++++++++++++++++++----- 2 files changed, 66 insertions(+), 29 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 2b69395a..8d76d3c7 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -160,7 +160,14 @@ class ModelCard: # output of 128,000 tokens, the harness's escalation ceiling. # - expected_cost_per_scenario_usd 0.057: the cost `policybench onboard` # suggested from the whole-scenario probe, rounded to three places, at - # $8/$40 per 1M (its report gives no prompt or cache counts). The + # OpenAI's list rates ($8/$40 per 1M, cache writes at $10). The + # gauntlet report gives no prompt or cache counts, so these are + # inferred. The probe sends the manifest's first scenario, which the + # smoke sent as its first household, so the two requests match: 2,236 + # prompt tokens. That household read 2,104 of them from the cache, and + # only the gauntlet ran on the model before it. Writing those 2,104 at + # $10 per 1M, with the probe's 870 completion tokens, gives $0.056896; + # list input and output rates alone would round to 0.053. The # smoke's two households cost $0.036 and $0.063: 2,104 of the first's # 2,236 prompt tokens were cache reads, at $0.40 per 1M, and 2,578 of # the second's 2,710 were cache writes, at $10. @@ -177,13 +184,14 @@ class ModelCard: "Forced tool contract passed 3/3 (459 completion tokens) and 16/16 " "whole-scenario (870 tokens) on the Responses API, which OpenAI " "says tool calling on this model requires, about $0.057 per " - "scenario at $8/$40 per 1M. OpenAI lists it as a reasoning model " - "whose API rejects reasoning effort none; the model page states no " - "default effort, and the harness sends no reasoning parameter. A " - "two-household smoke parsed all 36 outputs for $0.10, with no " - "budget escalation and reasoning tokens on both requests (212 and " - "78). The responses name the model as gpt-6.2-astra, with no dated " - "snapshot." + "scenario at OpenAI's list rates ($8/$40 per 1M, cache writes at " + "$10). OpenAI lists it as a reasoning model whose API rejects " + "reasoning effort none; the model page states no default effort, " + "and the harness sends no reasoning parameter. A two-household " + "smoke parsed all 36 outputs for $0.10, with no budget escalation " + "and reasoning tokens on both requests (212 and 78). Both smoke " + "responses name the model as gpt-6.2-astra, the requested name, " + "with no dated snapshot." ), ), # GPT-6.2 Sol. Like the Astra card above, written 2026-11-17 from @@ -210,17 +218,23 @@ class ModelCard: # - request_timeout_seconds None: the thinking class's 300s. The probes # took 25s and 32s and the smoke's households 43s and 28s, under the # 150s past which the gauntlet suggests a longer timeout. A first - # gauntlet run the same day stopped on its 3-variable probe after 150s - # with a litellm.Timeout and no response; the gauntlet treated it as an - # environment error, not a serving fact, and derived no card. The rerun - # is the one recorded here. + # gauntlet run the same day stopped on its 3-variable probe with a + # litellm.Timeout and no response, after 150s on the gauntlet's clock + # (litellm's error cites the 300s timeout); the gauntlet classed it as + # an environment error, not a serving fact, and derived no card. The + # rerun is the one recorded here. # - provider_max_completion_tokens None: the model page lists a maximum # output of 128,000 tokens, the harness's escalation ceiling. # - expected_cost_per_scenario_usd 0.019: the cost `policybench onboard` # suggested from the whole-scenario probe, rounded to three places, at - # $2/$10 per 1M (its report gives no prompt or cache counts). The - # smoke's two households cost $0.021 and $0.020, with the same cache - # reads (2,104 tokens) and writes (2,578) as Astra's. + # OpenAI's list rates ($2/$10 per 1M, cache writes at $2.50). The + # prompt and cache counts are inferred as on the Astra card: 2,236 + # prompt tokens, 2,104 of them written to the cache, which the smoke's + # first household then read. At $2.50 per 1M, with the probe's 1,339 + # completion tokens, that gives $0.018914; list input and output rates + # alone would round to 0.018. The smoke's two households cost $0.021 + # and $0.020, with the same cache reads (2,104 tokens) and writes + # (2,578) as Astra's. # Both smoke responses name the model as gpt-6.2-sol, the requested name, # with no dated snapshot (provider_resolved_model). "gpt-6.2-sol": ModelCard( @@ -233,13 +247,14 @@ class ModelCard: "Forced tool contract passed 3/3 (1,145 completion tokens) and " "16/16 whole-scenario (1,339 tokens) on the Responses API, which " "OpenAI says tool calling on this model requires, about $0.019 per " - "scenario at $2/$10 per 1M. OpenAI lists it as a reasoning model " - "whose API rejects reasoning effort none; the model page states no " - "default effort, and the harness sends no reasoning parameter. A " - "two-household smoke parsed all 36 outputs for $0.04, with no " - "budget escalation and reasoning tokens on both requests (1,344 " - "and 547). The responses name the model as gpt-6.2-sol, with no " - "dated snapshot." + "scenario at OpenAI's list rates ($2/$10 per 1M, cache writes at " + "$2.50). OpenAI lists it as a reasoning model whose API rejects " + "reasoning effort none; the model page states no default effort, " + "and the harness sends no reasoning parameter. A two-household " + "smoke parsed all 36 outputs for $0.04, with no budget escalation " + "and reasoning tokens on both requests (1,344 and 547). Both smoke " + "responses name the model as gpt-6.2-sol, the requested name, with " + "no dated snapshot." ), ), "gpt-6-luna": ModelCard( diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 8fdc7345..8fbf480d 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -174,15 +174,37 @@ def test_gemini_4_carbon_and_hydrogen_cards_record_the_gauntlet_cost( @pytest.mark.parametrize( - ("model_id", "expected_cost"), - [("gpt-6.2-astra", 0.057), ("gpt-6.2-sol", 0.019)], + ("model_id", "completion_tokens", "probe_cost", "expected_cost"), + [ + ("gpt-6.2-astra", 870, 0.056896, 0.057), + ("gpt-6.2-sol", 1_339, 0.018914, 0.019), + ], ) -def test_gpt_6_2_cards_record_the_gauntlet_cost(model_id, expected_cost): +def test_gpt_6_2_cards_record_the_gauntlet_cost( + model_id, completion_tokens, probe_cost, expected_cost +): """Each card carries the cost ``policybench onboard`` suggested from its - whole-scenario probe on 2026-11-19, rounded to three places. The gauntlet - report gives completion tokens but no prompt or cache counts, so, unlike - the Gemini 4 cards' test above, this pins the value without rebuilding - it from token counts.""" + whole-scenario probe on 2026-11-19, rounded to three places, rebuilt + here at the model's price override as in the Gemini 4 cards' test above. + + The gauntlet report gives the probe's completion tokens but no prompt or + cache counts, so those are inferred. The probe sends the manifest's first + scenario, which the smoke sent as its first household: 2,236 prompt + tokens, 2,104 of which that household read from the cache, and only the + gauntlet ran on each model before it. So the probe wrote those 2,104 + tokens to the cache. At list input and output rates alone the probe + would round to 0.053 and 0.018, not the suggested costs. + """ + reconstructed = _reconstruct_token_cost( + model_name=model_id, + model_id=model_id, + prompt_tokens=2_236, + completion_tokens=completion_tokens, + cache_write_prompt_tokens=2_104, + ) + assert reconstructed.is_estimated is False + assert reconstructed.usd == pytest.approx(probe_cost) + assert round(reconstructed.usd, 3) == expected_cost assert card_for(model_id).expected_cost_per_scenario_usd == expected_cost From 77a991b75ae5e34cd021d3885bf5454b81ec0b07 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 22:28:43 +0000 Subject: [PATCH 05/19] Add Gemini 4 Neon's card, list price and release date This adds the serving card, list price and release date for Google's Gemini 4 Neon so the board can run it. No request has reached the model, and this changes no published artifact. - Release: the Gemini API changelog lists gemini-4-neon as generally available on 2026-11-18, on the paid tier, and Google's launch post of that day says it is rolling out that day in the Gemini API (both read 2026-11-19). Route: the first-party Gemini API, gemini/gemini-4-neon, the model page's one stable version with no dated snapshot. - Price: $3 / $15 per 1M input/output tokens (output includes thinking tokens) and $0.15 cached input, Google's paid-tier standard rates, one rate at every prompt length, with no introductory rate, no dated change and no free tier. litellm 1.95.0's bundled map has no gemini-4 id, so the override prices every request, as it does for Gemini 4 Carbon and Hydrogen. - Card: written from Google's documentation and from Gemini 4 Hydrogen's card, whose default thinking level, high, Neon shares. It takes the board's forced answer tool, sends no reasoning parameter, takes the thinking class's 300s timeout and the Gemini family's 16,384-token starting budget, and caps escalation at 65,536 tokens, the Models API's outputTokenLimit and the model page's default synchronous output. It sets no per-scenario cost. The onboarding gauntlet settles the contract, the reasoning, the timeout and the cost. - Module docstring: a card written before its model's onboarding says so in its notes, as Neon's does. - Tests: the card's treatment and escalation ceiling, the override's reconstruction, Neon in the Gemini 4 listed-rate property (renamed to cover three models), the request shape, and the release date. Co-Authored-By: Claude Opus 5.5 --- app/src/modelMeta.ts | 1 + policybench/config.py | 16 ++++++++ policybench/model_cards.py | 70 ++++++++++++++++++++++++++++++- policybench/paper_results.py | 6 +++ tests/test_eval_no_tools.py | 80 +++++++++++++++++++++++++++++++++++- tests/test_model_cards.py | 2 + tests/test_paper_results.py | 7 ++++ 7 files changed, 180 insertions(+), 2 deletions(-) diff --git a/app/src/modelMeta.ts b/app/src/modelMeta.ts index 296f485d..5c1ae2d7 100644 --- a/app/src/modelMeta.ts +++ b/app/src/modelMeta.ts @@ -154,6 +154,7 @@ export const MODEL_RELEASE_DATES: Record = { "gemini-4-argon": "2026-10-13", "gemini-4-carbon": "2026-11-10", "gemini-4-hydrogen": "2026-11-12", + "gemini-4-neon": "2026-11-18", "gemini-3.1-flash-lite-preview": "2026-03-03", "gpt-5.4-mini": "2026-03-17", "gpt-5.4-nano": "2026-03-17", diff --git a/policybench/config.py b/policybench/config.py index 757f9f38..04c06bbf 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -126,6 +126,13 @@ # page's one stable version; Google lists no dated snapshot # (aistudio.google.com/docs/models/gemini-4-hydrogen, read 2026-11-13). "gemini-4-hydrogen": "gemini/gemini-4-hydrogen", + # Gemini 4 Neon. The Gemini API changelog lists gemini-4-neon as + # generally available on 2026-11-18, on the paid tier + # (aistudio.google.com/docs/changelog, read 2026-11-19). It runs on the + # first-party Gemini API like the other Gemini rows. The id is the model + # page's one stable version; Google lists no dated snapshot + # (aistudio.google.com/docs/models/gemini-4-neon, read 2026-11-19). + "gemini-4-neon": "gemini/gemini-4-neon", # Cloaked OpenRouter preview listed 2026-08-20 (free window); Z.ai later # identified it as GLM-5.3-Flash. On the board as a labeled preview row. "ox-alpha": "openrouter/stealth/ox-alpha", @@ -318,6 +325,15 @@ # $1.50 / $7.50; the override prices a request from the rates above # whether or not the map is available. "gemini-4-hydrogen": {"input": 1.5, "output": 7.5, "cache_read": 0.075}, + # gemini-4-neon: $3 / $15 per 1M input/output tokens (output includes + # thinking tokens) and $0.15 cached input, the paid tier's standard + # rates, with no introductory rate and no dated change + # (aistudio.google.com/docs/pricing, read 2026-11-19). The page lists one + # rate at every prompt length, implicit caching only, no cache storage + # charge, and no free tier for this model. litellm 1.95.0's bundled price + # map has no gemini-4 id; the override prices a request from the rates + # above whether or not litellm's map has the id. + "gemini-4-neon": {"input": 3.0, "output": 15.0, "cache_read": 0.15}, # glm-5.3: $1.40 / $4.40 per 1M (OpenRouter list, 2026-09-03). "glm-5.3": {"input": 1.40, "output": 4.40}, # deepseek dated snapshots via OpenRouter (list prices 2026-09-03). diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 8d76d3c7..8fd62b60 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -7,7 +7,8 @@ completion budget. None of this is model *configuration* — every model still runs unconfigured at its provider-default reasoning effort. Cards only encode serving-stack facts discovered during onboarding (see -``policybench onboard``). +``policybench onboard``); a card written before its model's onboarding says +so in its notes. Cards OVERRIDE the family-prefix heuristics in ``eval_no_tools``; models without a card (or with a field left ``None``) keep the heuristic treatment. @@ -961,6 +962,73 @@ class ModelCard: "minutes per request. Google lists $1.50/$7.50 per 1M." ), ), + # Gemini 4 Neon. This card is written from Google's documentation, read + # 2026-11-19, the day after Google released the model, and from the Gemini + # 4 Hydrogen card above, whose default thinking level, high, it shares. It + # records no request to the model. Field by field: + # - answer_contract "tool": Hydrogen's contract, the board's forced answer + # tool, which litellm sends as mode ANY with allowed_function_names. + # Google's model page lists function calling as supported + # (aistudio.google.com/docs/models/gemini-4-neon), and the API + # reference's FunctionCallingConfig describes mode ANY for every model, + # naming no exception (aistudio.google.com/api-reference/caching). No + # page read says whether a forced call works on this model, and Gemini 4 + # Carbon's forced call, accepted by the API, ran out of the 16,384-token + # budget in its gauntlet. The onboarding gauntlet's tool probes settle + # the contract. + # - explanation_chunk_size None: the canonical whole-scenario request + # (chunking is closed to new models). + # - thinking_budget True: the model reasons by default. Google's thinking + # guide lists its default as "On (high)", with levels low, medium, high + # and xhigh, and lists "minimal" as not supported on Gemini 4 models + # (aistudio.google.com/docs/thinking); no page read says thinking can be + # turned off. So the model is in the thinking-default class and takes + # that class's 300s timeout. The 16,384-token starting budget is not + # the card's: the harness gives every gemini/ id 16,384 + # (GEMINI_JSON_MAX_COMPLETION_TOKENS). The harness sends no + # thinkingConfig. Google's pricing page bills thinking tokens as output + # ("Output price (including thinking tokens)", + # aistudio.google.com/docs/pricing). The onboarding probes record + # whether the model reasons on the board's request and how much of the + # budget it uses. + # - request_timeout_seconds None: the thinking class's 300s, as on + # Hydrogen's card before its onboarding. Hydrogen's onboarding set 600s + # from its measured output rate for a request at the same 65,536-token + # ceiling; Neon's probe durations settle its own. + # - provider_max_completion_tokens 65_536: the Models API's + # outputTokenLimit for the model, whose entry lists generateContent + # among its supported methods (models.get on + # generativelanguage.googleapis.com/v1beta/models/gemini-4-neon, read + # 2026-11-19). litellm makes one non-streaming generateContent request. + # Google's model page gives the same 65,536 as the model's "default + # synchronous" maximum output, and up to 1,048,576 with long decode. + # - expected_cost_per_scenario_usd is not set: no per-scenario cost has + # been measured. + "gemini/gemini-4-neon": ModelCard( + litellm_id="gemini/gemini-4-neon", + answer_contract="tool", + thinking_budget=True, + provider_max_completion_tokens=65_536, + notes=( + "Written 2026-11-19 from Google's documentation, read that day, " + "the day after Google released the model; the card records no " + "request to the model. The Gemini API changelog lists " + "gemini-4-neon as generally available on 2026-11-18, on the paid " + "tier; Google's pricing page lists no free tier for it. The card " + "takes Gemini 4 Hydrogen's treatment, the board's forced answer " + "tool on the whole-scenario request; Google's model page lists " + "function calling as supported. The harness sends no " + "thinkingConfig, and Google's thinking guide lists the model's " + "default as On (high), with levels low, medium, high and xhigh, " + "as for Hydrogen. The Models API gives the model an " + "outputTokenLimit of 65,536 and lists generateContent, the method " + "the harness calls once without streaming, among its supported " + "methods; the model page gives the same 65,536 as the default " + "synchronous output. Google lists $3/$15 per 1M. The onboarding " + "gauntlet settles whether the forced tool works and what the " + "model's default reasoning costs per scenario." + ), + ), "openrouter/z-ai/glm-5.3": ModelCard( litellm_id="openrouter/z-ai/glm-5.3", answer_contract="tool", diff --git a/policybench/paper_results.py b/policybench/paper_results.py index 937dffb5..d8dc4add 100644 --- a/policybench/paper_results.py +++ b/policybench/paper_results.py @@ -3637,6 +3637,12 @@ def last_engine_upgrade(self) -> EngineUpgrade: # gemini-models/introducing-gemini-4-hydrogen (2026-11-12: "Starting # today" in the Gemini API and the Gemini app), both read 2026-11-13. "gemini-4-hydrogen": "2026-11-12", + # aistudio.google.com/docs/changelog ("November 18, 2026": Gemini 4 Neon, + # gemini-4-neon, generally available, on the paid tier) and blog.google/ + # innovation-and-ai/models-and-research/gemini-models/ + # introducing-gemini-4-neon (2026-11-18: "rolling out today in the Gemini + # API in Google AI Studio"), both read 2026-11-19. + "gemini-4-neon": "2026-11-18", # blog.google gemini-3-1-flash-lite; siliconangle.com 2026-03-03 "gemini-3.1-flash-lite-preview": "2026-03-03", # openai.com/index/introducing-gpt-5-4-mini-and-nano; 9to5mac 2026-03-17 diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 11f66a30..f14660a2 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3373,6 +3373,45 @@ def test_gemini_4_hydrogen_override_reconstructs_token_costs( assert reconstructed.is_estimated is False +def test_gemini_4_neon_runs_first_party_at_googles_list_rate(): + """Gemini 4 Neon runs on the first-party Gemini API, like the other + Gemini rows, at the paid-tier rate on Google's pricing page: $3 / $15 per + 1M input/output tokens (output includes thinking tokens) and $0.15 + cached input, at every prompt length, with no introductory rate and no + dated change. The page lists no free tier for the model.""" + assert MODELS["gemini-4-neon"] == "gemini/gemini-4-neon" + assert PRICE_OVERRIDES_PER_1M["gemini-4-neon"] == { + "input": 3.0, + "output": 15.0, + "cache_read": 0.15, + } + + +@pytest.mark.parametrize( + ("prompt_tokens", "completion_tokens", "cached_prompt_tokens", "expected"), + [ + (1_000_000, 0, 0, 3.0), + (0, 1_000_000, 0, 15.0), + (1_000_000, 1_000_000, 0, 18.0), + (1_000_000, 0, 1_000_000, 0.15), + (1_000_000, 0, 250_000, 2.2875), + ], +) +def test_gemini_4_neon_override_reconstructs_token_costs( + prompt_tokens, completion_tokens, cached_prompt_tokens, expected +): + reconstructed = _reconstruct_token_cost( + model_name="gemini-4-neon", + model_id="gemini/gemini-4-neon", + prompt_tokens=prompt_tokens, + completion_tokens=completion_tokens, + cached_prompt_tokens=cached_prompt_tokens, + ) + + assert reconstructed.usd == pytest.approx(expected) + assert reconstructed.is_estimated is False + + # Google's listed per-1M rates (input, cached input, output; Carbon's are the # rates the page lists through 2026-11-30), written out here and not read from # PRICE_OVERRIDES_PER_1M, so the property below checks the override against @@ -3380,6 +3419,7 @@ def test_gemini_4_hydrogen_override_reconstructs_token_costs( GEMINI_4_LISTED_RATES_PER_1M = { "gemini-4-carbon": (2.0, 0.10, 10.0), "gemini-4-hydrogen": (1.5, 0.075, 7.5), + "gemini-4-neon": (3.0, 0.15, 15.0), } @@ -3389,7 +3429,7 @@ def test_gemini_4_hydrogen_override_reconstructs_token_costs( completion_tokens=st.integers(min_value=0, max_value=131_072), cached_share=st.floats(min_value=0.0, max_value=1.0), ) -def test_gemini_4_carbon_and_hydrogen_costs_are_linear_and_bounded_by_the_cache_rate( +def test_gemini_4_listed_rate_costs_are_linear_and_bounded_by_the_cache_rate( model, prompt_tokens, completion_tokens, cached_share ): """Invariants of each override's reconstruction: the cost is the sum of @@ -3809,6 +3849,44 @@ def test_gemini_4_hydrogen_request_forces_the_answer_tool_and_sets_no_reasoning( assert reasoning_key not in kwargs +def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( + mini_scenario, +): + """Gemini 4 Neon's card, written before the model's onboarding, takes + Gemini 4 Hydrogen's contract, the board's forced answer tool; Google's + model page lists function calling as supported, and the onboarding + gauntlet's tool probes settle whether the contract stays. The request + carries no reasoning parameter, so the model reasons at Google's + default, high per Google's thinking guide, as Hydrogen does. It takes + the thinking-default class's 300s timeout and the Gemini family's + 16,384-token starting budget.""" + from policybench.eval_no_tools import ( + ANSWER_FUNCTION_NAME, + _answer_contract_for_model, + _chat_completion_request_kwargs, + ) + + model_id = "gemini/gemini-4-neon" + assert _answer_contract_for_model(model_id, env={}) == "tool" + assert _thinking_configuration(model_id) == {"mode": "provider_default"} + assert _request_timeout_seconds(model_id) == 300 + + _, kwargs = _chat_completion_request_kwargs(mini_scenario, ["income_tax"], model_id) + + assert kwargs["tool_choice"] == { + "type": "function", + "function": {"name": ANSWER_FUNCTION_NAME}, + } + assert [tool["function"]["name"] for tool in kwargs["tools"]] == [ + ANSWER_FUNCTION_NAME + ] + assert kwargs["max_completion_tokens"] == 16_384 + assert kwargs["timeout"] == 300 + assert "response_format" not in kwargs + for reasoning_key in ("reasoning", "reasoning_effort", "thinking"): + assert reasoning_key not in kwargs + + def test_claude_haiku_5_5_reasons_by_default_but_not_under_the_forced_tool(): """Haiku 5.5 thinks when the request omits the thinking parameter, so it is a thinking-default Claude: provider-default thinking, the thinking diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 8fbf480d..ae7c3d74 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -83,6 +83,7 @@ "gemini/gemini-4-argon": ("tool", None, 300, 16_384), "gemini/gemini-4-carbon": ("json", None, 900, 16_384), "gemini/gemini-4-hydrogen": ("tool", None, 600, 16_384), + "gemini/gemini-4-neon": ("tool", None, 300, 16_384), } @@ -248,6 +249,7 @@ def test_provider_max_clamps_initial_completion_budget(monkeypatch): ("gemini/gemini-4-argon", 32_768), ("gemini/gemini-4-carbon", 32_768), ("gemini/gemini-4-hydrogen", 65_536), + ("gemini/gemini-4-neon", 65_536), ], ) def test_roster_model_provider_maximums_limit_escalation(model_id, expected): diff --git a/tests/test_paper_results.py b/tests/test_paper_results.py index c6480a80..99660c21 100644 --- a/tests/test_paper_results.py +++ b/tests/test_paper_results.py @@ -128,6 +128,13 @@ def test_gemini_4_hydrogen_release_date_is_recorded(): assert MODEL_RELEASE_DATES["gemini-4-hydrogen"] == "2026-11-12" +def test_gemini_4_neon_release_date_is_recorded(): + """The Gemini API changelog lists Gemini 4 Neon as generally available on + 2026-11-18, on the paid tier, and Google's launch post, dated the same + day, says the model is rolling out that day in the Gemini API.""" + assert MODEL_RELEASE_DATES["gemini-4-neon"] == "2026-11-18" + + def test_gpt_6_1_terra_release_date_is_its_announcement_day(): """OpenAI announced GPT-6.1 Terra on 2026-10-26 and opened it in ChatGPT (Plus, Pro, Business, Enterprise and Edu), Codex and the API (id From 0eb7b238c5a6bf3d7caf57fde79397dafe3a0026 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 22:43:23 +0000 Subject: [PATCH 06/19] Say what Google's pricing page lists for Gemini 4 Neon, and name Hydrogen's contract. The price comment said the page lists no cache storage charge; the page states no storage or write price at all, so the comment now says only what it lists. The card's notes said Neon takes Hydrogen's treatment, which would include Hydrogen's 600s timeout; they now say Hydrogen's contract, as the card's comment and the request test do. Co-Authored-By: Claude Fable 5.2 --- policybench/config.py | 8 ++++---- policybench/model_cards.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/policybench/config.py b/policybench/config.py index 04c06bbf..6491fb74 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -329,10 +329,10 @@ # thinking tokens) and $0.15 cached input, the paid tier's standard # rates, with no introductory rate and no dated change # (aistudio.google.com/docs/pricing, read 2026-11-19). The page lists one - # rate at every prompt length, implicit caching only, no cache storage - # charge, and no free tier for this model. litellm 1.95.0's bundled price - # map has no gemini-4 id; the override prices a request from the rates - # above whether or not litellm's map has the id. + # rate at every prompt length, implicit caching only, and no free tier + # for this model. litellm 1.95.0's bundled price map has no gemini-4 id; + # the override prices a request from the rates above whether or not + # litellm's map has the id. "gemini-4-neon": {"input": 3.0, "output": 15.0, "cache_read": 0.15}, # glm-5.3: $1.40 / $4.40 per 1M (OpenRouter list, 2026-09-03). "glm-5.3": {"input": 1.40, "output": 4.40}, diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 8fd62b60..10f0911d 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -1015,7 +1015,7 @@ class ModelCard: "request to the model. The Gemini API changelog lists " "gemini-4-neon as generally available on 2026-11-18, on the paid " "tier; Google's pricing page lists no free tier for it. The card " - "takes Gemini 4 Hydrogen's treatment, the board's forced answer " + "takes Gemini 4 Hydrogen's contract, the board's forced answer " "tool on the whole-scenario request; Google's model page lists " "function calling as supported. The harness sends no " "thinkingConfig, and Google's thinking guide lists the model's " From 3036f870c853abe6d0a6caecf292a179ce4d37b7 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 23:02:00 +0000 Subject: [PATCH 07/19] Record Gemini 4 Neon's gauntlet on its card and set its timeout from the measured output rate. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 138 +++++++++++++++++++++++++++--------- tests/test_eval_no_tools.py | 19 ++--- tests/test_model_cards.py | 2 +- 3 files changed, 116 insertions(+), 43 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 10f0911d..3d9979bb 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -962,71 +962,141 @@ class ModelCard: "minutes per request. Google lists $1.50/$7.50 per 1M." ), ), - # Gemini 4 Neon. This card is written from Google's documentation, read + # Gemini 4 Neon. This card was written from Google's documentation, read # 2026-11-19, the day after Google released the model, and from the Gemini - # 4 Hydrogen card above, whose default thinking level, high, it shares. It - # records no request to the model. Field by field: + # 4 Hydrogen card above, whose default thinking level, high, it shares. + # The same day the onboarding gauntlet ran under this card's request + # fields, and two raw generateContent calls with no tools asked the model + # one plain tax question; the two-household smoke has not run yet. Field + # by field: # - answer_contract "tool": Hydrogen's contract, the board's forced answer # tool, which litellm sends as mode ANY with allowed_function_names. # Google's model page lists function calling as supported # (aistudio.google.com/docs/models/gemini-4-neon), and the API # reference's FunctionCallingConfig describes mode ANY for every model, - # naming no exception (aistudio.google.com/api-reference/caching). No - # page read says whether a forced call works on this model, and Gemini 4 - # Carbon's forced call, accepted by the API, ran out of the 16,384-token - # budget in its gauntlet. The onboarding gauntlet's tool probes settle - # the contract. + # naming no exception (aistudio.google.com/api-reference/caching). The + # gauntlet settled nothing between the contracts. The API accepted the + # forced call, but on the 3-variable tool probe the model reasoned until + # the 16,384-token budget ran out: 16,384 completion tokens, 16,381 of + # them reasoning, finish=length, 0 of 3 outputs parsed, 127s. The + # 3-variable JSON probe ended the same way: 16,384 and 16,381, + # finish=length, 0 of 3, 129s. The gauntlet sends each probe once at + # that budget, with no budget escalation, so it found neither contract + # answering, did not reach its whole-scenario probe and derived no card. + # Gemini 4 Carbon's card took JSON because its JSON probes passed after + # its tool probe ran out of budget; here both ran out, so the card keeps + # the tool contract. The board's request escalates a length finish to + # 32,768 and then 65,536 tokens, and a two-household smoke on that + # request settles whether the contract stays. # - explanation_chunk_size None: the canonical whole-scenario request # (chunking is closed to new models). # - thinking_budget True: the model reasons by default. Google's thinking # guide lists its default as "On (high)", with levels low, medium, high # and xhigh, and lists "minimal" as not supported on Gemini 4 models # (aistudio.google.com/docs/thinking); no page read says thinking can be - # turned off. So the model is in the thinking-default class and takes - # that class's 300s timeout. The 16,384-token starting budget is not - # the card's: the harness gives every gemini/ id 16,384 + # turned off. The 16,384-token starting budget is not the card's: the + # harness gives every gemini/ id 16,384 # (GEMINI_JSON_MAX_COMPLETION_TOKENS). The harness sends no # thinkingConfig. Google's pricing page bills thinking tokens as output # ("Output price (including thinking tokens)", - # aistudio.google.com/docs/pricing). The onboarding probes record - # whether the model reasons on the board's request and how much of the - # budget it uses. - # - request_timeout_seconds None: the thinking class's 300s, as on - # Hydrogen's card before its onboarding. Hydrogen's onboarding set 600s - # from its measured output rate for a request at the same 65,536-token - # ceiling; Neon's probe durations settle its own. + # aistudio.google.com/docs/pricing). The model reasoned on every call in + # the record. The harness recorded 16,381 reasoning tokens on each + # gauntlet probe, inside 16,384 completion tokens (the other 3 text), + # so litellm 1.95.0 counts reasoning inside completion_tokens and the + # output rate prices it. The two raw calls, one direct REST + # generateContent request each with no tools, asked what a single filer + # with wages and interest owes in federal income tax, and generateContent + # reported usageMetadata.thoughtsTokenCount on both: 7,575 of 7,930 + # output tokens with no thinkingConfig (the default, high), and 1,370 of + # 1,720 with thinkingLevel low. These are facts about the model; the + # board sends no thinkingConfig, so low is not a treatment it uses. + # - request_timeout_seconds 600, set from the measured output rate as on + # Hydrogen's card. The gauntlet's probes ran at about 129 and 127 + # completion tokens a second (16,384 tokens in 127s and 129s), and the + # raw call at the default level at about 138 (7,930 output tokens in + # 57s). At those rates a request at the 32,768-token first escalation + # takes about 237 to 258s, inside the thinking class's 300s, and a + # request at the 65,536-token ceiling about 475 to 516s, past it. The raw + # call at level low, a short one (1,720 output tokens in 16s), averaged + # about 105 a second, where the call's fixed time weighs more; at that + # rate a request at the ceiling would take about 624s. Google's + # generateContent long-decode guide, read 2026-11-14 for the Carbon and + # Hydrogen cards above and not re-read for this one, says the server + # closes a non-streaming connection after 10 minutes and recommends a + # 20-minute client read timeout, and its option table gives 20 minutes + # per request (aistudio.google.com/docs/long-decode?generate-content=true). + # If the server closes at 10 minutes, a client timeout above 600s could + # not help this request, which litellm sends once without streaming. If + # the table's 20 minutes applies instead, 600s still exceeds the about + # 475 to 516s that the long calls' rates predict for a request at the + # ceiling. No page read recommends a longer client timeout for this + # model, as Google's Gemini 4 Carbon guide does for Carbon (hence + # Carbon's 900s). The margin is smaller than Hydrogen's: a request at + # the ceiling outlasts 600s at any rate below about 109 completion + # tokens a second. # - provider_max_completion_tokens 65_536: the Models API's # outputTokenLimit for the model, whose entry lists generateContent # among its supported methods (models.get on # generativelanguage.googleapis.com/v1beta/models/gemini-4-neon, read # 2026-11-19). litellm makes one non-streaming generateContent request. # Google's model page gives the same 65,536 as the model's "default - # synchronous" maximum output, and up to 1,048,576 with long decode. - # - expected_cost_per_scenario_usd is not set: no per-scenario cost has - # been measured. + # synchronous" maximum output, and up to 1,048,576 with long decode. The + # raw call at the default level asked for maxOutputTokens 65,536 on one + # non-streaming generateContent request and returned 200 (it stopped at + # 7,930 output tokens), which shows only that the value is accepted. + # - expected_cost_per_scenario_usd is not set: the gauntlet did not reach + # its whole-scenario probe and derived no cost. The smoke records what + # a scenario costs on the board's request. + # Both raw responses name the model as gemini-4-neon, the requested name, + # with no dated snapshot (modelVersion). The gauntlet's rows carry the + # same name, but litellm sets it from the request on this path, so they + # cannot show a re-route. "gemini/gemini-4-neon": ModelCard( litellm_id="gemini/gemini-4-neon", answer_contract="tool", + request_timeout_seconds=600, thinking_budget=True, provider_max_completion_tokens=65_536, notes=( "Written 2026-11-19 from Google's documentation, read that day, " - "the day after Google released the model; the card records no " - "request to the model. The Gemini API changelog lists " - "gemini-4-neon as generally available on 2026-11-18, on the paid " - "tier; Google's pricing page lists no free tier for it. The card " - "takes Gemini 4 Hydrogen's contract, the board's forced answer " - "tool on the whole-scenario request; Google's model page lists " - "function calling as supported. The harness sends no " - "thinkingConfig, and Google's thinking guide lists the model's " - "default as On (high), with levels low, medium, high and xhigh, " - "as for Hydrogen. The Models API gives the model an " + "the day after Google released the model. The Gemini API " + "changelog lists gemini-4-neon as generally available on " + "2026-11-18, on the paid tier; Google's pricing page lists no " + "free tier for it. The card takes Gemini 4 Hydrogen's contract, " + "the board's forced answer tool on the whole-scenario request; " + "Google's model page lists function calling as supported. The " + "harness sends no thinkingConfig, and Google's thinking guide " + "lists the model's default as On (high), with levels low, medium, " + "high and xhigh, as for Hydrogen. The same day the onboarding " + "gauntlet ran under this card's request fields. The Gemini API " + "accepted the forced call, but on the 3-variable tool probe the " + "model reasoned until the 16,384-token budget ran out (16,381 " + "reasoning tokens, finish=length, 0 of 3 outputs parsed, 127s), " + "and the 3-variable JSON probe ended the same way (16,381 " + "reasoning tokens, 0 of 3, 129s). The gauntlet sends each probe " + "once at that budget, with no budget escalation, so it found " + "neither contract answering and derived no card. Both contracts " + "failed the same way, so the row keeps the tool contract. Two raw " + "generateContent calls with one plain tax question and no tools " + "returned thought tokens (usageMetadata.thoughtsTokenCount): " + "7,575 of 7,930 output tokens with no thinkingConfig, and 1,370 " + "of 1,720 at thinking level low, which the board does not send. " + "Both name the model as gemini-4-neon, the requested name, with " + "no dated snapshot. The Models API gives the model an " "outputTokenLimit of 65,536 and lists generateContent, the method " "the harness calls once without streaming, among its supported " "methods; the model page gives the same 65,536 as the default " - "synchronous output. Google lists $3/$15 per 1M. The onboarding " - "gauntlet settles whether the forced tool works and what the " - "model's default reasoning costs per scenario." + "synchronous output. The gauntlet's probes and the raw call at " + "the default level ran at about 127 to 138 completion tokens a " + "second, so a request at that 65,536-token ceiling takes about " + "475 to 516s, and the card sets a 600s timeout, as Hydrogen's " + "does. Google's generateContent long-decode guide says the server " + "closes a non-streaming call after 10 minutes. The same guide " + "recommends a 20-minute client read timeout, and its option table " + "gives 20 minutes per request. The board's request escalates a " + "length finish to 32,768 and then 65,536 tokens; a two-household " + "smoke on that request settles whether the contract stays and " + "what a scenario costs. Google lists $3/$15 per 1M." ), ), "openrouter/z-ai/glm-5.3": ModelCard( diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index f14660a2..3abfdee9 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3854,12 +3854,15 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( ): """Gemini 4 Neon's card, written before the model's onboarding, takes Gemini 4 Hydrogen's contract, the board's forced answer tool; Google's - model page lists function calling as supported, and the onboarding - gauntlet's tool probes settle whether the contract stays. The request - carries no reasoning parameter, so the model reasons at Google's - default, high per Google's thinking guide, as Hydrogen does. It takes - the thinking-default class's 300s timeout and the Gemini family's - 16,384-token starting budget.""" + model page lists function calling as supported. The onboarding + gauntlet's 3-variable tool and JSON probes both ran out of the + 16,384-token budget, so they settled nothing between the contracts; a + two-household smoke on the board's escalating request settles whether + the contract stays. The request carries no reasoning parameter, so the + model reasons at Google's default, high per Google's thinking guide, as + Hydrogen does. It takes the card's 600s timeout, set from the probes' + output rate for a request at the 65,536-token ceiling, and the Gemini + family's 16,384-token starting budget.""" from policybench.eval_no_tools import ( ANSWER_FUNCTION_NAME, _answer_contract_for_model, @@ -3869,7 +3872,7 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( model_id = "gemini/gemini-4-neon" assert _answer_contract_for_model(model_id, env={}) == "tool" assert _thinking_configuration(model_id) == {"mode": "provider_default"} - assert _request_timeout_seconds(model_id) == 300 + assert _request_timeout_seconds(model_id) == 600 _, kwargs = _chat_completion_request_kwargs(mini_scenario, ["income_tax"], model_id) @@ -3881,7 +3884,7 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( ANSWER_FUNCTION_NAME ] assert kwargs["max_completion_tokens"] == 16_384 - assert kwargs["timeout"] == 300 + assert kwargs["timeout"] == 600 assert "response_format" not in kwargs for reasoning_key in ("reasoning", "reasoning_effort", "thinking"): assert reasoning_key not in kwargs diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index ae7c3d74..ffa3287d 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -83,7 +83,7 @@ "gemini/gemini-4-argon": ("tool", None, 300, 16_384), "gemini/gemini-4-carbon": ("json", None, 900, 16_384), "gemini/gemini-4-hydrogen": ("tool", None, 600, 16_384), - "gemini/gemini-4-neon": ("tool", None, 300, 16_384), + "gemini/gemini-4-neon": ("tool", None, 600, 16_384), } From 9040f447184fbb8ad00b795674146a5e7779c89d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 23:04:55 +0000 Subject: [PATCH 08/19] Say Gemini 4 Neon's gauntlet ran under the card's earlier 300s timeout. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 3d9979bb..9cc37f08 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -965,10 +965,10 @@ class ModelCard: # Gemini 4 Neon. This card was written from Google's documentation, read # 2026-11-19, the day after Google released the model, and from the Gemini # 4 Hydrogen card above, whose default thinking level, high, it shares. - # The same day the onboarding gauntlet ran under this card's request - # fields, and two raw generateContent calls with no tools asked the model - # one plain tax question; the two-household smoke has not run yet. Field - # by field: + # The same day the onboarding gauntlet ran under this card, then with the + # thinking class's 300s timeout, and two raw generateContent calls with no + # tools asked the model one plain tax question; the two-household smoke + # has not run yet. Field by field: # - answer_contract "tool": Hydrogen's contract, the board's forced answer # tool, which litellm sends as mode ANY with allowed_function_names. # Google's model page lists function calling as supported @@ -1068,11 +1068,11 @@ class ModelCard: "harness sends no thinkingConfig, and Google's thinking guide " "lists the model's default as On (high), with levels low, medium, " "high and xhigh, as for Hydrogen. The same day the onboarding " - "gauntlet ran under this card's request fields. The Gemini API " - "accepted the forced call, but on the 3-variable tool probe the " - "model reasoned until the 16,384-token budget ran out (16,381 " - "reasoning tokens, finish=length, 0 of 3 outputs parsed, 127s), " - "and the 3-variable JSON probe ended the same way (16,381 " + "gauntlet ran under this card, then with a 300s timeout. The " + "Gemini API accepted the forced call, but on the 3-variable tool " + "probe the model reasoned until the 16,384-token budget ran out " + "(16,381 reasoning tokens, finish=length, 0 of 3 outputs parsed, " + "127s), and the 3-variable JSON probe ended the same way (16,381 " "reasoning tokens, 0 of 3, 129s). The gauntlet sends each probe " "once at that budget, with no budget escalation, so it found " "neither contract answering and derived no card. Both contracts " From 515c2f8d4da865ba9cd1aa45caabec8c290434c3 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 19 Nov 2026 23:21:43 +0000 Subject: [PATCH 09/19] Say where Gemini 4 Neon's 600s timeout departs from Hydrogen's test and correct the card's raw-probe wording. The card now says its 475 to 516s is a constant-rate prediction from calls of at most 16,384 tokens, that the record's slowest rate (the short raw call at level low) predicts about 624s and why the card sets that call aside, and that no page read for Neon gives a model-specific timeout. It names the gauntlet's not-scorable verdict at its fixed budget, describes the raw question as tax before refundable credits, gives the raw calls' thought and answer tokens separately, and says litellm sends one non-streaming request with no long-decode continuation. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 128 ++++++++++++++++++++++--------------- 1 file changed, 76 insertions(+), 52 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 9cc37f08..0428397d 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -982,12 +982,14 @@ class ModelCard: # 3-variable JSON probe ended the same way: 16,384 and 16,381, # finish=length, 0 of 3, 129s. The gauntlet sends each probe once at # that budget, with no budget escalation, so it found neither contract - # answering, did not reach its whole-scenario probe and derived no card. - # Gemini 4 Carbon's card took JSON because its JSON probes passed after - # its tool probe ran out of budget; here both ran out, so the card keeps - # the tool contract. The board's request escalates a length finish to - # 32,768 and then 65,536 tokens, and a two-household smoke on that - # request settles whether the contract stays. + # answering, reported the model "not scorable" at that budget, did not + # reach its whole-scenario probe and derived no card. Gemini 4 Carbon's + # card took JSON because its JSON probes passed after its tool probe ran + # out of budget; here both ran out, so the card keeps the tool contract. + # The board's request escalates a length finish to 32,768 and then + # 65,536 tokens, and a two-household smoke on that request settles + # whether the model answers within that ceiling and whether the contract + # stays. # - explanation_chunk_size None: the canonical whole-scenario request # (chunking is closed to new models). # - thinking_budget True: the model reasons by default. Google's thinking @@ -1004,36 +1006,45 @@ class ModelCard: # gauntlet probe, inside 16,384 completion tokens (the other 3 text), # so litellm 1.95.0 counts reasoning inside completion_tokens and the # output rate prices it. The two raw calls, one direct REST - # generateContent request each with no tools, asked what a single filer - # with wages and interest owes in federal income tax, and generateContent - # reported usageMetadata.thoughtsTokenCount on both: 7,575 of 7,930 - # output tokens with no thinkingConfig (the default, high), and 1,370 of - # 1,720 with thinkingLevel low. These are facts about the model; the - # board sends no thinkingConfig, so low is not a treatment it uses. + # generateContent request each with no tools, asked for a single filer's + # federal income tax before refundable credits, and generateContent + # reported usageMetadata.thoughtsTokenCount on both: 7,575 thought + # tokens and 355 answer tokens (candidatesTokenCount) with no + # thinkingConfig (the default, high), and 1,370 and 350 with + # thinkingLevel low. These are facts about the model; the board sends + # no thinkingConfig, so low is not a treatment it uses. # - request_timeout_seconds 600, set from the measured output rate as on # Hydrogen's card. The gauntlet's probes ran at about 129 and 127 # completion tokens a second (16,384 tokens in 127s and 129s), and the - # raw call at the default level at about 138 (7,930 output tokens in - # 57s). At those rates a request at the 32,768-token first escalation - # takes about 237 to 258s, inside the thinking class's 300s, and a - # request at the 65,536-token ceiling about 475 to 516s, past it. The raw - # call at level low, a short one (1,720 output tokens in 16s), averaged - # about 105 a second, where the call's fixed time weighs more; at that - # rate a request at the ceiling would take about 624s. Google's - # generateContent long-decode guide, read 2026-11-14 for the Carbon and - # Hydrogen cards above and not re-read for this one, says the server - # closes a non-streaming connection after 10 minutes and recommends a - # 20-minute client read timeout, and its option table gives 20 minutes - # per request (aistudio.google.com/docs/long-decode?generate-content=true). + # raw call at the default level at about 138 (7,930 thought and answer + # tokens in 57s). At those rates a request at the 32,768-token first + # escalation takes about 237 to 258s, inside the thinking class's 300s, + # and a request at the 65,536-token ceiling about 475 to 516s, past it. + # That is a constant-rate prediction from calls of at most 16,384 + # tokens, and the average rate was lower on the longer calls (about 138 + # on the raw call's 7,930 tokens, 127 to 129 on the gauntlet's 16,384), + # so a request at the ceiling may run slower; the smoke's requests at + # the ceiling check it. Google's generateContent long-decode guide, read + # 2026-11-14 for the Carbon and Hydrogen cards above and not re-read for + # this one, says the server closes a non-streaming connection after 10 + # minutes and recommends a 20-minute client read timeout, and its option + # table gives 20 minutes per request + # (aistudio.google.com/docs/long-decode?generate-content=true). # If the server closes at 10 minutes, a client timeout above 600s could - # not help this request, which litellm sends once without streaming. If - # the table's 20 minutes applies instead, 600s still exceeds the about - # 475 to 516s that the long calls' rates predict for a request at the - # ceiling. No page read recommends a longer client timeout for this - # model, as Google's Gemini 4 Carbon guide does for Carbon (hence - # Carbon's 900s). The margin is smaller than Hydrogen's: a request at - # the ceiling outlasts 600s at any rate below about 109 completion - # tokens a second. + # not help this request, which litellm sends as one non-streaming + # request, with no long-decode continuation. If the table's 20 minutes + # applies instead, 600s still exceeds the about 475 to 516s that those + # rates predict for a request at the ceiling. This departs from + # Hydrogen's test, under which 600s exceeds what the slowest rates in + # its record predict: the slowest rate here, the raw call at level low + # (1,720 thought and answer tokens in 16s, about 105 a second), predicts + # about 624s at the ceiling. The card sets that call aside: it is short, + # so the call's fixed time weighs more in its average, and it ran at a + # thinking level the board does not send. No page read for Neon gives a + # model-specific client timeout, as Google's Gemini 4 Carbon guide does + # for Carbon (hence Carbon's 900s). The margin is smaller than + # Hydrogen's: a request at the ceiling outlasts 600s at any rate below + # about 109 completion tokens a second. # - provider_max_completion_tokens 65_536: the Models API's # outputTokenLimit for the model, whose entry lists generateContent # among its supported methods (models.get on @@ -1043,7 +1054,8 @@ class ModelCard: # synchronous" maximum output, and up to 1,048,576 with long decode. The # raw call at the default level asked for maxOutputTokens 65,536 on one # non-streaming generateContent request and returned 200 (it stopped at - # 7,930 output tokens), which shows only that the value is accepted. + # 7,930 thought and answer tokens), which shows only that the value is + # accepted. # - expected_cost_per_scenario_usd is not set: the gauntlet did not reach # its whole-scenario probe and derived no cost. The smoke records what # a scenario costs on the board's request. @@ -1075,28 +1087,40 @@ class ModelCard: "127s), and the 3-variable JSON probe ended the same way (16,381 " "reasoning tokens, 0 of 3, 129s). The gauntlet sends each probe " "once at that budget, with no budget escalation, so it found " - "neither contract answering and derived no card. Both contracts " - "failed the same way, so the row keeps the tool contract. Two raw " - "generateContent calls with one plain tax question and no tools " - "returned thought tokens (usageMetadata.thoughtsTokenCount): " - "7,575 of 7,930 output tokens with no thinkingConfig, and 1,370 " - "of 1,720 at thinking level low, which the board does not send. " + "neither contract answering, reported the model not scorable at " + "that budget and derived no card. Both contracts failed the same " + "way, so the row keeps the tool contract. Two raw generateContent " + "calls with one plain tax question and no tools returned thought " + "tokens (usageMetadata.thoughtsTokenCount): 7,575 thought tokens " + "and 355 answer tokens with no thinkingConfig, and 1,370 and 350 " + "at thinking level low, which the board does not send. " "Both name the model as gemini-4-neon, the requested name, with " "no dated snapshot. The Models API gives the model an " "outputTokenLimit of 65,536 and lists generateContent, the method " - "the harness calls once without streaming, among its supported " - "methods; the model page gives the same 65,536 as the default " - "synchronous output. The gauntlet's probes and the raw call at " - "the default level ran at about 127 to 138 completion tokens a " - "second, so a request at that 65,536-token ceiling takes about " - "475 to 516s, and the card sets a 600s timeout, as Hydrogen's " - "does. Google's generateContent long-decode guide says the server " - "closes a non-streaming call after 10 minutes. The same guide " - "recommends a 20-minute client read timeout, and its option table " - "gives 20 minutes per request. The board's request escalates a " - "length finish to 32,768 and then 65,536 tokens; a two-household " - "smoke on that request settles whether the contract stays and " - "what a scenario costs. Google lists $3/$15 per 1M." + "the harness calls with one non-streaming request, among its " + "supported methods; the model page gives the same 65,536 as the " + "default synchronous output. The gauntlet's probes and the raw " + "call at the default level ran at about 127 to 138 completion " + "tokens a second, so a request at that 65,536-token ceiling would " + "take about 475 to 516s at those rates (a request slower than " + "about 109 tokens a second outlasts 600s), and the card sets a " + "600s timeout, as Hydrogen's does. That is a constant-rate " + "prediction from calls of at most 16,384 tokens, and the rate was " + "lower on the longer calls. The raw call at level low, a short " + "one, averaged about 105 a second, which predicts about 624s at " + "the ceiling; Hydrogen's 600s exceeds what the slowest rates in " + "its record predict, but this card sets that call aside, since " + "its fixed time weighs more and the board does not send its " + "thinking level. Google's generateContent long-decode guide (read " + "2026-11-14 for the Carbon and Hydrogen cards, not re-read for " + "Neon) says the server closes a non-streaming call after 10 " + "minutes. The same guide recommends a 20-minute client read " + "timeout, and its option table gives 20 minutes per request. The " + "board's request escalates a length finish to 32,768 and then " + "65,536 tokens; a two-household smoke on that request settles " + "whether the model answers within that ceiling, whether the " + "contract stays and what a scenario costs, and its requests at " + "the ceiling check the predicted time. Google lists $3/$15 per 1M." ), ), "openrouter/z-ai/glm-5.3": ModelCard( From 87f699342e902dc8ba29f4a0f353c3d9948239b9 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 08:06:32 +0000 Subject: [PATCH 10/19] State GPT-6.2's long-context cache-write rates and give the probe's cache writes as assumed usage. OpenAI's pricing page lists a long-context 30-minute cache write of $20 per 1M for GPT-6.2 Astra and $5 for GPT-6.2 Sol, the rates the harness's long-context doubling already gives. The two price comments now state every long-context rate with its source and read date, and say that batch rows are priced on the same synchronous basis. The GPT-6.2 pricing test prices a long-context cache write for each model, and the roster-wide cost property names these two rates as listed. The gauntlet reports give no prompt or cache counts, so the cards' comments and the card cost test now give the probe's 2,104 cache writes as assumed usage and say what the record does and does not show. The notes attribute the rounded cost estimates to onboarding. The LiteLLM cache-rate test is renamed for the effective map entry it reads, and its docstring now lists only what it asserts. Co-Authored-By: Claude Opus 5.5 --- policybench/config.py | 34 ++++++++++++++---------- policybench/model_cards.py | 53 ++++++++++++++++++++----------------- tests/test_eval_no_tools.py | 25 +++++++++++------ tests/test_model_cards.py | 30 ++++++++++++--------- 4 files changed, 84 insertions(+), 58 deletions(-) diff --git a/policybench/config.py b/policybench/config.py index 757f9f38..06a7edeb 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -209,21 +209,27 @@ # gpt-6.1-terra, read 2026-10-26, the day OpenAI announced it; the Models # API lists the id with created 2026-10-13T16:26Z). "gpt-6.1-terra": {"input": 1.0, "output": 5.0, "cache_read": 0.05}, - # gpt-6.2-astra: $8 / $40 per 1M input/output, $0.40 cached input, $10 - # cache writes (30-minute retention); $16 / $60 and $0.80 cached input for - # the whole request above 272k input tokens (developers.openai.com/api/ - # docs/models/gpt-6.2-astra and /api/docs/pricing, read 2026-11-17, the - # day OpenAI released it; the Models API lists the id with created - # 2026-10-31T07:00Z). These are the Standard tier's rates; the harness - # prices every request at them. + # gpt-6.2-astra: $8 / $40 per 1M input/output, $0.40 cached input and $10 + # cache writes (30-minute retention, the default); for the whole request + # above 272k input tokens, $16 / $60, $0.80 cached input and $20 cache + # writes (developers.openai.com/api/docs/models/gpt-6.2-astra and + # /api/docs/pricing, read 2026-11-17, the day OpenAI released it; the + # pricing page's "Long context 30m write" rate and the default retention + # in /api/docs/guides/prompt-caching read 2026-11-20; the Models API + # lists the id with created 2026-10-31T07:00Z). These are the + # Standard tier's rates. The harness prices synchronous requests at them + # and batch rows on the same synchronous basis (batch_eval). "gpt-6.2-astra": {"input": 8.0, "output": 40.0, "cache_read": 0.40}, - # gpt-6.2-sol: $2 / $10 per 1M input/output, $0.10 cached input, $2.50 - # cache writes (30-minute retention); $4 / $15 and $0.20 cached input - # above 272k input tokens (developers.openai.com/api/ - # docs/models/gpt-6.2-sol and /api/docs/pricing, read 2026-11-17, the day - # OpenAI released it; the Models API lists the id with created - # 2026-11-02T18:07Z). These are the Standard tier's rates; the harness - # prices every request at them. + # gpt-6.2-sol: $2 / $10 per 1M input/output, $0.10 cached input and $2.50 + # cache writes (30-minute retention, the default); for the whole request + # above 272k input tokens, $4 / $15, $0.20 cached input and $5 cache + # writes (developers.openai.com/api/docs/models/gpt-6.2-sol and + # /api/docs/pricing, read 2026-11-17, the day OpenAI released it; the + # pricing page's "Long context 30m write" rate and the default retention + # in /api/docs/guides/prompt-caching read 2026-11-20; the Models API + # lists the id with created 2026-11-02T18:07Z). These are the + # Standard tier's rates. The harness prices synchronous requests at them + # and batch rows on the same synchronous basis (batch_eval). "gpt-6.2-sol": {"input": 2.0, "output": 10.0, "cache_read": 0.10}, "gpt-6-luna": {"input": 0.10, "output": 0.50}, "gpt-5.6-sol": {"input": 5.0, "output": 30.0}, diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 8d76d3c7..8ca40b82 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -161,16 +161,18 @@ class ModelCard: # - expected_cost_per_scenario_usd 0.057: the cost `policybench onboard` # suggested from the whole-scenario probe, rounded to three places, at # OpenAI's list rates ($8/$40 per 1M, cache writes at $10). The - # gauntlet report gives no prompt or cache counts, so these are - # inferred. The probe sends the manifest's first scenario, which the - # smoke sent as its first household, so the two requests match: 2,236 - # prompt tokens. That household read 2,104 of them from the cache, and - # only the gauntlet ran on the model before it. Writing those 2,104 at - # $10 per 1M, with the probe's 870 completion tokens, gives $0.056896; - # list input and output rates alone would round to 0.053. The - # smoke's two households cost $0.036 and $0.063: 2,104 of the first's - # 2,236 prompt tokens were cache reads, at $0.40 per 1M, and 2,578 of - # the second's 2,710 were cache writes, at $10. + # gauntlet report gives the probe's 870 completion tokens but no prompt + # or cache counts. The probe sends the manifest's first scenario, the + # request the smoke sent as its first household (2,236 prompt tokens), + # and that household read 2,104 tokens from the cache with only the + # gauntlet run on the model before it. If the probe wrote those 2,104 + # tokens to the cache, it cost $0.056896. The record does not fix that + # count: a three-output probe on the same scenario ran first, and other + # write counts round to the same 0.057 (2,200, for one). With no cache + # write the probe would round to 0.053. The smoke's two households + # cost $0.036 and $0.063: 2,104 of the first's 2,236 prompt tokens were + # cache reads, at $0.40 per 1M, and 2,578 of the second's 2,710 were + # cache writes, at $10. # Both smoke responses name the model as gpt-6.2-astra, the requested # name, with no dated snapshot (the Responses API's model field, which the # harness records as provider_resolved_model). @@ -183,9 +185,9 @@ class ModelCard: "Onboarded 2026-11-19; OpenAI released the model on 2026-11-17. " "Forced tool contract passed 3/3 (459 completion tokens) and 16/16 " "whole-scenario (870 tokens) on the Responses API, which OpenAI " - "says tool calling on this model requires, about $0.057 per " - "scenario at OpenAI's list rates ($8/$40 per 1M, cache writes at " - "$10). OpenAI lists it as a reasoning model whose API rejects " + "says tool calling on this model requires; onboarding estimated " + "about $0.057 per scenario at OpenAI's list rates. OpenAI lists " + "it as a reasoning model whose API rejects " "reasoning effort none; the model page states no default effort, " "and the harness sends no reasoning parameter. A two-household " "smoke parsed all 36 outputs for $0.10, with no budget escalation " @@ -227,14 +229,17 @@ class ModelCard: # output of 128,000 tokens, the harness's escalation ceiling. # - expected_cost_per_scenario_usd 0.019: the cost `policybench onboard` # suggested from the whole-scenario probe, rounded to three places, at - # OpenAI's list rates ($2/$10 per 1M, cache writes at $2.50). The - # prompt and cache counts are inferred as on the Astra card: 2,236 - # prompt tokens, 2,104 of them written to the cache, which the smoke's - # first household then read. At $2.50 per 1M, with the probe's 1,339 - # completion tokens, that gives $0.018914; list input and output rates - # alone would round to 0.018. The smoke's two households cost $0.021 - # and $0.020, with the same cache reads (2,104 tokens) and writes - # (2,578) as Astra's. + # OpenAI's list rates ($2/$10 per 1M, cache writes at $2.50). As on the + # Astra card, the gauntlet report gives the probe's 1,339 completion + # tokens but no prompt or cache counts, and the smoke's first + # household, the same 2,236-token request, read 2,104 tokens from the + # cache with only the gauntlet run on the model before it. If the probe + # wrote those 2,104 tokens to the cache, it cost $0.018914. The record + # does not fix that count: a three-output probe on the same scenario + # ran first, and other write counts round to the same 0.019 (2,200, for + # one). With no cache write the probe would round to 0.018. The smoke's + # two households cost $0.021 and $0.020, with the same cache reads + # (2,104 tokens) and writes (2,578) as Astra's. # Both smoke responses name the model as gpt-6.2-sol, the requested name, # with no dated snapshot (provider_resolved_model). "gpt-6.2-sol": ModelCard( @@ -246,9 +251,9 @@ class ModelCard: "Onboarded 2026-11-19; OpenAI released the model on 2026-11-17. " "Forced tool contract passed 3/3 (1,145 completion tokens) and " "16/16 whole-scenario (1,339 tokens) on the Responses API, which " - "OpenAI says tool calling on this model requires, about $0.019 per " - "scenario at OpenAI's list rates ($2/$10 per 1M, cache writes at " - "$2.50). OpenAI lists it as a reasoning model whose API rejects " + "OpenAI says tool calling on this model requires; onboarding " + "estimated about $0.019 per scenario at OpenAI's list rates. " + "OpenAI lists it as a reasoning model whose API rejects " "reasoning effort none; the model page states no default effort, " "and the harness sends no reasoning parameter. A two-household " "smoke parsed all 36 outputs for $0.04, with no budget escalation " diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 11f66a30..fe2b522f 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3487,9 +3487,10 @@ def test_gpt_6_1_terra_override_reconstructs_token_costs( ("gpt-6.2-astra", 200_000, 0, 200_000, 0, 0.08), ("gpt-6.2-astra", 200_000, 0, 0, 200_000, 2.0), # Above 272k input tokens, the whole request: $16 input, $0.80 cached - # input and $60 output per 1M. + # input, $20 cache writes and $60 output per 1M. ("gpt-6.2-astra", 300_000, 0, 0, 0, 4.8), ("gpt-6.2-astra", 300_000, 10_000, 300_000, 0, 0.84), + ("gpt-6.2-astra", 300_000, 0, 0, 300_000, 6.0), # The onboarding smoke's two requests (2026-11-19): 2,236 prompt # tokens, 2,104 of them cached, and 848 completion tokens; then 2,710 # prompt tokens, 2,578 of them cache writes, and 902 completion tokens. @@ -3501,9 +3502,11 @@ def test_gpt_6_1_terra_override_reconstructs_token_costs( ("gpt-6.2-sol", 0, 1_000_000, 0, 0, 10.0), ("gpt-6.2-sol", 200_000, 0, 200_000, 0, 0.02), ("gpt-6.2-sol", 200_000, 0, 0, 200_000, 0.5), - # Above 272k input tokens: $4 input, $0.20 cached input and $15 output. + # Above 272k input tokens: $4 input, $0.20 cached input, $5 cache + # writes and $15 output. ("gpt-6.2-sol", 300_000, 0, 0, 0, 1.2), ("gpt-6.2-sol", 300_000, 10_000, 300_000, 0, 0.21), + ("gpt-6.2-sol", 300_000, 0, 0, 300_000, 1.5), # The onboarding smoke's two requests, with Astra's prompt and cache # counts and 2,013 and 1,377 completion tokens. ("gpt-6.2-sol", 2_236, 2_013, 2_104, 0, 0.0206044), @@ -3522,8 +3525,8 @@ def test_gpt_6_2_overrides_reconstruct_token_costs( rates, cache reads at a twentieth of input, and the long-context rates for a request above 272k input tokens (developers.openai.com/api/docs/ models/gpt-6.2-astra and /gpt-6.2-sol, and /api/docs/pricing, read - 2026-11-17). OpenAI lists no long-context cache-write rate for either - model, so no case here prices one.""" + 2026-11-17). The long-context cache-write cases take the pricing page's + "Long context 30m write" rates, $20 and $5 per 1M (read 2026-11-20).""" assert PRICE_OVERRIDES_PER_1M["gpt-6.2-astra"] == { "input": 8.0, "output": 40.0, @@ -3645,9 +3648,12 @@ def test_responses_models_read_the_cache_at_their_listed_rate(model, read, write @pytest.mark.parametrize( "model", ["gpt-6.1-terra", "gpt-6.1-sol", "gpt-6.2-astra", "gpt-6.2-sol"] ) -def test_litellm_registers_the_twentieth_cache_read_rate(model): - """The local litellm entry carries the same cache rates as the - reconstruction, doubled above 272k prompt tokens.""" +def test_effective_litellm_map_entry_carries_the_cache_rates(model): + """The litellm map entry in effect for the id (the local registration, + or litellm's own entry, since the registration skips ids litellm already + knows) carries the reconstruction's short-context cache read and write + rates (``_gpt_responses_cache_rates``) and twice that read rate above + 272k prompt tokens.""" entry = litellm.model_cost[GPT_RESPONSES_MODELS[model]] read, write = _gpt_responses_cache_rates(PRICE_OVERRIDES_PER_1M[model]) assert entry["cache_read_input_token_cost"] == pytest.approx(read) @@ -3671,7 +3677,10 @@ def test_responses_cost_is_the_sum_of_its_priced_token_classes( input, cache reads, cache writes and output, each at its listed rate (all input classes doubled and output 1.5x above 272k prompt tokens); it is never negative; and caching the whole prompt never costs more than - caching none of it, since every listed read rate is below input.""" + caching none of it, since every listed read rate is below input. For + GPT-6.2 Astra and GPT-6.2 Sol the doubled cache-write rate, $20 and $5 + per 1M, is the listed one (OpenAI's pricing page, "Long context 30m + write", read 2026-11-20).""" rates = PRICE_OVERRIDES_PER_1M[model] cached = int(prompt_tokens * cached_share) written = int((prompt_tokens - cached) * write_share) diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 8fbf480d..8d452722 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -174,36 +174,42 @@ def test_gemini_4_carbon_and_hydrogen_cards_record_the_gauntlet_cost( @pytest.mark.parametrize( - ("model_id", "completion_tokens", "probe_cost", "expected_cost"), + ("model_id", "completion_tokens", "assumed_usage_cost", "expected_cost"), [ ("gpt-6.2-astra", 870, 0.056896, 0.057), ("gpt-6.2-sol", 1_339, 0.018914, 0.019), ], ) def test_gpt_6_2_cards_record_the_gauntlet_cost( - model_id, completion_tokens, probe_cost, expected_cost + model_id, completion_tokens, assumed_usage_cost, expected_cost ): """Each card carries the cost ``policybench onboard`` suggested from its whole-scenario probe on 2026-11-19, rounded to three places, rebuilt here at the model's price override as in the Gemini 4 cards' test above. - The gauntlet report gives the probe's completion tokens but no prompt or - cache counts, so those are inferred. The probe sends the manifest's first - scenario, which the smoke sent as its first household: 2,236 prompt - tokens, 2,104 of which that household read from the cache, and only the - gauntlet ran on each model before it. So the probe wrote those 2,104 - tokens to the cache. At list input and output rates alone the probe - would round to 0.053 and 0.018, not the suggested costs. + The completion tokens are the gauntlet report's. The report gives no + prompt or cache counts, so the prompt and cache-write counts here are + assumed usage. The probe sends the manifest's first scenario, the + request the smoke sent as its first household (2,236 prompt tokens), and + that household read 2,104 tokens from the cache with only the gauntlet + run on each model before it. If the probe wrote those 2,104 tokens to + the cache, it cost 0.056896 (Astra) and 0.018914 (Sol). The record does + not fix that count: a three-output probe on the same scenario ran first, + and other write counts round to the same values (2,200, for one). With + no cache write the probe would round to 0.053 and 0.018, not the + suggested costs. """ + assumed_prompt_tokens = 2_236 + assumed_cache_write_tokens = 2_104 reconstructed = _reconstruct_token_cost( model_name=model_id, model_id=model_id, - prompt_tokens=2_236, + prompt_tokens=assumed_prompt_tokens, completion_tokens=completion_tokens, - cache_write_prompt_tokens=2_104, + cache_write_prompt_tokens=assumed_cache_write_tokens, ) assert reconstructed.is_estimated is False - assert reconstructed.usd == pytest.approx(probe_cost) + assert reconstructed.usd == pytest.approx(assumed_usage_cost) assert round(reconstructed.usd, 3) == expected_cost assert card_for(model_id).expected_cost_per_scenario_usd == expected_cost From 1425d68966df2d90ec0e29a53d38f6abf5d8d340 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 17:45:44 +0000 Subject: [PATCH 11/19] Reword an ambiguous clause in the GPT-6.2 cards' cost comments. "with only the gauntlet run on the model before it" could be read as a noun phrase; the comments and the card test's docstring now say that only the gauntlet had run on the model before the smoke's first household. Comments and a docstring only. Co-Authored-By: Claude Fable 5.2 --- policybench/model_cards.py | 6 +++--- tests/test_model_cards.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 8ca40b82..91f19e7e 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -164,8 +164,8 @@ class ModelCard: # gauntlet report gives the probe's 870 completion tokens but no prompt # or cache counts. The probe sends the manifest's first scenario, the # request the smoke sent as its first household (2,236 prompt tokens), - # and that household read 2,104 tokens from the cache with only the - # gauntlet run on the model before it. If the probe wrote those 2,104 + # and that household read 2,104 tokens from the cache, and only the + # gauntlet had run on the model before it. If the probe wrote those 2,104 # tokens to the cache, it cost $0.056896. The record does not fix that # count: a three-output probe on the same scenario ran first, and other # write counts round to the same 0.057 (2,200, for one). With no cache @@ -233,7 +233,7 @@ class ModelCard: # Astra card, the gauntlet report gives the probe's 1,339 completion # tokens but no prompt or cache counts, and the smoke's first # household, the same 2,236-token request, read 2,104 tokens from the - # cache with only the gauntlet run on the model before it. If the probe + # cache, and only the gauntlet had run on the model before it. If the probe # wrote those 2,104 tokens to the cache, it cost $0.018914. The record # does not fix that count: a three-output probe on the same scenario # ran first, and other write counts round to the same 0.019 (2,200, for diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 8d452722..8e894309 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -191,8 +191,8 @@ def test_gpt_6_2_cards_record_the_gauntlet_cost( prompt or cache counts, so the prompt and cache-write counts here are assumed usage. The probe sends the manifest's first scenario, the request the smoke sent as its first household (2,236 prompt tokens), and - that household read 2,104 tokens from the cache with only the gauntlet - run on each model before it. If the probe wrote those 2,104 tokens to + that household read 2,104 tokens from the cache, and only the gauntlet + had run on each model before it. If the probe wrote those 2,104 tokens to the cache, it cost 0.056896 (Astra) and 0.018914 (Sol). The record does not fix that count: a three-output probe on the same scenario ran first, and other write counts round to the same values (2,200, for one). With From be7e390ee53ac842b544c79bfa748145a64de6d4 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 17:58:27 +0000 Subject: [PATCH 12/19] State the full assumed usage behind the GPT-6.2 cards' exact cost examples. The six-decimal costs in the cards' comments and the card test rest on 2,236 prompt tokens, 2,104 cache writes and zero cache reads; the comments and the docstring now say all three, and the test passes the zero reads explicitly. They no longer say that only the gauntlet had run before the smoke's first household: the smoke's cache read does not show which request wrote the cache. The card values are unchanged. Co-Authored-By: Claude Fable 5.2 --- policybench/model_cards.py | 24 +++++++++++++----------- tests/test_model_cards.py | 23 +++++++++++++---------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 91f19e7e..b987562c 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -164,12 +164,13 @@ class ModelCard: # gauntlet report gives the probe's 870 completion tokens but no prompt # or cache counts. The probe sends the manifest's first scenario, the # request the smoke sent as its first household (2,236 prompt tokens), - # and that household read 2,104 tokens from the cache, and only the - # gauntlet had run on the model before it. If the probe wrote those 2,104 - # tokens to the cache, it cost $0.056896. The record does not fix that - # count: a three-output probe on the same scenario ran first, and other - # write counts round to the same 0.057 (2,200, for one). With no cache - # write the probe would round to 0.053. The smoke's two households + # and that household read 2,104 tokens from the cache. With 2,236 + # prompt tokens, 2,104 cache writes and zero cache reads, the probe + # would cost $0.056896. The record does not fix those counts: a + # three-output probe on the same scenario ran first, the smoke's read + # does not show which request wrote the cache, and other write counts + # round to the same 0.057 (2,200, for one). With no cache write and no + # cache read the probe would round to 0.053. The smoke's two households # cost $0.036 and $0.063: 2,104 of the first's 2,236 prompt tokens were # cache reads, at $0.40 per 1M, and 2,578 of the second's 2,710 were # cache writes, at $10. @@ -233,11 +234,12 @@ class ModelCard: # Astra card, the gauntlet report gives the probe's 1,339 completion # tokens but no prompt or cache counts, and the smoke's first # household, the same 2,236-token request, read 2,104 tokens from the - # cache, and only the gauntlet had run on the model before it. If the probe - # wrote those 2,104 tokens to the cache, it cost $0.018914. The record - # does not fix that count: a three-output probe on the same scenario - # ran first, and other write counts round to the same 0.019 (2,200, for - # one). With no cache write the probe would round to 0.018. The smoke's + # cache. With 2,236 prompt tokens, 2,104 cache writes and zero cache + # reads, the probe would cost $0.018914. The record does not fix those + # counts: a three-output probe on the same scenario ran first, the + # smoke's read does not show which request wrote the cache, and other + # write counts round to the same 0.019 (2,200, for one). With no cache + # write and no cache read the probe would round to 0.018. The smoke's # two households cost $0.021 and $0.020, with the same cache reads # (2,104 tokens) and writes (2,578) as Astra's. # Both smoke responses name the model as gpt-6.2-sol, the requested name, diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 8e894309..417b8ebb 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -188,24 +188,27 @@ def test_gpt_6_2_cards_record_the_gauntlet_cost( here at the model's price override as in the Gemini 4 cards' test above. The completion tokens are the gauntlet report's. The report gives no - prompt or cache counts, so the prompt and cache-write counts here are - assumed usage. The probe sends the manifest's first scenario, the - request the smoke sent as its first household (2,236 prompt tokens), and - that household read 2,104 tokens from the cache, and only the gauntlet - had run on each model before it. If the probe wrote those 2,104 tokens to - the cache, it cost 0.056896 (Astra) and 0.018914 (Sol). The record does - not fix that count: a three-output probe on the same scenario ran first, - and other write counts round to the same values (2,200, for one). With - no cache write the probe would round to 0.053 and 0.018, not the - suggested costs. + prompt or cache counts, so the prompt, cache-write and cache-read counts + here are assumed usage. The probe sends the manifest's first scenario, + the request the smoke sent as its first household (2,236 prompt tokens), + and that household read 2,104 tokens from the cache. With 2,236 prompt + tokens, 2,104 cache writes and zero cache reads, the probe would cost + 0.056896 (Astra) and 0.018914 (Sol). The record does not fix those + counts: a three-output probe on the same scenario ran first, the smoke's + read does not show which request wrote the cache, and other write counts + round to the same values (2,200, for one). With no cache write and no + cache read the probe would round to 0.053 and 0.018, not the suggested + costs. """ assumed_prompt_tokens = 2_236 assumed_cache_write_tokens = 2_104 + assumed_cache_read_tokens = 0 reconstructed = _reconstruct_token_cost( model_name=model_id, model_id=model_id, prompt_tokens=assumed_prompt_tokens, completion_tokens=completion_tokens, + cached_prompt_tokens=assumed_cache_read_tokens, cache_write_prompt_tokens=assumed_cache_write_tokens, ) assert reconstructed.is_estimated is False From 55c63d51d10f5483d6ca2955db9396b1d0f3d96f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 19:36:05 +0000 Subject: [PATCH 13/19] Let a gemini/ model card's completion_token_cap set its starting budget. The gemini/ branch of _uncapped_completion_controls returned the Gemini family's 16,384-token budget before it read the card, so completion_token_cap had no effect on a gemini/ id. A gemini/ card that sets the field now starts its requests there (base and cap both, as a thinking-budget card does on other providers, still clamped to the card's escalation ceiling), and every other gemini/ id keeps 16,384. No card sets the field in this commit, so no request changes. The onboarding gauntlet's probes, the Gemini batch body and the run fingerprint take their budget from the same controls, so they follow such a card too. The ModelCard field comment now says the field also sets a gemini/ card's starting budget. Tests pin the 16,384-token budget of every gemini/ id that sets no cap, check that each gemini/ card reads the field on first and answers-only repair requests, and check that a card starting at its ceiling sends one request and records a length finish as budget_exhausted_at_ceiling. Co-Authored-By: Claude Opus 5.5 --- policybench/eval_no_tools.py | 12 +- policybench/model_cards.py | 7 +- tests/test_eval_no_tools.py | 233 +++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+), 5 deletions(-) diff --git a/policybench/eval_no_tools.py b/policybench/eval_no_tools.py index 0716463a..a54905c0 100644 --- a/policybench/eval_no_tools.py +++ b/policybench/eval_no_tools.py @@ -1025,8 +1025,15 @@ def _uncapped_completion_controls( include_explanations: bool = True, variables: list[str] | None = None, ) -> dict: + card = card_for(model_id) if model_id.startswith("gemini/"): - if model_id == "gemini/gemini-3.1-pro-preview": + cap = GEMINI_MAX_COMPLETION_TOKENS_CAP + if card is not None and card.completion_token_cap is not None: + # A gemini/ card that sets completion_token_cap starts there, as + # a thinking-budget card does in the branch below (base and cap + # both). Every other gemini/ id keeps the family's 16,384. + base_tokens = cap = card.completion_token_cap + elif model_id == "gemini/gemini-3.1-pro-preview": base_tokens = GEMINI_PRO_JSON_MAX_COMPLETION_TOKENS else: base_tokens = GEMINI_JSON_MAX_COMPLETION_TOKENS @@ -1035,10 +1042,9 @@ def _uncapped_completion_controls( base_tokens, variables, include_explanations, - cap=GEMINI_MAX_COMPLETION_TOKENS_CAP, + cap=cap, ) } - card = card_for(model_id) # A thinking-budget card outranks the legacy xai/ family branch: # grok-4.5 reasons by default (14k tokens on the 16-variable probe), # while grok-4.3 has no card and keeps the flat family budget. diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 391f3884..5fc80fd3 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -62,8 +62,11 @@ class ModelCard: # True → 16,384-token completion budget on both explanation arms # (reasoning bills against the same budget as the answer). thinking_budget: bool | None = None - # Overrides the thinking-class starting budget for models whose reasoning - # tail overflows 16,384. Headroom is free — only generated tokens bill. + # The model's starting budget, for models whose reasoning tail overflows + # 16,384: it overrides the thinking-class starting budget on a + # thinking_budget card and, on a gemini/ card, the Gemini family's + # 16,384-token starting budget. Requests are still clamped to the + # escalation ceiling. Headroom is free — only generated tokens bill. completion_token_cap: int | None = None # Hard provider output limit, when it is lower than PolicyBench's 128k # escalation ceiling. This is distinct from ``completion_token_cap``, diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index f64f49d4..e0f9adc2 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3899,6 +3899,239 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( assert reasoning_key not in kwargs +# The gemini/ ids whose starting budget is the Gemini family's 16,384 tokens +# (GEMINI_JSON_MAX_COMPLETION_TOKENS): every gemini/ roster id and gemini/ +# card that sets no completion_token_cap, and one card-less gemini/ id. +GEMINI_FAMILY_STARTING_BUDGET_IDS = ( + "gemini/gemini-2.5-flash", + "gemini/gemini-3-flash-preview", + "gemini/gemini-3.1-flash-lite-preview", + "gemini/gemini-3.1-pro-preview", + "gemini/gemini-3.5-flash", + "gemini/gemini-3.5-flash-lite", + "gemini/gemini-3.6-flash", + "gemini/gemini-3.7-flash", + "gemini/gemini-3.8-flash", + "gemini/gemini-4-argon", + "gemini/gemini-4-carbon", + "gemini/gemini-4-hydrogen", + "gemini/gemini-4-neon", +) +CARDLESS_GEMINI_ID = "gemini/gemini-2.5-flash" + + +def _gemini_card_ids() -> list[str]: + from policybench.model_cards import MODEL_CARDS + + return sorted( + model_id for model_id in MODEL_CARDS if model_id.startswith("gemini/") + ) + + +def test_every_gemini_id_has_a_pinned_starting_budget(): + """Every gemini/ roster id and gemini/ card is either pinned at the + family's 16,384-token starting budget below or sets its own budget with + completion_token_cap, so a new gemini/ row cannot skip both.""" + from policybench.model_cards import MODEL_CARDS, card_for + + gemini_ids = { + model_id for model_id in MODELS.values() if model_id.startswith("gemini/") + } | set(_gemini_card_ids()) + capped = { + model_id + for model_id in gemini_ids + if MODEL_CARDS.get(model_id) is not None + and MODEL_CARDS[model_id].completion_token_cap is not None + } + assert capped == set() + assert gemini_ids - capped == set(GEMINI_FAMILY_STARTING_BUDGET_IDS) - { + CARDLESS_GEMINI_ID + } + assert card_for(CARDLESS_GEMINI_ID) is None + + +@pytest.mark.parametrize("model_id", GEMINI_FAMILY_STARTING_BUDGET_IDS) +def test_gemini_ids_without_a_card_budget_keep_the_family_starting_budget( + model_id, +): + """A gemini/ card's completion_token_cap leaves every other gemini/ id + where it was: 16,384 tokens for 1, 3, 16 and 20 outputs, with and without + explanations (the board's requests and answers-only ones), and in the run + fingerprint.""" + from policybench.eval_no_tools import _initial_completion_budget_tokens + + for variable_count in (1, 3, 16, 20): + variables = [f"v{i}" for i in range(variable_count)] + for include_explanations in (True, False): + assert _completion_controls( + model_id, + include_explanations=include_explanations, + variables=variables, + ) == {"max_completion_tokens": 16_384} + assert _initial_completion_budget_tokens(model_id, variables) == 16_384 + + +@pytest.mark.parametrize( + ("cap", "ceiling", "expected"), + [ + # Above the family's 16,384 and below the ceiling: the card's value. + (24_576, 65_536, 24_576), + # At the ceiling: the first request is the last rung. + (65_536, 65_536, 65_536), + # Above the ceiling: clamped to it, as for every card. + (98_304, 65_536, 65_536), + ], +) +def test_a_gemini_card_completion_token_cap_is_its_starting_budget( + mini_scenario, monkeypatch, cap, ceiling, expected +): + """A gemini/ card's completion_token_cap sets the budget of its first + request and of its answers-only repair requests (base and cap both, as a + thinking-budget card's does on other providers), clamped to the card's + escalation ceiling.""" + from policybench.eval_no_tools import ( + _chat_completion_request_kwargs, + _initial_completion_budget_tokens, + ) + from policybench.model_cards import MODEL_CARDS, ModelCard + + model_id = "gemini/gemini-capped-test" + monkeypatch.setitem( + MODEL_CARDS, + model_id, + ModelCard( + litellm_id=model_id, + answer_contract="tool", + request_timeout_seconds=600, + thinking_budget=True, + completion_token_cap=cap, + provider_max_completion_tokens=ceiling, + ), + ) + + _, first = _chat_completion_request_kwargs(mini_scenario, ["income_tax"], model_id) + _, repair = _chat_completion_request_kwargs( + mini_scenario, + ["income_tax"], + model_id, + repair=True, + include_explanations=False, + ) + assert first["max_completion_tokens"] == expected + assert repair["max_completion_tokens"] == expected + for variable_count in (1, 3, 16, 20): + variables = [f"v{i}" for i in range(variable_count)] + for include_explanations in (True, False): + assert _completion_controls( + model_id, + include_explanations=include_explanations, + variables=variables, + ) == {"max_completion_tokens": expected} + assert _initial_completion_budget_tokens(model_id, variables) == expected + + +@pytest.mark.parametrize("model_id", _gemini_card_ids()) +def test_every_gemini_card_reads_its_completion_token_cap( + mini_scenario, monkeypatch, model_id +): + """Fails if the gemini/ branch ignores the card: each gemini/ card, given + a 24,576-token completion_token_cap (under every gemini/ ceiling), starts + its first and answers-only repair requests at 24,576, not 16,384.""" + import dataclasses + + from policybench.eval_no_tools import ( + _chat_completion_request_kwargs, + _completion_budget_ceiling, + ) + from policybench.model_cards import MODEL_CARDS + + monkeypatch.setitem( + MODEL_CARDS, + model_id, + dataclasses.replace(MODEL_CARDS[model_id], completion_token_cap=24_576), + ) + assert _completion_budget_ceiling(model_id) >= 24_576 + + _, first = _chat_completion_request_kwargs(mini_scenario, ["income_tax"], model_id) + _, repair = _chat_completion_request_kwargs( + mini_scenario, + ["income_tax"], + model_id, + repair=True, + include_explanations=False, + ) + assert first["max_completion_tokens"] == 24_576 + assert repair["max_completion_tokens"] == 24_576 + + +def test_a_gemini_card_completion_token_cap_reaches_the_probe_and_batch_requests( + mini_scenario, monkeypatch +): + """The onboarding gauntlet's probes and the Gemini batch body build their + budget from the same controls, so they start at the card's value too.""" + from policybench import onboard + from policybench.batch_eval import BatchUnit, GeminiBatchAdapter + from policybench.model_cards import MODEL_CARDS, ModelCard + + model_id = "gemini/gemini-capped-test" + monkeypatch.setitem( + MODEL_CARDS, + model_id, + ModelCard( + litellm_id=model_id, + answer_contract="tool", + thinking_budget=True, + completion_token_cap=65_536, + provider_max_completion_tokens=65_536, + ), + ) + + for contract in ("tool", "json"): + _, probe, _ = onboard._probe_request( + mini_scenario, ["income_tax"], model_id, contract + ) + assert probe["max_completion_tokens"] == 65_536 + body = GeminiBatchAdapter(client=MagicMock()).build_request_body( + mini_scenario, BatchUnit(mini_scenario.id, ["income_tax"], 0), model_id + ) + assert body["config"]["max_output_tokens"] == 65_536 + + +@patch("policybench.eval_no_tools.completion") +def test_a_gemini_card_starting_at_its_ceiling_never_escalates( + mock_completion, mini_scenario, monkeypatch +): + """A first request at the ceiling is the only rung: a length finish with + the outputs missing is billed once, then those outputs are recorded as + budget_exhausted_at_ceiling with no repair request.""" + from policybench.model_cards import MODEL_CARDS, ModelCard + + model_id = "gemini/gemini-capped-test" + monkeypatch.setitem( + MODEL_CARDS, + model_id, + ModelCard( + litellm_id=model_id, + answer_contract="tool", + request_timeout_seconds=600, + thinking_budget=True, + completion_token_cap=65_536, + provider_max_completion_tokens=65_536, + ), + ) + mock_completion.return_value = _chat_tool_response( + None, finish_reason="length", completion_tokens=65_536 + ) + + result = run_single_no_tools(mini_scenario, "income_tax", model_id) + + assert [ + call.kwargs["max_completion_tokens"] for call in mock_completion.call_args_list + ] == [65_536] + assert result["budget_escalation_count"] == 0 + assert result["failure_sources"] == {"income_tax": "budget_exhausted_at_ceiling"} + + def test_claude_haiku_5_5_reasons_by_default_but_not_under_the_forced_tool(): """Haiku 5.5 thinks when the request omits the thinking parameter, so it is a thinking-default Claude: provider-default thinking, the thinking From 38f73c8181271ee7353497ece70d59b1c16ff796 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 19:46:02 +0000 Subject: [PATCH 14/19] Start Gemini 4 Neon's requests at its 65,536-token ceiling. The two-household smoke of 2026-11-19 ran on the board's request at the Gemini family's 16,384-token starting budget. One household's first two requests used the whole 16,384- and 32,768-token budgets with no answer before its third, at 65,536, answered; each of those two was billed in full and discarded. Neon's card now sets completion_token_cap to 65,536, its escalation ceiling, so no request goes out below the ceiling. The forced answer tool, the provider-default thinking level and the 600 s timeout stay. The card's comment block and notes record the smoke per request and no longer say that the smoke has not run or that it will settle the contract. The expected cost per scenario stays unset until a smoke at the new starting budget. The treatment table and the Neon request test pin the 65,536-token start on first and answers-only repair requests and in the run fingerprint. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 121 ++++++++++++++++++++++++------------ tests/test_eval_no_tools.py | 39 ++++++++---- tests/test_model_cards.py | 2 +- 3 files changed, 108 insertions(+), 54 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 5fc80fd3..0c835b80 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -976,9 +976,12 @@ class ModelCard: # 2026-11-19, the day after Google released the model, and from the Gemini # 4 Hydrogen card above, whose default thinking level, high, it shares. # The same day the onboarding gauntlet ran under this card, then with the - # thinking class's 300s timeout, and two raw generateContent calls with no - # tools asked the model one plain tax question; the two-household smoke - # has not run yet. Field by field: + # thinking class's 300s timeout; two raw generateContent calls with no + # tools asked the model one plain tax question; and a two-household smoke + # ran on the board's request, then with the Gemini family's 16,384-token + # starting budget. After the smoke the card's starting budget moved to the + # 65,536-token ceiling (completion_token_cap below); a smoke at that + # starting budget is to come. Field by field: # - answer_contract "tool": Hydrogen's contract, the board's forced answer # tool, which litellm sends as mode ANY with allowed_function_names. # Google's model page lists function calling as supported @@ -995,20 +998,18 @@ class ModelCard: # answering, reported the model "not scorable" at that budget, did not # reach its whole-scenario probe and derived no card. Gemini 4 Carbon's # card took JSON because its JSON probes passed after its tool probe ran - # out of budget; here both ran out, so the card keeps the tool contract. - # The board's request escalates a length finish to 32,768 and then - # 65,536 tokens, and a two-household smoke on that request settles - # whether the model answers within that ceiling and whether the contract - # stays. + # out of budget; here both ran out, so the card kept the tool contract. + # The smoke settled it: on the board's request, which doubles the budget + # on a length finish, both households answered every output through the + # forced tool once the budget allowed, 16 of 16 and 20 of 20, values + # and explanations, so the contract stays. # - explanation_chunk_size None: the canonical whole-scenario request # (chunking is closed to new models). # - thinking_budget True: the model reasons by default. Google's thinking # guide lists its default as "On (high)", with levels low, medium, high # and xhigh, and lists "minimal" as not supported on Gemini 4 models # (aistudio.google.com/docs/thinking); no page read says thinking can be - # turned off. The 16,384-token starting budget is not the card's: the - # harness gives every gemini/ id 16,384 - # (GEMINI_JSON_MAX_COMPLETION_TOKENS). The harness sends no + # turned off. The harness sends no # thinkingConfig. Google's pricing page bills thinking tokens as output # ("Output price (including thinking tokens)", # aistudio.google.com/docs/pricing). The model reasoned on every call in @@ -1022,19 +1023,40 @@ class ModelCard: # tokens and 355 answer tokens (candidatesTokenCount) with no # thinkingConfig (the default, high), and 1,370 and 350 with # thinkingLevel low. These are facts about the model; the board sends - # no thinkingConfig, so low is not a treatment it uses. + # no thinkingConfig, so low is not a treatment it uses. The smoke's four + # requests reported reasoning tokens too, from 13,431 to 32,765 each. + # - completion_token_cap 65_536: the starting budget, at the escalation + # ceiling, set after the smoke. The smoke ran at the Gemini family's + # 16,384-token starting budget (GEMINI_JSON_MAX_COMPLETION_TOKENS), + # which the board's request doubles on a length finish to 32,768 and + # then 65,536. The 20-output household answered on its first request: + # 14,984 completion tokens, 13,431 of them reasoning, 110s. The + # 16-output household's first request used the whole 16,384-token + # budget (16,381 reasoning tokens, 128s) and its second the whole 32,768 + # (32,765 reasoning tokens, 247s), both finish=length with no outputs; + # its third, at 65,536, answered with 24,444 completion tokens (23,115 + # reasoning) in 187s. A request that runs out is billed in full and its + # output discarded: 49,152 of the smoke's 88,580 completion tokens, an + # estimated $0.75 of the smoke's $1.36 at Google's list rates (the + # households $1.12 and $0.23). Starting at the ceiling leaves no lower + # rung to bill and discard. A request at the ceiling that ends at length + # with outputs missing has no rung left: the harness records those + # outputs as budget_exhausted_at_ceiling and asks for them no more. The + # record does not show whether the model reasons longer when given a + # larger first budget; the smoke at this starting budget will show it + # for the same two households. # - request_timeout_seconds 600, set from the measured output rate as on # Hydrogen's card. The gauntlet's probes ran at about 129 and 127 - # completion tokens a second (16,384 tokens in 127s and 129s), and the - # raw call at the default level at about 138 (7,930 thought and answer - # tokens in 57s). At those rates a request at the 32,768-token first - # escalation takes about 237 to 258s, inside the thinking class's 300s, - # and a request at the 65,536-token ceiling about 475 to 516s, past it. - # That is a constant-rate prediction from calls of at most 16,384 - # tokens, and the average rate was lower on the longer calls (about 138 - # on the raw call's 7,930 tokens, 127 to 129 on the gauntlet's 16,384), - # so a request at the ceiling may run slower; the smoke's requests at - # the ceiling check it. Google's generateContent long-decode guide, read + # completion tokens a second (16,384 tokens in 127s and 129s), the raw + # call at the default level at about 138 (7,930 thought and answer + # tokens in 57s), and the smoke's four requests at 128 to 136, the + # 32,768-token one at 132, so the record shows no slowdown with length + # up to 32,768 tokens. Every request now asks for the 65,536-token + # ceiling. At 127 to 138 tokens a second one that used all of it would + # take about 475 to 516s, past the thinking class's 300s. No request in + # the record used the whole ceiling (the smoke's request at 65,536 + # stopped at 24,444 tokens), so that is a constant-rate prediction. + # Google's generateContent long-decode guide, read # 2026-11-14 for the Carbon and Hydrogen cards above and not re-read for # this one, says the server closes a non-streaming connection after 10 # minutes and recommends a 20-minute client read timeout, and its option @@ -1067,8 +1089,9 @@ class ModelCard: # 7,930 thought and answer tokens), which shows only that the value is # accepted. # - expected_cost_per_scenario_usd is not set: the gauntlet did not reach - # its whole-scenario probe and derived no cost. The smoke records what - # a scenario costs on the board's request. + # its whole-scenario probe and derived no cost, and the smoke ran at the + # 16,384-token starting budget, which this card no longer sends. It + # stays unset until the smoke at the new starting budget. # Both raw responses name the model as gemini-4-neon, the requested name, # with no dated snapshot (modelVersion). The gauntlet's rows carry the # same name, but litellm sets it from the request on this path, so they @@ -1078,6 +1101,7 @@ class ModelCard: answer_contract="tool", request_timeout_seconds=600, thinking_budget=True, + completion_token_cap=65_536, provider_max_completion_tokens=65_536, notes=( "Written 2026-11-19 from Google's documentation, read that day, " @@ -1090,7 +1114,8 @@ class ModelCard: "harness sends no thinkingConfig, and Google's thinking guide " "lists the model's default as On (high), with levels low, medium, " "high and xhigh, as for Hydrogen. The same day the onboarding " - "gauntlet ran under this card, then with a 300s timeout. The " + "gauntlet ran under this card, then with a 300s timeout and the " + "Gemini family's 16,384-token starting budget. The " "Gemini API accepted the forced call, but on the 3-variable tool " "probe the model reasoned until the 16,384-token budget ran out " "(16,381 reasoning tokens, finish=length, 0 of 3 outputs parsed, " @@ -1099,24 +1124,42 @@ class ModelCard: "once at that budget, with no budget escalation, so it found " "neither contract answering, reported the model not scorable at " "that budget and derived no card. Both contracts failed the same " - "way, so the row keeps the tool contract. Two raw generateContent " + "way, so the row kept the tool contract. Two raw generateContent " "calls with one plain tax question and no tools returned thought " "tokens (usageMetadata.thoughtsTokenCount): 7,575 thought tokens " "and 355 answer tokens with no thinkingConfig, and 1,370 and 350 " "at thinking level low, which the board does not send. " "Both name the model as gemini-4-neon, the requested name, with " - "no dated snapshot. The Models API gives the model an " + "no dated snapshot. A two-household smoke then ran on the board's " + "request at the 16,384-token starting budget, which the request " + "doubles on a length finish to 32,768 and then 65,536. Both " + "households answered every output through the forced tool, 16 of " + "16 and 20 of 20, so the tool contract stays. The 20-output " + "household answered on its first request (14,984 completion " + "tokens, 13,431 of them reasoning, 110s). The 16-output " + "household's first request used the whole 16,384-token budget and " + "its second the whole 32,768, both with no answer (16,381 and " + "32,765 reasoning tokens, 128s and 247s); its third, at 65,536, " + "answered with 24,444 completion tokens (23,115 reasoning) in " + "187s. A request that runs out is billed in full and its output " + "discarded: 49,152 of the smoke's 88,580 completion tokens, an " + "estimated $0.75 of the smoke's $1.36 at Google's list rates. So " + "the card starts at the 65,536-token ceiling (completion_token_cap), " + "with no lower rung to bill and discard; a request at the ceiling " + "that ends at length with outputs missing records them as " + "budget_exhausted_at_ceiling. A smoke at that starting budget is " + "to come, and the card sets no expected cost per scenario until " + "then. The Models API gives the model an " "outputTokenLimit of 65,536 and lists generateContent, the method " "the harness calls with one non-streaming request, among its " "supported methods; the model page gives the same 65,536 as the " - "default synchronous output. The gauntlet's probes and the raw " - "call at the default level ran at about 127 to 138 completion " - "tokens a second, so a request at that 65,536-token ceiling would " - "take about 475 to 516s at those rates (a request slower than " - "about 109 tokens a second outlasts 600s), and the card sets a " - "600s timeout, as Hydrogen's does. That is a constant-rate " - "prediction from calls of at most 16,384 tokens, and the rate was " - "lower on the longer calls. The raw call at level low, a short " + "default synchronous output. The record's requests ran at about " + "127 to 138 completion tokens a second, the smoke's 32,768-token " + "request at 132, so a request that used the whole 65,536-token " + "ceiling would take about 475 to 516s at those rates (a request " + "slower than about 109 tokens a second outlasts 600s); no request " + "in the record used the whole ceiling. The card sets a 600s " + "timeout, as Hydrogen's does. The raw call at level low, a short " "one, averaged about 105 a second, which predicts about 624s at " "the ceiling; Hydrogen's 600s exceeds what the slowest rates in " "its record predict, but this card sets that call aside, since " @@ -1125,12 +1168,8 @@ class ModelCard: "2026-11-14 for the Carbon and Hydrogen cards, not re-read for " "Neon) says the server closes a non-streaming call after 10 " "minutes. The same guide recommends a 20-minute client read " - "timeout, and its option table gives 20 minutes per request. The " - "board's request escalates a length finish to 32,768 and then " - "65,536 tokens; a two-household smoke on that request settles " - "whether the model answers within that ceiling, whether the " - "contract stays and what a scenario costs, and its requests at " - "the ceiling check the predicted time. Google lists $3/$15 per 1M." + "timeout, and its option table gives 20 minutes per request. " + "Google lists $3/$15 per 1M." ), ), "openrouter/z-ai/glm-5.3": ModelCard( diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index e0f9adc2..05306821 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3863,19 +3863,23 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( ): """Gemini 4 Neon's card, written before the model's onboarding, takes Gemini 4 Hydrogen's contract, the board's forced answer tool; Google's - model page lists function calling as supported. The onboarding - gauntlet's 3-variable tool and JSON probes both ran out of the - 16,384-token budget, so they settled nothing between the contracts; a - two-household smoke on the board's escalating request settles whether - the contract stays. The request carries no reasoning parameter, so the - model reasons at Google's default, high per Google's thinking guide, as - Hydrogen does. It takes the card's 600s timeout, set from the probes' - output rate for a request at the 65,536-token ceiling, and the Gemini - family's 16,384-token starting budget.""" + model page lists function calling as supported, and in the two-household + smoke both households answered every output through it. The request + carries no reasoning parameter, so the model reasons at Google's default, + high per Google's thinking guide, as Hydrogen does. It takes the card's + 600s timeout, set from the measured output rate for a request at the + 65,536-token ceiling, and the card's own starting budget, that ceiling: + in the smoke, at the Gemini family's 16,384, one household's first two + requests ran out of budget and were billed and discarded. The first + request, an answers-only repair request and the run fingerprint all + start at 65,536, so a length finish has no rung left.""" + from policybench.completion_budget import next_completion_budget from policybench.eval_no_tools import ( ANSWER_FUNCTION_NAME, _answer_contract_for_model, _chat_completion_request_kwargs, + _completion_budget_ceiling, + _initial_completion_budget_tokens, ) model_id = "gemini/gemini-4-neon" @@ -3884,6 +3888,13 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( assert _request_timeout_seconds(model_id) == 600 _, kwargs = _chat_completion_request_kwargs(mini_scenario, ["income_tax"], model_id) + _, repair = _chat_completion_request_kwargs( + mini_scenario, + ["income_tax"], + model_id, + repair=True, + include_explanations=False, + ) assert kwargs["tool_choice"] == { "type": "function", @@ -3892,7 +3903,10 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( assert [tool["function"]["name"] for tool in kwargs["tools"]] == [ ANSWER_FUNCTION_NAME ] - assert kwargs["max_completion_tokens"] == 16_384 + assert kwargs["max_completion_tokens"] == 65_536 + assert repair["max_completion_tokens"] == 65_536 + assert _initial_completion_budget_tokens(model_id, ["income_tax"]) == 65_536 + assert next_completion_budget(65_536, _completion_budget_ceiling(model_id)) is None assert kwargs["timeout"] == 600 assert "response_format" not in kwargs for reasoning_key in ("reasoning", "reasoning_effort", "thinking"): @@ -3915,7 +3929,6 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( "gemini/gemini-4-argon", "gemini/gemini-4-carbon", "gemini/gemini-4-hydrogen", - "gemini/gemini-4-neon", ) CARDLESS_GEMINI_ID = "gemini/gemini-2.5-flash" @@ -3943,7 +3956,9 @@ def test_every_gemini_id_has_a_pinned_starting_budget(): if MODEL_CARDS.get(model_id) is not None and MODEL_CARDS[model_id].completion_token_cap is not None } - assert capped == set() + # Gemini 4 Neon starts at its 65,536-token ceiling (its own test above). + assert capped == {"gemini/gemini-4-neon"} + assert MODEL_CARDS["gemini/gemini-4-neon"].completion_token_cap == 65_536 assert gemini_ids - capped == set(GEMINI_FAMILY_STARTING_BUDGET_IDS) - { CARDLESS_GEMINI_ID } diff --git a/tests/test_model_cards.py b/tests/test_model_cards.py index 7d2159a9..0960e7ae 100644 --- a/tests/test_model_cards.py +++ b/tests/test_model_cards.py @@ -83,7 +83,7 @@ "gemini/gemini-4-argon": ("tool", None, 300, 16_384), "gemini/gemini-4-carbon": ("json", None, 900, 16_384), "gemini/gemini-4-hydrogen": ("tool", None, 600, 16_384), - "gemini/gemini-4-neon": ("tool", None, 600, 16_384), + "gemini/gemini-4-neon": ("tool", None, 600, 65_536), } From 7c3c4de04c4cf8e36fea6759531f4a345b6500ed Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 19:47:20 +0000 Subject: [PATCH 15/19] Name the sources of Gemini 4 Neon's 127 to 138 tokens-a-second range in its card notes. The notes said the record's requests ran at 127 to 138 completion tokens a second, but the raw call at thinking level low, which the next sentence sets aside, ran at about 105. They now name the gauntlet's probes, the raw call at the default level and the smoke's requests, as the comment block does. The comment block's thinking_budget bullet is reflowed, and the notes' sentence on budget_exhausted_at_ceiling now says the harness records it. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 0c835b80..ea10b022 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -1009,8 +1009,8 @@ class ModelCard: # guide lists its default as "On (high)", with levels low, medium, high # and xhigh, and lists "minimal" as not supported on Gemini 4 models # (aistudio.google.com/docs/thinking); no page read says thinking can be - # turned off. The harness sends no - # thinkingConfig. Google's pricing page bills thinking tokens as output + # turned off. The harness sends no thinkingConfig. Google's pricing + # page bills thinking tokens as output # ("Output price (including thinking tokens)", # aistudio.google.com/docs/pricing). The model reasoned on every call in # the record. The harness recorded 16,381 reasoning tokens on each @@ -1145,16 +1145,17 @@ class ModelCard: "discarded: 49,152 of the smoke's 88,580 completion tokens, an " "estimated $0.75 of the smoke's $1.36 at Google's list rates. So " "the card starts at the 65,536-token ceiling (completion_token_cap), " - "with no lower rung to bill and discard; a request at the ceiling " - "that ends at length with outputs missing records them as " - "budget_exhausted_at_ceiling. A smoke at that starting budget is " - "to come, and the card sets no expected cost per scenario until " - "then. The Models API gives the model an " + "with no lower rung to bill and discard; when a request at the " + "ceiling ends at length with outputs missing, the harness records " + "them as budget_exhausted_at_ceiling. A smoke at that starting " + "budget is to come, and the card sets no expected cost per " + "scenario until then. The Models API gives the model an " "outputTokenLimit of 65,536 and lists generateContent, the method " "the harness calls with one non-streaming request, among its " "supported methods; the model page gives the same 65,536 as the " - "default synchronous output. The record's requests ran at about " - "127 to 138 completion tokens a second, the smoke's 32,768-token " + "default synchronous output. The gauntlet's probes, the raw call " + "at the default level and the smoke's requests ran at about 127 " + "to 138 completion tokens a second, the smoke's 32,768-token " "request at 132, so a request that used the whole 65,536-token " "ceiling would take about 475 to 516s at those rates (a request " "slower than about 109 tokens a second outlasts 600s); no request " From f0e7d28007afe2bb87651244e77c48fcc1c43767 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 20 Nov 2026 22:23:04 +0000 Subject: [PATCH 16/19] Correct three card comments that the Gemini starting-budget change made false or too broad. The Gemini 4 Carbon and Hydrogen card comments said the harness gives every gemini/ id a 16,384-token starting budget. Since a gemini/ card can now set its own, they say that these cards set no completion_token_cap and so get the Gemini family's 16,384. Neon's timeout comment said the record shows no slowdown with length; the raw call at 7,930 tokens ran faster than the 32,768-token smoke request, so it now says the smoke shows none. Comments only: the module's syntax tree is unchanged. Co-Authored-By: Claude Fable 5.2 --- policybench/model_cards.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index ea10b022..9b5212f2 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -740,10 +740,11 @@ class ModelCard: # high (aistudio.google.com/docs/generate-content/thinking, read # 2026-11-13), and all 51 raw generateContent responses in the record # carry thought tokens. The 16,384-token starting budget is not the - # card's: the harness gives every gemini/ id 16,384 - # (GEMINI_JSON_MAX_COMPLETION_TOKENS). The gauntlet used all of it on the - # forced-tool probe, 61% on the 3-variable JSON probe and 44% on the - # whole-scenario JSON probe (22% of the 32,768-token ceiling). + # card's: it sets no completion_token_cap, so the harness gives it the + # Gemini family's 16,384 (GEMINI_JSON_MAX_COMPLETION_TOKENS). The + # gauntlet used all of it on the forced-tool probe, 61% on the + # 3-variable JSON probe and 44% on the whole-scenario JSON probe (22% of + # the 32,768-token ceiling). # - request_timeout_seconds 900. Google's Gemini 4 Carbon guide says hard # prompts "can take several minutes" and recommends HTTP client # timeouts of "at least 15 minutes" @@ -875,10 +876,11 @@ class ModelCard: # 2026-11-13), and all 51 raw generateContent responses in the record # carry thought tokens. The harness sends no thinkingConfig, so this # model's default is high where Carbon's and Argon's is medium. The - # 16,384-token starting budget is not the card's: the harness gives every - # gemini/ id 16,384 (GEMINI_JSON_MAX_COMPLETION_TOKENS). The gauntlet - # used 67% of it on the 3-variable probe and 73% on the whole-scenario - # probe (18% of the 65,536-token ceiling). + # 16,384-token starting budget is not the card's: it sets no + # completion_token_cap, so the harness gives it the Gemini family's + # 16,384 (GEMINI_JSON_MAX_COMPLETION_TOKENS). The gauntlet used 67% of + # it on the 3-variable probe and 73% on the whole-scenario probe (18% of + # the 65,536-token ceiling). # - request_timeout_seconds 600. At the gauntlet's 228 to 234 completion # tokens a second, a request at the 65,536-token ceiling (the second # budget escalation) takes about 280 to 290s, and at the slowest rates @@ -1050,7 +1052,7 @@ class ModelCard: # completion tokens a second (16,384 tokens in 127s and 129s), the raw # call at the default level at about 138 (7,930 thought and answer # tokens in 57s), and the smoke's four requests at 128 to 136, the - # 32,768-token one at 132, so the record shows no slowdown with length + # 32,768-token one at 132, so the smoke shows no slowdown with length # up to 32,768 tokens. Every request now asks for the 65,536-token # ceiling. At 127 to 138 tokens a second one that used all of it would # take about 475 to 516s, past the thinking class's 300s. No request in From 11da9d16c5f03eaf0dbef28ca5e2910e30268133 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 21 Nov 2026 13:45:56 +0100 Subject: [PATCH 17/19] Scope Gemini 4 Neon's card to what its smokes showed, and add the second smoke. - The card no longer says the harness discards a truncated response. It says the first smoke's two truncated requests returned no usable output, and that on a length finish the harness keeps what came back and, at the ceiling, marks each output still missing budget_exhausted_at_ceiling. - The second smoke, at the 65,536-token start, replaces the pending-smoke sentences: both households answered every output on their first response. - The output-rate passage gives the measured range instead of a claim about length, and keeps the 65,536-token times conditional on it. - Per-call figures are rounded; "for every model" is gone. - Neon's price comment says the rates reconstruct synchronous token cost from reported usage. - Three test docstrings name _initial_completion_budget_tokens and say "one request" for what the tests assert. Co-Authored-By: Claude Opus 5.5 --- policybench/config.py | 5 +- policybench/model_cards.py | 327 ++++++++++++++++++------------------ tests/test_eval_no_tools.py | 32 ++-- 3 files changed, 184 insertions(+), 180 deletions(-) diff --git a/policybench/config.py b/policybench/config.py index b1d96723..fb3b7a9a 100644 --- a/policybench/config.py +++ b/policybench/config.py @@ -337,8 +337,9 @@ # (aistudio.google.com/docs/pricing, read 2026-11-19). The page lists one # rate at every prompt length, implicit caching only, and no free tier # for this model. litellm 1.95.0's bundled price map has no gemini-4 id; - # the override prices a request from the rates above whether or not - # litellm's map has the id. + # PolicyBench uses these rates to reconstruct a request's synchronous + # token cost from its reported usage, whether or not litellm's map has + # the id. "gemini-4-neon": {"input": 3.0, "output": 15.0, "cache_read": 0.15}, # glm-5.3: $1.40 / $4.40 per 1M (OpenRouter list, 2026-09-03). "glm-5.3": {"input": 1.40, "output": 4.40}, diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 9b5212f2..9977c1fd 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -976,128 +976,130 @@ class ModelCard: ), # Gemini 4 Neon. This card was written from Google's documentation, read # 2026-11-19, the day after Google released the model, and from the Gemini - # 4 Hydrogen card above, whose default thinking level, high, it shares. - # The same day the onboarding gauntlet ran under this card, then with the + # 4 Hydrogen card above, whose default thinking level, high, it shares. The + # same day the onboarding gauntlet ran under this card, then with the # thinking class's 300s timeout; two raw generateContent calls with no - # tools asked the model one plain tax question; and a two-household smoke - # ran on the board's request, then with the Gemini family's 16,384-token - # starting budget. After the smoke the card's starting budget moved to the - # 65,536-token ceiling (completion_token_cap below); a smoke at that - # starting budget is to come. Field by field: + # tools asked the model one plain tax question; and a first two-household + # smoke ran on the board's request, then with the Gemini family's + # 16,384-token starting budget. After that smoke the card's starting budget + # moved to the 65,536-token ceiling (completion_token_cap below), and on + # 2026-11-21 a second smoke ran the same two households at that starting + # budget. Field by field: # - answer_contract "tool": Hydrogen's contract, the board's forced answer # tool, which litellm sends as mode ANY with allowed_function_names. # Google's model page lists function calling as supported # (aistudio.google.com/docs/models/gemini-4-neon), and the API - # reference's FunctionCallingConfig describes mode ANY for every model, - # naming no exception (aistudio.google.com/api-reference/caching). The - # gauntlet settled nothing between the contracts. The API accepted the - # forced call, but on the 3-variable tool probe the model reasoned until - # the 16,384-token budget ran out: 16,384 completion tokens, 16,381 of - # them reasoning, finish=length, 0 of 3 outputs parsed, 127s. The - # 3-variable JSON probe ended the same way: 16,384 and 16,381, - # finish=length, 0 of 3, 129s. The gauntlet sends each probe once at - # that budget, with no budget escalation, so it found neither contract - # answering, reported the model "not scorable" at that budget, did not - # reach its whole-scenario probe and derived no card. Gemini 4 Carbon's - # card took JSON because its JSON probes passed after its tool probe ran - # out of budget; here both ran out, so the card kept the tool contract. - # The smoke settled it: on the board's request, which doubles the budget - # on a length finish, both households answered every output through the - # forced tool once the budget allowed, 16 of 16 and 20 of 20, values - # and explanations, so the contract stays. + # reference's FunctionCallingConfig describes mode ANY, naming no + # exception (aistudio.google.com/api-reference/caching). The gauntlet + # settled nothing between the contracts. The API accepted the forced + # call, but on the 3-variable tool probe the model reasoned until the + # 16,384-token budget ran out, nearly all of it on reasoning, and the + # probe ended at length after about two minutes with 0 of 3 outputs + # parsed. The 3-variable JSON probe ended the same way. The gauntlet + # sends each probe once at that budget, with no budget escalation, so it + # found neither contract answering, reported the model "not scorable" at + # that budget, did not reach its whole-scenario probe and derived no + # card. Gemini 4 Carbon's card took JSON because its JSON probes passed + # after its tool probe ran out of budget; here both ran out, so the card + # kept the tool contract. The smokes settled it: in each, both households + # answered every output through the forced tool, 16 of 16 and 20 of 20, + # values and explanations, so the contract stays. # - explanation_chunk_size None: the canonical whole-scenario request # (chunking is closed to new models). # - thinking_budget True: the model reasons by default. Google's thinking # guide lists its default as "On (high)", with levels low, medium, high # and xhigh, and lists "minimal" as not supported on Gemini 4 models # (aistudio.google.com/docs/thinking); no page read says thinking can be - # turned off. The harness sends no thinkingConfig. Google's pricing - # page bills thinking tokens as output - # ("Output price (including thinking tokens)", - # aistudio.google.com/docs/pricing). The model reasoned on every call in - # the record. The harness recorded 16,381 reasoning tokens on each - # gauntlet probe, inside 16,384 completion tokens (the other 3 text), - # so litellm 1.95.0 counts reasoning inside completion_tokens and the - # output rate prices it. The two raw calls, one direct REST + # turned off. The harness sends no thinkingConfig. Google's pricing page + # bills thinking tokens as output ("Output price (including thinking + # tokens)", aistudio.google.com/docs/pricing). The model reasoned on + # every call in the record. The harness recorded nearly all of each + # gauntlet probe's 16,384 completion tokens as reasoning tokens, the rest + # as text, so litellm 1.95.0 counts reasoning inside completion_tokens + # and the output rate prices it. The two raw calls, one direct REST # generateContent request each with no tools, asked for a single filer's # federal income tax before refundable credits, and generateContent - # reported usageMetadata.thoughtsTokenCount on both: 7,575 thought - # tokens and 355 answer tokens (candidatesTokenCount) with no - # thinkingConfig (the default, high), and 1,370 and 350 with - # thinkingLevel low. These are facts about the model; the board sends - # no thinkingConfig, so low is not a treatment it uses. The smoke's four - # requests reported reasoning tokens too, from 13,431 to 32,765 each. + # reported usageMetadata.thoughtsTokenCount on both: about 7,600 thought + # tokens and 350 answer tokens (candidatesTokenCount) with no + # thinkingConfig (the default, high), and about 1,400 and 350 with + # thinkingLevel low. These are facts about the model; the board sends no + # thinkingConfig, so low is not a treatment it uses. Every response in + # both smokes reported reasoning tokens too, most of its completion + # tokens. # - completion_token_cap 65_536: the starting budget, at the escalation - # ceiling, set after the smoke. The smoke ran at the Gemini family's - # 16,384-token starting budget (GEMINI_JSON_MAX_COMPLETION_TOKENS), - # which the board's request doubles on a length finish to 32,768 and - # then 65,536. The 20-output household answered on its first request: - # 14,984 completion tokens, 13,431 of them reasoning, 110s. The - # 16-output household's first request used the whole 16,384-token - # budget (16,381 reasoning tokens, 128s) and its second the whole 32,768 - # (32,765 reasoning tokens, 247s), both finish=length with no outputs; - # its third, at 65,536, answered with 24,444 completion tokens (23,115 - # reasoning) in 187s. A request that runs out is billed in full and its - # output discarded: 49,152 of the smoke's 88,580 completion tokens, an - # estimated $0.75 of the smoke's $1.36 at Google's list rates (the - # households $1.12 and $0.23). Starting at the ceiling leaves no lower - # rung to bill and discard. A request at the ceiling that ends at length - # with outputs missing has no rung left: the harness records those - # outputs as budget_exhausted_at_ceiling and asks for them no more. The - # record does not show whether the model reasons longer when given a - # larger first budget; the smoke at this starting budget will show it - # for the same two households. + # ceiling, set after the first smoke. That smoke ran at the Gemini + # family's 16,384-token starting budget + # (GEMINI_JSON_MAX_COMPLETION_TOKENS), which the board's request doubles + # on a length finish to 32,768 and then 65,536. The 20-output household + # answered on its first request, with about 15,000 completion tokens. The + # 16-output household's first two requests used their whole 16,384- and + # 32,768-token budgets, nearly all on reasoning, and ended at length with + # no usable output; its third, at 65,536, answered with about 24,000 + # completion tokens. Those two truncated requests used about 55% of the + # smoke's completion tokens, an estimated $0.75 of its $1.36 at Google's + # list rates (the households about $1.12 and $0.23). Starting at the + # ceiling removes the two lower rungs. On a length finish the harness + # keeps the values and explanations a response returned. Below the + # ceiling it asks again at the next rung for the outputs still missing; + # at the ceiling no rung is left, so it records each output still missing + # as budget_exhausted_at_ceiling and asks for it no more. The second + # smoke ran the same two households at the 65,536-token start, in one + # round. Each household answered every output, values and explanations, + # on its first response through the forced tool; no response ended at + # length, the harness ran no repair, and no request erred or timed out. + # The 20-output household's response used about 19,000 completion tokens + # and the 16-output household's about 35,000, nearly all reasoning, an + # estimated $0.29 and $0.53 at Google's list rates, $0.83 together. Both + # responses used more tokens than the households' answering responses in + # the first smoke; two households cannot show whether the larger first + # budget or run-to-run variation accounts for that. # - request_timeout_seconds 600, set from the measured output rate as on - # Hydrogen's card. The gauntlet's probes ran at about 129 and 127 - # completion tokens a second (16,384 tokens in 127s and 129s), the raw - # call at the default level at about 138 (7,930 thought and answer - # tokens in 57s), and the smoke's four requests at 128 to 136, the - # 32,768-token one at 132, so the smoke shows no slowdown with length - # up to 32,768 tokens. Every request now asks for the 65,536-token - # ceiling. At 127 to 138 tokens a second one that used all of it would - # take about 475 to 516s, past the thinking class's 300s. No request in - # the record used the whole ceiling (the smoke's request at 65,536 - # stopped at 24,444 tokens), so that is a constant-rate prediction. - # Google's generateContent long-decode guide, read - # 2026-11-14 for the Carbon and Hydrogen cards above and not re-read for - # this one, says the server closes a non-streaming connection after 10 - # minutes and recommends a 20-minute client read timeout, and its option - # table gives 20 minutes per request - # (aistudio.google.com/docs/long-decode?generate-content=true). - # If the server closes at 10 minutes, a client timeout above 600s could - # not help this request, which litellm sends as one non-streaming - # request, with no long-decode continuation. If the table's 20 minutes - # applies instead, 600s still exceeds the about 475 to 516s that those - # rates predict for a request at the ceiling. This departs from - # Hydrogen's test, under which 600s exceeds what the slowest rates in - # its record predict: the slowest rate here, the raw call at level low - # (1,720 thought and answer tokens in 16s, about 105 a second), predicts - # about 624s at the ceiling. The card sets that call aside: it is short, - # so the call's fixed time weighs more in its average, and it ran at a - # thinking level the board does not send. No page read for Neon gives a - # model-specific client timeout, as Google's Gemini 4 Carbon guide does - # for Carbon (hence Carbon's 900s). The margin is smaller than - # Hydrogen's: a request at the ceiling outlasts 600s at any rate below - # about 109 completion tokens a second. + # Hydrogen's card. The gauntlet's probes ran at about 127 and 129 + # completion tokens a second, the raw call at the default level at about + # 138, the first smoke's four requests at about 128 to 136, and the + # second smoke's two at about 127 to 129. Those responses ran from about + # 7,900 to 35,000 completion tokens. Every request now asks for the + # 65,536-token ceiling. A response that used all of it would take about + # 475 to 516s if it ran at those 127 to 138 tokens a second, past the + # thinking class's 300s. No request in the record used the whole ceiling + # (the longest used about 35,000 tokens), so those times hold only if the + # rate stays in that range. Google's generateContent long-decode guide, + # read 2026-11-14 for the Carbon and Hydrogen cards above and not re-read + # for this one, says the server closes a non-streaming connection after + # 10 minutes and recommends a 20-minute client read timeout, and its + # option table gives 20 minutes per request + # (aistudio.google.com/docs/long-decode?generate-content=true). If the + # server closes at 10 minutes, a client timeout above 600s could not help + # this request, which litellm sends as one non-streaming request, with no + # long-decode continuation. If the table's 20 minutes applies instead, + # 600s still exceeds the about 475 to 516s that those rates predict for a + # request at the ceiling. This departs from Hydrogen's test, under which + # 600s exceeds what the slowest rates in its record predict: the slowest + # rate here, the raw call at level low (about 1,700 thought and answer + # tokens at about 105 a second), predicts about 624s at the ceiling. The + # card sets that call aside: it ran at a thinking level the board does + # not send. No page read for Neon gives a model-specific client timeout, + # as Google's Gemini 4 Carbon guide does for Carbon (hence Carbon's + # 900s). The margin is smaller than Hydrogen's: a request at the ceiling + # outlasts 600s at any rate below about 109 completion tokens a second. # - provider_max_completion_tokens 65_536: the Models API's - # outputTokenLimit for the model, whose entry lists generateContent - # among its supported methods (models.get on + # outputTokenLimit for the model, whose entry lists generateContent among + # its supported methods (models.get on # generativelanguage.googleapis.com/v1beta/models/gemini-4-neon, read # 2026-11-19). litellm makes one non-streaming generateContent request. # Google's model page gives the same 65,536 as the model's "default # synchronous" maximum output, and up to 1,048,576 with long decode. The # raw call at the default level asked for maxOutputTokens 65,536 on one # non-streaming generateContent request and returned 200 (it stopped at - # 7,930 thought and answer tokens), which shows only that the value is - # accepted. + # about 7,900 thought and answer tokens), which shows only that the value + # is accepted. # - expected_cost_per_scenario_usd is not set: the gauntlet did not reach - # its whole-scenario probe and derived no cost, and the smoke ran at the - # 16,384-token starting budget, which this card no longer sends. It - # stays unset until the smoke at the new starting budget. + # its whole-scenario probe and derived no cost, and the card takes none + # from the smokes' two households. # Both raw responses name the model as gemini-4-neon, the requested name, - # with no dated snapshot (modelVersion). The gauntlet's rows carry the - # same name, but litellm sets it from the request on this path, so they - # cannot show a re-route. + # with no dated snapshot (modelVersion). The gauntlet's rows carry the same + # name, but litellm sets it from the request on this path, so they cannot + # show a re-route. "gemini/gemini-4-neon": ModelCard( litellm_id="gemini/gemini-4-neon", answer_contract="tool", @@ -1106,73 +1108,70 @@ class ModelCard: completion_token_cap=65_536, provider_max_completion_tokens=65_536, notes=( - "Written 2026-11-19 from Google's documentation, read that day, " - "the day after Google released the model. The Gemini API " - "changelog lists gemini-4-neon as generally available on " - "2026-11-18, on the paid tier; Google's pricing page lists no " - "free tier for it. The card takes Gemini 4 Hydrogen's contract, " - "the board's forced answer tool on the whole-scenario request; " - "Google's model page lists function calling as supported. The " - "harness sends no thinkingConfig, and Google's thinking guide " - "lists the model's default as On (high), with levels low, medium, " - "high and xhigh, as for Hydrogen. The same day the onboarding " - "gauntlet ran under this card, then with a 300s timeout and the " - "Gemini family's 16,384-token starting budget. The " - "Gemini API accepted the forced call, but on the 3-variable tool " - "probe the model reasoned until the 16,384-token budget ran out " - "(16,381 reasoning tokens, finish=length, 0 of 3 outputs parsed, " - "127s), and the 3-variable JSON probe ended the same way (16,381 " - "reasoning tokens, 0 of 3, 129s). The gauntlet sends each probe " - "once at that budget, with no budget escalation, so it found " - "neither contract answering, reported the model not scorable at " - "that budget and derived no card. Both contracts failed the same " - "way, so the row kept the tool contract. Two raw generateContent " - "calls with one plain tax question and no tools returned thought " - "tokens (usageMetadata.thoughtsTokenCount): 7,575 thought tokens " - "and 355 answer tokens with no thinkingConfig, and 1,370 and 350 " - "at thinking level low, which the board does not send. " - "Both name the model as gemini-4-neon, the requested name, with " - "no dated snapshot. A two-household smoke then ran on the board's " - "request at the 16,384-token starting budget, which the request " - "doubles on a length finish to 32,768 and then 65,536. Both " - "households answered every output through the forced tool, 16 of " - "16 and 20 of 20, so the tool contract stays. The 20-output " - "household answered on its first request (14,984 completion " - "tokens, 13,431 of them reasoning, 110s). The 16-output " - "household's first request used the whole 16,384-token budget and " - "its second the whole 32,768, both with no answer (16,381 and " - "32,765 reasoning tokens, 128s and 247s); its third, at 65,536, " - "answered with 24,444 completion tokens (23,115 reasoning) in " - "187s. A request that runs out is billed in full and its output " - "discarded: 49,152 of the smoke's 88,580 completion tokens, an " - "estimated $0.75 of the smoke's $1.36 at Google's list rates. So " - "the card starts at the 65,536-token ceiling (completion_token_cap), " - "with no lower rung to bill and discard; when a request at the " - "ceiling ends at length with outputs missing, the harness records " - "them as budget_exhausted_at_ceiling. A smoke at that starting " - "budget is to come, and the card sets no expected cost per " - "scenario until then. The Models API gives the model an " - "outputTokenLimit of 65,536 and lists generateContent, the method " - "the harness calls with one non-streaming request, among its " - "supported methods; the model page gives the same 65,536 as the " - "default synchronous output. The gauntlet's probes, the raw call " - "at the default level and the smoke's requests ran at about 127 " - "to 138 completion tokens a second, the smoke's 32,768-token " - "request at 132, so a request that used the whole 65,536-token " - "ceiling would take about 475 to 516s at those rates (a request " - "slower than about 109 tokens a second outlasts 600s); no request " - "in the record used the whole ceiling. The card sets a 600s " - "timeout, as Hydrogen's does. The raw call at level low, a short " - "one, averaged about 105 a second, which predicts about 624s at " - "the ceiling; Hydrogen's 600s exceeds what the slowest rates in " - "its record predict, but this card sets that call aside, since " - "its fixed time weighs more and the board does not send its " + "Written 2026-11-19 from Google's documentation, read that day, the day " + "after Google released the model. The Gemini API changelog lists " + "gemini-4-neon as generally available on 2026-11-18, on the paid tier; " + "Google's pricing page lists no free tier for it. The card takes Gemini 4 " + "Hydrogen's contract, the board's forced answer tool on the " + "whole-scenario request; Google's model page lists function calling as " + "supported. The harness sends no thinkingConfig, and Google's thinking " + "guide lists the model's default as On (high), with levels low, medium, " + "high and xhigh, as for Hydrogen. The same day the onboarding gauntlet " + "ran under this card, then with a 300s timeout and the Gemini family's " + "16,384-token starting budget. The Gemini API accepted the forced call, " + "but on the 3-variable tool probe the model reasoned until the " + "16,384-token budget ran out, with 0 of 3 outputs parsed, and the " + "3-variable JSON probe ended the same way. The gauntlet sends each probe " + "once at that budget, with no budget escalation, so it found neither " + "contract answering, reported the model not scorable at that budget and " + "derived no card. Both contracts failed the same way, so the row kept the " + "tool contract. Two raw generateContent calls with one plain tax question " + "and no tools returned thought tokens (usageMetadata.thoughtsTokenCount): " + "about 7,600 thought tokens and 350 answer tokens with no thinkingConfig, " + "and about 1,400 and 350 at thinking level low, which the board does not " + "send. Both name the model as gemini-4-neon, the requested name, with no " + "dated snapshot. A first two-household smoke then ran on the board's " + "request at the 16,384-token starting budget, which the request doubles " + "on a length finish to 32,768 and then 65,536. Both households answered " + "every output through the forced tool, 16 of 16 and 20 of 20, so the tool " + "contract stays. The 20-output household answered on its first request, " + "with about 15,000 completion tokens. The 16-output household's first two " + "requests used their whole 16,384- and 32,768-token budgets and ended at " + "length with no usable output; its third, at 65,536, answered with about " + "24,000. Those two truncated requests used about 55% of the smoke's " + "completion tokens, an estimated $0.75 of its $1.36 at Google's list " + "rates. So the card starts at the 65,536-token ceiling " + "(completion_token_cap), and no request runs at a lower budget. On a " + "length finish the harness keeps the values and explanations a response " + "returned; at the ceiling it records each output still missing as " + "budget_exhausted_at_ceiling and asks for it no more. On 2026-11-21 a " + "second smoke ran the same two households at the 65,536-token start. Each " + "answered every output, values and explanations, on its first response " + "through the forced tool, with no response ending at length and no " + "repair: about 19,000 completion tokens for the 20-output household and " + "about 35,000 for the 16-output one, nearly all reasoning, an estimated " + "$0.29 and $0.53 at Google's list rates. Both used more tokens than the " + "households' answering responses in the first smoke; two households " + "cannot show whether the larger first budget or run-to-run variation " + "accounts for that. The card sets no expected cost per scenario. The " + "Models API gives the model an outputTokenLimit of 65,536 and lists " + "generateContent, the method the harness calls with one non-streaming " + "request, among its supported methods; the model page gives the same " + "65,536 as the default synchronous output. The gauntlet's probes, the raw " + "call at the default level and both smokes' responses ran at about 127 to " + "138 completion tokens a second, on responses of about 7,900 to 35,000 " + "tokens. No request in the record used the whole 65,536-token ceiling; " + "one that did would take about 475 to 516s at those rates, and would " + "outlast 600s at any rate below about 109 tokens a second. The card sets " + "a 600s timeout, as Hydrogen's does. The raw call at level low averaged " + "about 105 tokens a second, which predicts about 624s at the ceiling; " + "Hydrogen's 600s exceeds what the slowest rates in its record predict, " + "but this card sets that call aside, since the board does not send its " "thinking level. Google's generateContent long-decode guide (read " - "2026-11-14 for the Carbon and Hydrogen cards, not re-read for " - "Neon) says the server closes a non-streaming call after 10 " - "minutes. The same guide recommends a 20-minute client read " - "timeout, and its option table gives 20 minutes per request. " - "Google lists $3/$15 per 1M." + "2026-11-14 for the Carbon and Hydrogen cards, not re-read for Neon) says " + "the server closes a non-streaming call after 10 minutes. The same guide " + "recommends a 20-minute client read timeout, and its option table gives " + "20 minutes per request. Google lists $3/$15 per 1M." ), ), "openrouter/z-ai/glm-5.3": ModelCard( diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index 05306821..ff0b6455 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3863,16 +3863,18 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( ): """Gemini 4 Neon's card, written before the model's onboarding, takes Gemini 4 Hydrogen's contract, the board's forced answer tool; Google's - model page lists function calling as supported, and in the two-household - smoke both households answered every output through it. The request - carries no reasoning parameter, so the model reasons at Google's default, - high per Google's thinking guide, as Hydrogen does. It takes the card's - 600s timeout, set from the measured output rate for a request at the - 65,536-token ceiling, and the card's own starting budget, that ceiling: - in the smoke, at the Gemini family's 16,384, one household's first two - requests ran out of budget and were billed and discarded. The first - request, an answers-only repair request and the run fingerprint all - start at 65,536, so a length finish has no rung left.""" + model page lists function calling as supported, and in both + two-household smokes every household answered every output through it. + The request carries no reasoning parameter, so the model reasons at + Google's default, high per Google's thinking guide, as Hydrogen does. It + takes the card's 600s timeout, set from the measured output rate for a + request at the 65,536-token ceiling, and the card's own starting budget, + that ceiling: in the first smoke, at the Gemini family's 16,384, one + household's first two requests ran out of budget with no usable output. + The first request, an answers-only repair request and + _initial_completion_budget_tokens, which the supervisor's and the resume + sidecar's fingerprints both call, all give 65,536, so a length finish + has no rung left.""" from policybench.completion_budget import next_completion_budget from policybench.eval_no_tools import ( ANSWER_FUNCTION_NAME, @@ -3971,8 +3973,9 @@ def test_gemini_ids_without_a_card_budget_keep_the_family_starting_budget( ): """A gemini/ card's completion_token_cap leaves every other gemini/ id where it was: 16,384 tokens for 1, 3, 16 and 20 outputs, with and without - explanations (the board's requests and answers-only ones), and in the run - fingerprint.""" + explanations (the board's requests and answers-only ones), in the request + controls and from _initial_completion_budget_tokens, which the + supervisor's and the resume sidecar's fingerprints both call.""" from policybench.eval_no_tools import _initial_completion_budget_tokens for variable_count in (1, 3, 16, 20): @@ -4117,8 +4120,9 @@ def test_a_gemini_card_starting_at_its_ceiling_never_escalates( mock_completion, mini_scenario, monkeypatch ): """A first request at the ceiling is the only rung: a length finish with - the outputs missing is billed once, then those outputs are recorded as - budget_exhausted_at_ceiling with no repair request.""" + the outputs missing ends after one request, with no escalation and no + repair request, and those outputs are recorded as + budget_exhausted_at_ceiling.""" from policybench.model_cards import MODEL_CARDS, ModelCard model_id = "gemini/gemini-capped-test" From 6b6c527eb87b48530382a6399c8f52283fff01ae Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 21 Nov 2026 14:18:41 +0100 Subject: [PATCH 18/19] State what Gemini 4 Neon's card and tests show about ceiling records and coverage. The card comment and notes now say the harness keeps a length-finished response's usable values and explanations, with valid cells from earlier requests, and name the two records it writes at the ceiling: failure source budget_exhausted_at_ceiling for an output still missing its value, and "budget_exhausted_at_ceiling (explanation)" in the error for one that has its value but lacks a usable explanation. The contract bullet says the forced tool worked for both households in each smoke, with no comparison to the JSON contract. Two test docstrings now say the request controls are checked with and without explanations and the initial-budget helper with explanations, and that the 600s timeout comes from extrapolating measured rates to 65,536 tokens. Comments and docstrings only. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 26 ++++++++++++++++---------- tests/test_eval_no_tools.py | 15 ++++++++------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index 9977c1fd..a6266334 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -1001,9 +1001,9 @@ class ModelCard: # that budget, did not reach its whole-scenario probe and derived no # card. Gemini 4 Carbon's card took JSON because its JSON probes passed # after its tool probe ran out of budget; here both ran out, so the card - # kept the tool contract. The smokes settled it: in each, both households - # answered every output through the forced tool, 16 of 16 and 20 of 20, - # values and explanations, so the contract stays. + # kept the tool contract. The forced tool worked for both households in + # each smoke: each household answered every output through it, 16 of 16 + # and 20 of 20, values and explanations, so the contract stays. # - explanation_chunk_size None: the canonical whole-scenario request # (chunking is closed to new models). # - thinking_budget True: the model reasons by default. Google's thinking @@ -1039,10 +1039,13 @@ class ModelCard: # smoke's completion tokens, an estimated $0.75 of its $1.36 at Google's # list rates (the households about $1.12 and $0.23). Starting at the # ceiling removes the two lower rungs. On a length finish the harness - # keeps the values and explanations a response returned. Below the - # ceiling it asks again at the next rung for the outputs still missing; - # at the ceiling no rung is left, so it records each output still missing - # as budget_exhausted_at_ceiling and asks for it no more. The second + # keeps the usable values and explanations a response returned, with + # valid cells from earlier requests. Below the ceiling it asks again at + # the next rung for the outputs still missing. At the ceiling no rung is + # left, so it asks for them no more. An output still missing its value + # gets failure source budget_exhausted_at_ceiling. One that has its value + # but lacks a usable explanation keeps the value, and the harness adds + # "budget_exhausted_at_ceiling (explanation)" to the error. The second # smoke ran the same two households at the 65,536-token start, in one # round. Each household answered every output, values and explanations, # on its first response through the forced tool; no response ended at @@ -1142,9 +1145,12 @@ class ModelCard: "completion tokens, an estimated $0.75 of its $1.36 at Google's list " "rates. So the card starts at the 65,536-token ceiling " "(completion_token_cap), and no request runs at a lower budget. On a " - "length finish the harness keeps the values and explanations a response " - "returned; at the ceiling it records each output still missing as " - "budget_exhausted_at_ceiling and asks for it no more. On 2026-11-21 a " + "length finish the harness keeps the usable values and explanations a " + "response returned, with valid cells from earlier requests. At the ceiling " + "it asks no more for the outputs still missing. One missing its value gets " + "failure source budget_exhausted_at_ceiling; one that has its value but " + "lacks a usable explanation keeps the value, and the harness adds " + "budget_exhausted_at_ceiling (explanation) to the error. On 2026-11-21 a " "second smoke ran the same two households at the 65,536-token start. Each " "answered every output, values and explanations, on its first response " "through the forced tool, with no response ending at length and no " diff --git a/tests/test_eval_no_tools.py b/tests/test_eval_no_tools.py index ff0b6455..681ae2eb 100644 --- a/tests/test_eval_no_tools.py +++ b/tests/test_eval_no_tools.py @@ -3867,9 +3867,9 @@ def test_gemini_4_neon_request_forces_the_answer_tool_and_sets_no_reasoning( two-household smokes every household answered every output through it. The request carries no reasoning parameter, so the model reasons at Google's default, high per Google's thinking guide, as Hydrogen does. It - takes the card's 600s timeout, set from the measured output rate for a - request at the 65,536-token ceiling, and the card's own starting budget, - that ceiling: in the first smoke, at the Gemini family's 16,384, one + takes the card's 600s timeout, set by extrapolating measured rates to + 65,536 tokens, and the card's own starting budget, the 65,536-token + ceiling: in the first smoke, at the Gemini family's 16,384, one household's first two requests ran out of budget with no usable output. The first request, an answers-only repair request and _initial_completion_budget_tokens, which the supervisor's and the resume @@ -3972,10 +3972,11 @@ def test_gemini_ids_without_a_card_budget_keep_the_family_starting_budget( model_id, ): """A gemini/ card's completion_token_cap leaves every other gemini/ id - where it was: 16,384 tokens for 1, 3, 16 and 20 outputs, with and without - explanations (the board's requests and answers-only ones), in the request - controls and from _initial_completion_budget_tokens, which the - supervisor's and the resume sidecar's fingerprints both call.""" + where it was: 16,384 tokens for 1, 3, 16 and 20 outputs, in the request + controls with and without explanations (the board's requests and + answers-only ones), and in the initial-budget helper with explanations. + The supervisor's and the resume sidecar's fingerprints both call that + helper, _initial_completion_budget_tokens.""" from policybench.eval_no_tools import _initial_completion_budget_tokens for variable_count in (1, 3, 16, 20): From 6aa35257bc812f0e88da5a61e3324d1638de0b3f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 21 Nov 2026 14:28:19 +0100 Subject: [PATCH 19/19] Scope Gemini 4 Neon's ceiling sentences to a request that ends at length. The card comment and notes said the harness asks no more for missing outputs at the ceiling. It stops only when a request at the ceiling ends at length; after another finish, repair requests still ask again. The notes and comment now say so, matching the PR description. Comment and the Neon notes string only; no executable code changes. Co-Authored-By: Claude Opus 5.5 --- policybench/model_cards.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/policybench/model_cards.py b/policybench/model_cards.py index a6266334..35f2ebca 100644 --- a/policybench/model_cards.py +++ b/policybench/model_cards.py @@ -1041,10 +1041,11 @@ class ModelCard: # ceiling removes the two lower rungs. On a length finish the harness # keeps the usable values and explanations a response returned, with # valid cells from earlier requests. Below the ceiling it asks again at - # the next rung for the outputs still missing. At the ceiling no rung is - # left, so it asks for them no more. An output still missing its value - # gets failure source budget_exhausted_at_ceiling. One that has its value - # but lacks a usable explanation keeps the value, and the harness adds + # the next rung for the outputs still missing. When a request at the + # ceiling ends at length, no rung is left, so it asks for them no more. + # An output still missing its value gets failure source + # budget_exhausted_at_ceiling. One that has its value but lacks a usable + # explanation keeps the value, and the harness adds # "budget_exhausted_at_ceiling (explanation)" to the error. The second # smoke ran the same two households at the 65,536-token start, in one # round. Each household answered every output, values and explanations, @@ -1146,10 +1147,11 @@ class ModelCard: "rates. So the card starts at the 65,536-token ceiling " "(completion_token_cap), and no request runs at a lower budget. On a " "length finish the harness keeps the usable values and explanations a " - "response returned, with valid cells from earlier requests. At the ceiling " - "it asks no more for the outputs still missing. One missing its value gets " - "failure source budget_exhausted_at_ceiling; one that has its value but " - "lacks a usable explanation keeps the value, and the harness adds " + "response returned, with valid cells from earlier requests. When a request " + "at the ceiling ends at length, the harness asks no more for the outputs " + "still missing. One missing its value gets failure source " + "budget_exhausted_at_ceiling; one that has its value but lacks a usable " + "explanation keeps the value, and the harness adds " "budget_exhausted_at_ceiling (explanation) to the error. On 2026-11-21 a " "second smoke ran the same two households at the 65,536-token start. Each " "answered every output, values and explanations, on its first response "