panic: runtime error: invalid memory address or nil pointer dereference #89

Closed
opened 2026-02-16 17:25:09 -05:00 by yindo · 2 comments
Owner

Originally created by @nealgentry on GitHub (Jun 16, 2025).

Originally assigned to: @thdxr on GitHub.

support for openrouter when trying to add i get this error.

(venv) neal@ubuntu:/var/www/trading_app$ opencode

█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀

┌ Add credential

◇ Select provider
│ Other

◇ Enter provider - must match @ai-sdk/
│ @openrouter/ai-sdk-provider

◇ Enter your API key
│ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪

└ Done

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x883cc1]

goroutine 1 [running]:
github.com/sst/opencode/internal/app.New({0xfe49a8, 0xc0001e3e00}, {0xc00023f8d0, 0x7}, 0xc0003ec1c0)
/home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:64 +0x2a1
main.main()
/home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:59 +0x5b5
(venv) neal@ubuntu:/var/www/trading_app$ opencode
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x883cc1]

goroutine 1 [running]:
github.com/sst/opencode/internal/app.New({0xfe49a8, 0xc0002dfb30}, {0xc0001c61e8, 0x7}, 0xc000224410)
/home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:64 +0x2a1
main.main()
/home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:59 +0x5b5
(venv) neal@ubuntu:/var/www/trading_app$

Originally created by @nealgentry on GitHub (Jun 16, 2025). Originally assigned to: @thdxr on GitHub. support for openrouter when trying to add i get this error. (venv) neal@ubuntu:/var/www/trading_app$ opencode █▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀ █░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀ ▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀ ┌ Add credential │ ◇ Select provider │ Other │ ◇ Enter provider - must match @ai-sdk/<provider> │ @openrouter/ai-sdk-provider │ ◇ Enter your API key │ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ │ └ Done panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x883cc1] goroutine 1 [running]: github.com/sst/opencode/internal/app.New({0xfe49a8, 0xc0001e3e00}, {0xc00023f8d0, 0x7}, 0xc0003ec1c0) /home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:64 +0x2a1 main.main() /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:59 +0x5b5 (venv) neal@ubuntu:/var/www/trading_app$ opencode panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x883cc1] goroutine 1 [running]: github.com/sst/opencode/internal/app.New({0xfe49a8, 0xc0002dfb30}, {0xc0001c61e8, 0x7}, 0xc000224410) /home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:64 +0x2a1 main.main() /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:59 +0x5b5 (venv) neal@ubuntu:/var/www/trading_app$
yindo closed this issue 2026-02-16 17:25:09 -05:00
Author
Owner

@adamdotdevin commented on GitHub (Jun 16, 2025):

duplicate of #123

@adamdotdevin commented on GitHub (Jun 16, 2025): duplicate of #123
Author
Owner

@thdxr commented on GitHub (Jun 16, 2025):

goign to close in favor of #123

@thdxr commented on GitHub (Jun 16, 2025): goign to close in favor of #123
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#89