lmstudio-ai / lmstudio-ai/docs
LMStudio v0.3.29 (and probably upwards) - HowTo enable LLM access to the internet via the js-code-sandbox plugin
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 172
- Forks
- 128
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
As no guide/hint whatsoever exists anywhere about using the js-code-sandbox embedded plugin to grant an LLM access to the internet - knowing that that plugin can execute JavaScript code including accessing an URL/parsing a _current_ webpage, I've written a short explanatory for the innocent user (who is not a programmer who knows what to fiddle with, that is); the "guide" is larger and posted on Medium, but the core is as follows. May it be of good use to you.
_Deno_ can be sent JavaScript code for various tasks (see its documentation), and execute it; however, specific permissions must be granted for the respective procedures, like file system access, internet access, etc.
In Windows:
Go to the folder:
C:\Users\[your user name]\.cache\lm-studio\extensions\plugins\lmstudio\js-code-sandbox\.lmstudio
Edit the file:
**production.js**
- search for “--allow” (that’s two minus - signs, short dashes)
- those are the permissions of _Deno_
- by default, internet access is off: “--deny-net”
- change it to “**--allow-net**”
- and put that line just below “run”, as the first item in the list of permissions for _Deno_
Then, Save that file, production.js, where it is (Ctrl-S or whatever key combo for saving the file).
Now, go up 1 level, and enter the folder js-code-sandbox\src
There, Edit the file:
**toolsProvider.ts**
- do exactly the same as for the production.js file above, changing the permission to access the “net” to **“--allow-net”**, and saving the file **toolsProvider.ts** as well.
Now. Make an LLM call that plugin that now is granting access to the internet, for finding/retrieving current information.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the issue's proposed steps alongside the Deno permission documentation, especially the --deny-net and --allow-net behavior. Confirm the paths and filenames production.js and src/toolsProvider.ts for the stated LM Studio version, then determine the appropriate docs location; done means a clear guide is published and the procedure has been verified without exposing unnecessary permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, javascript, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100