Skip to content

Conversation

@yujonglee
Copy link

Resolves #466

@github-actions
Copy link

github-actions bot commented Dec 20, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@yujonglee
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@yujonglee
Copy link
Author

yujonglee commented Dec 20, 2025

Screenshot 2025-12-20 at 12 34 30 PM

Motivation: If LMStudioClient accept custom fetch, we(Hyprnote) don't have to do fetch call in the webview, therefore no CORS enabling needed.

@github-actions github-actions bot added the CLA signed Indicates if all contributors have signed the CLA label Dec 20, 2025
@ryan-the-crayon
Copy link
Collaborator

Thanks for the PR. However, lmstudio.js communicates with LM Studio via WebSocket for better resources management and better interactivity purposes. It appears this PR only replaced the fetch used for server discovery. We do enforce CORS even on our WebSocket connections. Specifically, if CORS is not turned on, we reject connections that have an "origin" header. So your backend will need to be able to proxy WebScoket connections as well.

If your environment can only make use of regular http requests, I would recommend using our Open AI compatible endpoints here: https://lmstudio.ai/docs/developer/openai-compat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA signed Indicates if all contributors have signed the CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accept custom fetch in LMStudioClient

2 participants