mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #781] [Issue]: OpenRouter model list displays garbled characters #375
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#375
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 @ShivaThomas on GitHub (May 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/781
Originally assigned to: @Promansis on GitHub.
Summary
Can't retrieve the list of model from OpenRouter
Expected behavior
List of model should be displayed
Actual behavior
Steps to reproduce
Environment
3d4a119Logs, screenshots, or video
Failed to fetch models: ���ݎ�6���M�Ʋ,�7�(0�"�)�.r�*-Q2a�TEʞ�
�}��^��琒f��3���bƖ�?���ȟ���-����[zT�u�J���u�|U�ڟ�~F��^B��<�"֢λ4P�j�����hF�����<�h�b�&k!��;W��%ym ����5�� Xz��+F �p>���(^�tR��p%�����-�8GTF~nM}z�f�����L̎$��+.��L�7k����UDզ� �%c)���+x]�� �� $8�E�"�1ZIR��.�>��4IU��dmL��AP j2UC�Additional context
Same issue as #646
I tried the following workaround, without success:
Manually set a model name: deepseek/deepseek-v4-pro
Clicked on "Test Connection" and "Send Test Message"
OpenAI chat() non-stream response: Failed to parse JSON response (Unexpected token '', "��"... is not valid JSON). Body starts with: ���R�.���B0��Bb��Bb��Bb��Bb��Bb��Bb��Bb��Bb���TAn�0�ʆ�\dW����I9E��F\Y�)R�Rv�@@�=�� ��.��v��I�p8;;K�Ih%�b���r<�����h���7d�����ò��G�?�D��{���
Template check
@LukaTheHero commented on GitHub (May 13, 2026):
Couldn't reproduce on my end. The garbled body starts with
0x1F 0x8Bwhich is the gzip magic header — so the response is staying gzip-compressed when our server reads it. Node's built-in fetch (undici) is supposed to auto-decompress Content-Encoding, and it does on my install even when I mimic our exact request path. So the trigger is something in your environment.To narrow this down, could you share:
node --versionfrom where you launch Marinara.Any proxy / VPN active? Even if you've already toggled VPN, please run
env | grep -i proxyand paste the output, plus the name of your VPN client if any.From the same machine:
curl -sv https://openrouter.ai/api/v1/models -o /tmp/or.bin 2>&1 | head -30— paste the response headers section. Thenfile /tmp/or.binand paste that too. That tells us what compression your network path actually negotiates.Save this as
test-fetch.mjsand runnode test-fetch.mjswith the same Node you use to start Marinara:If the first 4 bytes are
1f8b, undici isn't auto-decompressing for your install — that's the actual bug to fix.Once I have those, I can either fix the root cause or ship a defensive workaround that decompresses ourselves.
@grinmaul commented on GitHub (May 13, 2026):
node --version
v26.1.0
curl -sv https://openrouter.ai/api/v1/models -o /tmp/or.bin 2>&1 | head -30
} [5 bytes data]
} [1568 bytes data]
{ [5 bytes data]
{ [1210 bytes data]
{ [1 bytes data]
{ [19 bytes data]
{ [1834 bytes data]
{ [78 bytes data]
{ [52 bytes data]
node test-fetch.mjs
content-encoding: gzip
first 4 bytes hex: 7b226461
first 60 chars: {"data":[{"id":"anthropic/claude-opus-4.7-fast","canonical_s
@LukaTheHero commented on GitHub (May 13, 2026):
I'll get back to you the second I'm home. But I believe another dev reproduced and solved the issue already
@grinmaul commented on GitHub (May 13, 2026):
Not sure if it matters, my problem is with Venice api, i don't have openrouter, but figured its the same issue since my responses from Venice look the same as the above.
@ShivaThomas commented on GitHub (May 13, 2026):
Wow, that fast investigation! 🥰 Thank you @Promansis and @grinmaul!
/tmp/or.bin: JSON data
@ShivaThomas commented on GitHub (May 13, 2026):
Please note that once I manually paste a model id, as illustrated under "Additional context" in my first message, the connection works during RP. It's only the Connection screen and the listing of models that have this issue.
@Trijo56 commented on GitHub (May 14, 2026):
I put in my api and model and it won't recognize the msg output when I try sending a msg (model is openrouter/free btw)