We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e50053 commit f3c56ecCopy full SHA for f3c56ec
lua/opencode/config_file.lua
@@ -58,10 +58,12 @@ end
58
59
function M.get_model_info(provider, model)
60
local config_file = require('opencode.config_file')
61
- local providers = config_file.get_opencode_providers() or {}
+ local providers_response = config_file.get_opencode_providers()
62
+ local providers = providers_response and providers_response.providers or {}
63
+
64
local filtered_providers = vim.tbl_filter(function(p)
65
return p.id == provider
- end, providers.providers)
66
+ end, providers)
67
68
if #filtered_providers == 0 then
69
return nil
0 commit comments