API key entered via /model dialog not loaded until restart #5050

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

Originally created by @darshkpatel on GitHub (Jan 12, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When entering an API key manually through the /model dialog for providers like Anthropic, the API key is not immediately usable. Users must restart OpenCode for the key to be loaded.

Plugins

No response

OpenCode version

1.1.14

Steps to reproduce

  • open /models menu
  • select provider anthropic
  • select manually enter api key
  • enter an api key
  • select an anthropic model
  • send a prompt
  • you'll notice opencode complains about missing api key

Screenshot and/or share link

https://github.com/user-attachments/assets/0a13f66c-e7f0-4c48-948c-1220c8dfab11

Operating System

No response

Terminal

No response

Originally created by @darshkpatel on GitHub (Jan 12, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When entering an API key manually through the `/model` dialog for providers like Anthropic, the API key is not immediately usable. Users must restart OpenCode for the key to be loaded. ### Plugins _No response_ ### OpenCode version 1.1.14 ### Steps to reproduce - open `/models` menu - select provider anthropic - select manually enter api key - enter an api key - select an anthropic model - send a prompt - you'll notice opencode complains about missing api key ### Screenshot and/or share link https://github.com/user-attachments/assets/0a13f66c-e7f0-4c48-948c-1220c8dfab11 ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:48:09 -05:00
yindo closed this issue 2026-02-16 17:48:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5050