Custom NPM registry and linking a custom AI SDK provider package #2743

Closed
opened 2026-02-16 17:37:04 -05:00 by yindo · 4 comments
Owner

Originally created by @charlescoult-boeing on GitHub (Nov 9, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

Hello, I've written a custom AI SDK provider for a specific LLM that uses a non-standard API.
My company uses a private NPM registry where the SDK provider package is hosted.

If I try to set the 'npm' in the provider's settings within opencode.json, Bun doesn't find the package (I believe because it is not configured to look in the private NPM registry).

I have NPM configured to use the private registry and I created a bunfig.toml file in my Windows user's home directory in an attempt to configure Bun similarly, but it still doesn't find the package.

Does anyone have any suggestions on how I can have it load my custom AI SDK provider package?

Originally created by @charlescoult-boeing on GitHub (Nov 9, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question Hello, I've written a custom AI SDK provider for a specific LLM that uses a non-standard API. My company uses a private NPM registry where the SDK provider package is hosted. If I try to set the 'npm' in the provider's settings within `opencode.json`, Bun doesn't find the package (I believe because it is not configured to look in the private NPM registry). I have NPM configured to use the private registry and I created a `bunfig.toml` file in my Windows user's home directory in an attempt to configure Bun similarly, but it still doesn't find the package. Does anyone have any suggestions on how I can have it load my custom AI SDK provider package?
yindo closed this issue 2026-02-16 17:37:04 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 10, 2025):

if u try to bun install without opencode can u?

@rekram1-node commented on GitHub (Nov 10, 2025): if u try to bun install without opencode can u?
Author
Owner

@charlescoult-boeing commented on GitHub (Nov 10, 2025):

Ok - it looks like it is using the private NPM package server - the bun.lock file that gets generated in the .opencode folder has the correct URLs that point to the packages on the private NPM server so that looks good...

I deleted the opencode/.cache folder in my home directory - it looks like it was pulling an old version of the package, causing my error

It successfully updated to the new version and now I'm getting a different error! But that's good because I'm still developing the package and can do some more debugging now!

Closing - TY!

@charlescoult-boeing commented on GitHub (Nov 10, 2025): Ok - it looks like it _is_ using the private NPM package server - the `bun.lock` file that gets generated in the `.opencode` folder has the correct URLs that point to the packages on the private NPM server so that looks good... I deleted the `opencode/.cache` folder in my home directory - it looks like it was pulling an old version of the package, causing my error It successfully updated to the new version and now I'm getting a different error! But that's good because I'm still developing the package and can do some more debugging now! Closing - TY!
Author
Owner

@charlescoult-boeing commented on GitHub (Nov 10, 2025):

@rekram1-node Is there a way to get it to update the package without having to delete the cache?

@charlescoult-boeing commented on GitHub (Nov 10, 2025): @rekram1-node Is there a way to get it to update the package without having to delete the cache?
Author
Owner

@rekram1-node commented on GitHub (Nov 10, 2025):

it should update automatically occasionally if the package.json say "latest"

@rekram1-node commented on GitHub (Nov 10, 2025): it should update automatically occasionally if the package.json say "latest"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2743