free-coding-models icon indicating copy to clipboard operation
free-coding-models copied to clipboard

Patch OpenClaw to allow all NVIDIA models from free-coding-models

Open EdgeIQ-Labs opened this issue 8 months ago • 6 comments

node patch-openclaw.js node:internal/modules/esm/resolve:275 throw new ERR_MODULE_NOT_FOUND( ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/.free-coding-models/sources.js' imported from /home/guy/.free-coding-models/patch-openclaw.js at finalizeResolution (node:internal/modules/esm/resolve:275:11) at moduleResolve (node:internal/modules/esm/resolve:865:10) at defaultResolve (node:internal/modules/esm/resolve:991:11) at #cachedDefaultResolve (node:internal/modules/esm/loader:713:20) at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:730:38) at ModuleLoader.resolveSync (node:internal/modules/esm/loader:759:52) at #resolve (node:internal/modules/esm/loader:695:17) at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:615:35) at ModuleJob.syncLink (node:internal/modules/esm/module_job:160:33) at ModuleJob.link (node:internal/modules/esm/module_job:245:17) { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///home/.free-coding-models/sources.js'

EdgeIQ-Labs avatar Mar 07 '26 15:03 EdgeIQ-Labs

Can you tell me what's your shell and OS please ?

vava-nessa avatar Mar 09 '26 02:03 vava-nessa

Thanks Vava-Nessa/Free-Coding-Models! The App is so far working awesome aside from the patch install. Side question: Will you be adding more free AI models down the road? I am using Bash Shell in WSL2 Ubuntu > My OS is Win11

On Sun, Mar 8, 2026 at 10:38 PM Vanessa Depraute @.***> wrote:

vava-nessa left a comment (vava-nessa/free-coding-models#35) https://github.com/vava-nessa/free-coding-models/issues/35#issuecomment-4020717591

Can you tell me what's your shell and OS please ?

— Reply to this email directly, view it on GitHub https://github.com/vava-nessa/free-coding-models/issues/35#issuecomment-4020717591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5XJSHF3QRRW5Y5JAHIEI34PYVCHAVCNFSM6AAAAACWKNKODGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMRQG4YTONJZGE . You are receiving this because you authored the thread.Message ID: @.***>

EdgeIQ-Labs avatar Mar 09 '26 11:03 EdgeIQ-Labs

I'm only using macos and linux, so I guess to fix that, I'll have to ask a contributor on windows to fix it :)

Yeah, I'll add more AI Free models regulary, so the package is always up to date with free AI endpoints

vava-nessa avatar Mar 09 '26 16:03 vava-nessa

Hey,

No problem . If you need someone to test the windows fix let me know. Happy to help out. Side question : How come when I add other models from google Ai studio for example it falls under my nvidia provider and not its own google ai provider instead? (nvidia/google/gemma-2-9b-it) Thanks GP

On Mon, Mar 9, 2026 at 12:56 PM Vanessa Depraute @.***> wrote:

vava-nessa left a comment (vava-nessa/free-coding-models#35) https://github.com/vava-nessa/free-coding-models/issues/35#issuecomment-4025247168

I'm only using macos and linux, so I guess to fix that, I'll have to ask a contributor on windows to fix it :)

Yeah, I'll add more AI Free models regulary, so the package is always up to date with free AI endpoints

— Reply to this email directly, view it on GitHub https://github.com/vava-nessa/free-coding-models/issues/35#issuecomment-4025247168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5XJSG7YKJGQ7XJUGQAUYD4P3ZSFAVCNFSM6AAAAACWKNKODGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMRVGI2DOMJWHA . You are receiving this because you authored the thread.Message ID: @.***>

EdgeIQ-Labs avatar Mar 11 '26 14:03 EdgeIQ-Labs

Try a different windows wsl distro. Ubuntu archlinux Debian etc there's a bunch. That being said. never been a better time to make the switch lol

Nsomnia avatar Mar 29 '26 10:03 Nsomnia

✅ Fixed in v0.5.57 (commit pending). patch-openclaw.js now searches multiple candidate paths for sources.js before failing:

  1. Same directory as the script (primary case — FCM source / global install layout)
  2. Parent directory (one level up — covers the tools/ subdir pattern)
  3. Two levels up
  4. Three levels up
  5. process.cwd() (last-resort fallback)

If none of those resolve, the script now prints a helpful error pointing to the script's actual location and how to fix it (make sure sources.js is in the same directory as patch-openclaw.js, or run this from the free-coding-models repo root).

Why dynamic import? ESM import './sources.js' is resolved at parse-time relative to the importing file's directory. There is no way to fall back at parse time, so I switched to a top-level await import(pathToFileURL(sourcesPath).href) with the path computed at runtime.

Test: test/patch-openclaw.test.js has a new case (issue #35: sources.js lookup walks the candidate list) that locks in the search order.

Changelog: changelog/v0.5.57.md.

vava-nessa avatar Jul 25 '26 23:07 vava-nessa