mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1031] [Issue]: OpenRouter model context metadata is discarded #503
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#503
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?
Originally created by @cha1latte on GitHub (May 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1031
Originally assigned to: @cha1latte on GitHub.
Summary
OpenRouter model metadata such as
context_lengthandtop_provider.max_completion_tokensis discarded, so models likegoogle/gemini-3.5-flashcan fall back to 128k context even when OpenRouter reports about 1M context.Source Discord thread: https://discord.com/channels/1417099416812392641/1480379733173731458/threads/1506579703404953670
Reporter: 로도
Expected behavior
When remote model metadata includes context and output limits, Marinara should preserve those values and expose/use them in the connection model picker and generation settings.
Actual behavior
The reporter says OpenRouter returns
context_length: 1048576andtop_provider.max_completion_tokens: 65536, but Marinara normalizes remote models down to{ id, name }and maps client models as{ id, name, context: 0, maxOutput: 0 }. The affected chat can save/use 128k instead of the model's larger context. Manually setting the connection to1000000is only a workaround, and preset parameters can still clamp generation.Steps to reproduce
google/gemini-3.5-flash./api/v1/modelsis not preserved in the picker/settings.maxContextparameters and observe generation clamped below the model's real context.Marinara Engine version
1.60
Install type
Other
OS + version
Windows 11
Browser or app shell
Not specified.
Screenshots or video
Not a visual/UI issue.
Logs
Reporter-provided metadata:
Additional context
Reporter notes possible affected areas:
context_lengthortop_provider.context_lengthas context.top_provider.max_completion_tokensas max output.maxContextanduseMaxContext.Template check