Skip to content

🪲 BUG-#16: Fill in missing context-window entries - #35

Merged
FernandoCelmer merged 4 commits into
masterfrom
feature/16
Aug 15, 2026
Merged

🪲 BUG-#16: Fill in missing context-window entries#35
FernandoCelmer merged 4 commits into
masterfrom
feature/16

Conversation

@FernandoCelmer

@FernandoCelmer FernandoCelmer commented Aug 15, 2026

Copy link
Copy Markdown
Member

Description

Fills in missing context-window entries and fixes case-insensitive model matching (issue #16). Adds every model family shipped in templates/ (Gemini, Grok, Groq, Kimi, DeepSeek, Qwen, NVIDIA/Together Llama, o3/o4). Matching is now case-insensitive to handle vendors with inconsistent casing (e.g. Together AI's Llama-3.3-70B-Instruct-Turbo). Lowers DEFAULT_CONTEXT_WINDOW to 32_000 so unrecognized future models compact early rather than risking provider rejection.

Motivation and Context

Closes #16. _CONTEXT_WINDOWS only covered 10 model families; all others silently fell back to 128_000 — causing Gemini (1M real window) to compact far too early and smaller models to risk late compaction and provider rejection. Case-sensitive matching also missed mixed-case vendor model IDs.

Types of changes

  • Bug fix
  • New feature
  • Documentation

Checklist

  • Self-review done
  • Tests added
  • CHANGELOG updated
  • Docs updated

@FernandoCelmer FernandoCelmer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage expansion and case-insensitive matching are correct and well-tested. The test that asserts every templates/ default model resolves to a non-default entry is a strong safety net. One concern about the DEFAULT_CONTEXT_WINDOW reduction found below.

Comment thread pycodeloop/core/context_window.py
@FernandoCelmer FernandoCelmer added the bug Something isn't working label Aug 15, 2026
DEFAULT_CONTEXT_WINDOW had been lowered to 32_000 alongside adding
the expanded model table, silently making any deployment on an
unlisted model (a private/future model, a vendor-prefixed variant,
a fine-tune) compact 4x more often than before with no warning.
Restored the previous 128_000 default — still conservative relative
to the smallest window in the table, just not a regression for
existing unlisted-model setups.
@FernandoCelmer
FernandoCelmer merged commit b2e6962 into master Aug 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context window table missing many current models (Gemini, DeepSeek, Grok, Groq, Llama 3.x, Qwen, Kimi)

1 participant