Skip to content

fix(provider-registry): add correct contextLength to a since-removed keyless provider's models - #4184

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.29from
herjarsa:fix/theoldllm-context-length
Jun 18, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.29from
herjarsa:fix/theoldllm-context-length

Conversation

@herjarsa

@herjarsa herjarsa commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

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.

- deepseek_v4: 200k (not default 128k)
- GPT_5_4: 400k
- claude_*: 200k
- gemini_*: 1M
- Added defaultContextLength: 200000 for unknown models
@herjarsa
herjarsa requested a review from diegosouzapw as a code owner June 18, 2026 16:15

@gemini-code-assist gemini-code-assist Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

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.

Suggested change
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 },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. Always include tests when changing production code (src/, open-sse/, electron/, bin/).

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.29 June 18, 2026 16:46
…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>
@diegosouzapw
diegosouzapw merged commit d4e92db into cheaper-inference:release/v3.8.29 Jun 18, 2026
3 checks passed
@diegosouzapw

diegosouzapw commented Jun 18, 2026 •

Copy link
Copy Markdown
Collaborator

Merged into release/v3.8.29 🎉 Thanks @herjarsa — the models were reporting no context window at all (resolved to null), so these are a real correctness fix. On review we added a small regression test ([provider removed at its operator's request]-context-length-4184.test.ts) asserting the entry-level defaultContextLength + the per-model overrides and the resolved window for the explicit models, which satisfies the PR Test Policy gate. Shipping in the next release. 🙏

@diegosouzapw diegosouzapw mentioned this pull request Jun 19, 2026
@diegosouzapw diegosouzapw changed the title fix(provider-registry): add correct contextLength to theoldllm models fix(provider-registry): add correct contextLength to a since-removed keyless provider's models Sep 2, 2026
@cheaper-inference cheaper-inference locked as resolved and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants