You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): set the Jev context window from the model data #5209
CONST_AI_JEV_CONTEXT_WINDOW is 262_144 (src/devops_cli/config/constants.py:2899). But genai-prices gives context_window=32000 for typesafe/jev-1.14 (genai_prices/data.py:26216). CONST_ROADMAP_JEV_MAX_DIFF_TOKENS is a fourth of the constant (constants.py:2919). So the completeness check (#4308) can send a diff that is larger than the window of the model.
Proposed Solution & Architectural Design
Read the window from genai-prices for CONST_AI_JEV_MODEL, in place of the constant. Make the diff cap from that value. The completeness check then skips a draft whose diff holds more than 8,000 model tokens.
AI & Agentic Review Pipeline (src/devops_cli/ai/jev.py, the Jev limits).
Existing Tool Considered
genai-prices, which is already a dependency. Cost: about 0.1M model tokens and 1 hour.
Acceptance Criteria
uv run devops ci fail-to-pass --base origin/main shows a test that fails on main and passes on the branch: the Jev window is equal to the genai-prices value for CONST_AI_JEV_MODEL.
Related: fix(k8s): set the verification window in the example ConfigMap #3911, which asks for a different change. Both set a context window for a specific task, but #3911 sets a value in a ConfigMap for the verification task while the candidate reads the Jev model window from genai-prices.
A possible cause of the completeness no-go (2026-11-12)
The decision-model study found that this error may explain part of the no-go of stage_ready.completeness (#4320: 47 cases, 43% recall, 28% false holds).
CONST_ROADMAP_JEV_MAX_DIFF_TOKENS is CONST_AI_JEV_CONTEXT_WINDOW // 4, so 65,536 tokens (src/devops_cli/config/constants.py:2860 on origin/main 5645b63). That cap is more than 2 times the window of 32,000 tokens of typesafe/jev-1.14.
So the pilot could send a diff that does not fit the window. The result "Jev does not read a long diff" can then be partly a window overflow, not only a limit of the model.
The study did not count how many of the 47 cases had a diff over the window.
Recommendation: fix this item before #4317 redoes the completeness builder, and count the pilot cases with a diff over the window. The point stays off until then.
"262,144 tokens ... Requests with more than about 32,000 bytes of text ... run in TypeSafe's long-context mode, which TypeSafe says is slower and less accurate" (https://openrouter.ai/docs/guides/community/jev, FAQ)
The shared cause: SystemOneModel reports the provider system-one, which genai-prices 0.2.3 does not know. An offline lookup (sockets blocked) gives None for the window with provider system-one and a gateway URL, and also for the model name alone. With provider openrouter, it gives 32000. The price lookup fails in the same way (#4296). So the proposed fix of this item ("Read the window from genai-prices for CONST_AI_JEV_MODEL") gets None unless it names the provider. SystemOneModel also drops usage.cost and the response id that OpenRouter returns in every response.
Change to this item:
Read the window with provider openrouter, or set the profile context_window from genai-prices for that provider.
Activity
dan-petty commentedon Nov 12, 2026
Both set a context window for a specific task, but #3911 sets a value in a ConfigMap for the verification task while the candidate reads the Jev model window from genai-prices.dan-petty commentedon Nov 12, 2026
A possible cause of the completeness no-go (2026-11-12)
The decision-model study found that this error may explain part of the no-go of
stage_ready.completeness(#4320: 47 cases, 43% recall, 28% false holds).CONST_ROADMAP_JEV_MAX_DIFF_TOKENSisCONST_AI_JEV_CONTEXT_WINDOW // 4, so 65,536 tokens (src/devops_cli/config/constants.py:2860on origin/main 5645b63). That cap is more than 2 times the window of 32,000 tokens of typesafe/jev-1.14.Recommendation: fix this item before #4317 redoes the completeness builder, and count the pilot cases with a diff over the window. The point stays
offuntil then.dan-petty commentedon Nov 12, 2026
Scope note from the decision-model docs review of 2026-11-12. The owner approved it on 2026-11-12. One cause gives this item and #4296.
The documents say:
The shared cause:
SystemOneModelreports the providersystem-one, which genai-prices 0.2.3 does not know. An offline lookup (sockets blocked) givesNonefor the window with providersystem-oneand a gateway URL, and also for the model name alone. With provideropenrouter, it gives 32000. The price lookup fails in the same way (#4296). So the proposed fix of this item ("Read the window from genai-prices forCONST_AI_JEV_MODEL") getsNoneunless it names the provider.SystemOneModelalso dropsusage.costand the responseidthat OpenRouter returns in every response.Change to this item:
openrouter, or set the profilecontext_windowfrom genai-prices for that provider.fix(ai): read the Jev window without process-wide state (#5209)
devops-cli-service commentedon Nov 15, 2026
Released in v0.152.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.152.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 12:41 UTC