Skip to content

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

Description

@nealgentry

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$

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions