Version lookup ignores configured npm registry #8091

Open
opened 2026-02-16 18:09:09 -05:00 by yindo · 1 comment
Owner

Originally created by @bbartels on GitHub (Jan 30, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The script in packages/script/src/index.ts hardcodes https://registry.npmjs.org when fetching the latest published version to calculate the next version number.

This ignores the user's npm configuration, making it impossible to build in airgapped environments or when using an internal npm mirror.

Expected behavior

Script should respect the user's configured npm registry via npm_config_registry env var (standard npm/bun behavior).

Current behavior

Always fetches from https://registry.npmjs.org regardless of npm configuration.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @bbartels on GitHub (Jan 30, 2026). Originally assigned to: @thdxr on GitHub. ### Description The script in `packages/script/src/index.ts` hardcodes `https://registry.npmjs.org` when fetching the latest published version to calculate the next version number. This ignores the user's npm configuration, making it impossible to build in airgapped environments or when using an internal npm mirror. ### Expected behavior Script should respect the user's configured npm registry via `npm_config_registry` env var (standard npm/bun behavior). ### Current behavior Always fetches from `https://registry.npmjs.org` regardless of npm configuration. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:09:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11385: Build script ignores OPENCODE_MODELS_URL env var - similar hardcoded registry issue but for models.dev
  • #4959: Add option to disable models.dev fetch for corporate proxy environments - related feature request for airgapped/corporate environments
  • #2224: Support for airgapped installation - broader context about airgapped environment support

Both #11387 and #11385 follow the same pattern: hardcoded external URLs that ignore user configuration. They could potentially be addressed together as part of a broader configuration/environment variable support improvement.

Feel free to ignore if your specific use case differs from these issues.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be a duplicate of existing issues. Please check: - #11385: Build script ignores OPENCODE_MODELS_URL env var - similar hardcoded registry issue but for models.dev - #4959: Add option to disable models.dev fetch for corporate proxy environments - related feature request for airgapped/corporate environments - #2224: Support for airgapped installation - broader context about airgapped environment support Both #11387 and #11385 follow the same pattern: hardcoded external URLs that ignore user configuration. They could potentially be addressed together as part of a broader configuration/environment variable support improvement. Feel free to ignore if your specific use case differs from these issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8091