[FEATURE]: Improve invalid/missing api key response #6177

Open
opened 2026-02-16 18:01:23 -05:00 by yindo · 0 comments
Owner

Originally created by @jakob1379 on GitHub (Jan 15, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I have this opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
   "provider": {
    "deepseek": {
      "options": {
        "apiKey": "{env:DEEPSEEK_API_KEY}",
        "baseURL": "https://api.deepseek.com/v1
      }
    }
  },
  "model": "deepseek/deepseek-reasoner"
}

In my environment I forgot to export the environment variable DEEPSEEP_API_KEY and got the obscure error message:

Unauthorized: Authentication Fails (governor)

It would be nice, now that we can ask for env variables getting a clearer messages stating "envrinment variable DEEPSEEK_API_KEY is not set" or similar.

Originally created by @jakob1379 on GitHub (Jan 15, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I have this `opencode.jsonc` ```json { "$schema": "https://opencode.ai/config.json", "provider": { "deepseek": { "options": { "apiKey": "{env:DEEPSEEK_API_KEY}", "baseURL": "https://api.deepseek.com/v1 } } }, "model": "deepseek/deepseek-reasoner" } ``` In my environment I forgot to export the environment variable `DEEPSEEP_API_KEY` and got the obscure error message: ```md Unauthorized: Authentication Fails (governor) ``` It would be nice, now that we can ask for env variables getting a clearer messages stating "envrinment variable DEEPSEEK_API_KEY is not set" or similar.
yindo added the discussion label 2026-02-16 18:01:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6177