Skip to content

fix(ai): Set the Jev window from the model data - #5804

Merged
dan-petty merged 2 commits into
mainfrom
fix/5209-set-the-jev-window-from-the-model-data
Nov 15, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/5209-set-the-jev-window-from-the-model-data

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

CONST_AI_JEV_CONTEXT_WINDOW was 262,144, but genai-prices gives context_window 32000 for typesafe/jev-1.14. The completeness check capped the diff at a fourth of the constant, so it could send a diff twice the window of the model. New functions context_window and max_diff_tokens in ai/jev.py read the window from genai-prices and fall back to the constant only when the data names no window. The completeness check takes its cap from max_diff_tokens, the constant CONST_ROADMAP_JEV_MAX_DIFF_TOKENS is removed, and the two change-1653 eval diffs are trimmed under the new 8000-token cap.

Closes #5209

Change: openspec/changes/archive/2026-11-15-5209-set-the-jev-window-from-the-model-data/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 15, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 15, 2026 08:23
@dan-petty
dan-petty merged commit 5ba1a5c into main Nov 15, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/5209-set-the-jev-window-from-the-model-data branch November 15, 2026 12:19
dan-petty pushed a commit that referenced this pull request Nov 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.152.0](v0.151.0...v0.152.0)
(2026-11-15)


### Features

* **cli:** fail a hidden title that ships runtime code
([#5808](#5808))
([22b36c6](22b36c6))
* **docs:** Check the ASD-STE100 rules with Vale
([#5796](#5796))
([79920b1](79920b1)),
closes [#5157](#5157)
* **roadmap:** scaffold makes, resumes or adopts the item branch
([#5795](#5795))
([c377e5a](c377e5a)),
closes [#5499](#5499)


### Bug Fixes

* **ai:** retry a reset in the answer read of a pydantic-ai agent run
([#5811](#5811))
([43022d0](43022d0))
* **ai:** Set the Jev window from the model data
([#5804](#5804))
([5ba1a5c](5ba1a5c))
* **infra:** Resolve a relative repos base dir from the main worktree
([#5801](#5801))
([6bd905a](6bd905a))
* **monitoring:** Start Grafana without the renderer token
([#5803](#5803))
([dcb6840](dcb6840))
* **pr:** Check the scope in a pr create dry run
([#5797](#5797))
([3d5a4d5](3d5a4d5))
* **security:** Judge KSV-0121 with a dated ignore entry
([#5800](#5800))
([7981f47](7981f47)),
closes [#5793](#5793)
* **telemetry:** Send the group body histogram point
([#5798](#5798))
([515689d](515689d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ai): set the Jev context window from the model data

1 participant