Repository navigation
fix(provider-registry): add correct contextLength to a since-removed keyless provider's models - #4184
Conversation
- deepseek_v4: 200k (not default 128k) - GPT_5_4: 400k - claude_*: 200k - gemini_*: 1M - Added defaultContextLength: 200000 for unknown models
There was a problem hiding this comment.
Code Review
This pull request configures context lengths for the [removed-provider] provider and its individual models, introducing a provider-wide defaultContextLength of 200,000. Feedback highlights that this default is unsafe for models like GPT_4o (which has a 128k limit) and unknown passthrough models, suggesting it be lowered to 128,000. Additionally, the reviewer notes that changing production code under open-sse/ requires adding or updating corresponding tests to comply with the repository style guide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| baseUrls: ["https://theoldllm.vercel.app/api/chatgpt"], | ||
| authType: "none", | ||
| authHeader: "none", | ||
| defaultContextLength: 200000, |
There was a problem hiding this comment.
Setting defaultContextLength to 200000 as a provider-wide fallback is unsafe. Standard models like GPT_4o (which has a maximum context window of 128k/131,072 tokens) will inherit this 200k limit, leading to potential context overflow errors when downstream clients attempt to send payloads up to 200k.\n\nAdditionally, because passthroughModels is enabled, any unknown models requested through this provider will also default to 200k, which exceeds the limits of many common models.\n\nIt is highly recommended to set defaultContextLength to 128000 (128k) as a safe fallback, and explicitly define the larger context windows on the specific models that support them.
| defaultContextLength: 200000, | |
| defaultContextLength: 128000, |
| defaultContextLength: 200000, | ||
| models: [ | ||
| { id: "GPT_5_4", name: "GPT-5.4 (The Old LLM 🆓)" }, | ||
| { id: "GPT_5_4", name: "GPT-5.4 (The Old LLM 🆓)", contextLength: 400000 }, |
There was a problem hiding this comment.
According to the Repository Style Guide (Rule 9), changing production code under open-sse/ requires including tests. Please ensure that appropriate unit or integration tests are added or updated in the tests/ directory to cover these new context length configurations.
References
- Always include tests when changing production code (src/, open-sse/, electron/, bin/).
…r-inference#4184) Adds a regression test asserting the entry-level defaultContextLength (200000) and the per-model contextLength overrides (GPT-5.4 400K, Gemini 3 Flash/Pro 1M, Claude/DeepSeek 200K), plus the resolved context window for the explicit-override models — which resolved to null before this fix, so the test fails without it. Satisfies the PR Test Policy gate (production registry change needs a test). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
d4e92db
into
cheaper-inference:release/v3.8.29
|
Merged into |
Content removed on 2026-09-02 at the written request of the operator of the third-party service this change concerned. The code it introduced or modified was removed from OmniRoute in #12440. Original title and description are retained privately by the maintainer.