mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5771] [CLOSED] fix(connections): read NanoGPT model limits from its detailed catalog #6926
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6926
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5771
Author: @SonaGat3
Created: 9/2/2026
Status: ❌ Closed
Base:
staging← Head:staging📝 Commits (1)
a17a80cfix(connections): read NanoGPT model limits from its detailed catalog📊 Changes
2 files changed (+3 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/shared/src/constants/providers.ts(+2 -1)📄 Description
Linked issue
Closes #5770
Why this change
Context: 0andMax Output: 0for most models, so Max Context Window is never auto-filled and users have to guess the limit by hand. Oninception/mercury-2.5-previewthe real window is 260K, and a user who typed 128K was silently losing half of it.model-lists.tsalready declares the intent —nanogpt: []with the comment "models fetched dynamically via API" — but the request Marinara sends is NanoGPT's plain catalog, whose entries carry onlyid,object,createdandowned_by. There are no limits in that response to read.What changed
packages/shared/src/constants/providers.ts: NanoGPT'smodelsEndpointnow requests the detailed catalog (/models?detailed=true). No other provider is affected.readOpenAICompatibleModelLimitsinconnections.routes.tsalready readscontext_lengthandmax_output_tokens, which are exactly the fields the detailed catalog adds.name, so the model dropdown stops rendering the id twice (inception/mercury-2.5-preview (inception/mercury-2.5-preview)becomesMercury 2.5 Preview).[Unreleased] → Fixed.Measured, on the current catalog of 622 models: 609 now resolve a context window and 597 an output limit, against none before.
Notes for reviewers:
modelsEndpointis new for this file: every other provider uses a bare path. Both consumers concatenate the value onto a base URL with trailing slashes stripped, and both produce a valid URL. Happy to move it to a dedicated field if the convention matters more than the diff size.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Verified in a desktop browser against a real NanoGPT connection, on this branch:
inception/mercury-2.5-previewnow reportsContext: 260KandMax Output: 65536, where it previously reportedContext: 0 Max Output: 0.Mercury 2.5 Previewinstead of repeating the id twice.pnpm checkpasses locally on this branch (impeccable, localization, format, lint, e2e types, build).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.