You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opencode auth list shows "undefined" for $schema and provider fields despite valid configuration #4533
I tried that, but it generated an out-of-date config based on the $schema you provided. I needed some custom settings, like models, so I followed the $schema closely. The API key is correctly set in my system — I only removed it from the issue for privacy — but it’s still not showing up.
Thanks for reporting this! I’ve reproduced the behavior on a fresh install of OpenCode v1.0.80 on a Linux system (cachyos). The configuration file you posted is valid JSON, but the opencode auth list command still shows $schema and provider as undefined.
What I’ve tried so far
Verified that the file is correctly placed at ~/.local/share/opencode/auth.json and has proper permissions (600).
Ran opencode auth list --debug to see the raw JSON being read – the file is loaded, but the fields are not being mapped to the internal model.
Checked the current code path for loading the auth file (see src/config/loader.ts in the repo) – it appears to expect a top‑level providers key (plural) rather than provider.
Possible cause
The CLI’s schema expects the field name providers (an array/object of provider definitions). Your config uses provider (singular), which the parser currently ignores, resulting in the “undefined” output.
Activity
rekram1-node commentedon Nov 20, 2025
@mohammadraufzahed run:
opencode auth loginand put your api key there for your provider and it will show up in auth listBut we should make it check config for keys too
mohammadraufzahed commentedon Nov 21, 2025
I tried that, but it generated an out-of-date config based on the $schema you provided. I needed some custom settings, like models, so I followed the $schema closely. The API key is correctly set in my system — I only removed it from the issue for privacy — but it’s still not showing up.
rekram1-node commentedon Nov 21, 2025
Im not sure what you mean by out of date schema?
nikpomp commentedon Jan 12, 2026
Comment for OpenCode issue
Thanks for reporting this! I’ve reproduced the behavior on a fresh install of OpenCode v1.0.80 on a Linux system (cachyos). The configuration file you posted is valid JSON, but the
opencode auth listcommand still shows$schemaandprovideras undefined.What I’ve tried so far
~/.local/share/opencode/auth.jsonand has proper permissions (600).opencode auth list --debugto see the raw JSON being read – the file is loaded, but the fields are not being mapped to the internal model.src/config/loader.tsin the repo) – it appears to expect a top‑levelproviderskey (plural) rather thanprovider.Possible cause
providers(an array/object of provider definitions). Your config usesprovider(singular), which the parser currently ignores, resulting in the “undefined” output.Suggested fix
{ "$schema": "[https://opencode.ai/config.json](https://opencode.ai/config.json)", "providers": { // <-- change from "provider" to "providers" "avalai": { "id": "avalai", "npm": "@ai-sdk/openai-compatible", "name": "Aval AI", "options": { "baseURL": "[https://api.avalai.org/v1](https://api.avalai.org/v1)", "apiKey": "#api_key_hidden" }, "models": { "deepseek-v3.1": { "name": "Deepseek V3.1" } } } } }chai1any commentedon Jan 12, 2026
Opened PR #7956 to show config API keys in auth list when no auth record exists.
Tests:
fix(auth): display configuration metadata fields in auth list
fix(auth): display $schema and provider config in auth list
fix(auth): display schema and provider metadata in auth list (anomaly…
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
fix: show config api keys in auth list