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 91edc6f commit da73b02Copy full SHA for da73b02
lua/opencode/config_file.lua
@@ -59,15 +59,15 @@ end
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 {}
62
- providers = vim.tbl_filter(function(p)
+ local filtered_providers = vim.tbl_filter(function(p)
63
return p.id == provider
64
- end, providers)
+ end, providers.providers)
65
66
- if #providers == 0 then
+ if #filtered_providers == 0 then
67
return nil
68
end
69
70
- return providers[1] and providers[1].models and providers[1].models[model] or nil
+ return filtered_providers[1] and filtered_providers[1].models and filtered_providers[1].models[model] or nil
71
72
73
function M.get_opencode_agents()
0 commit comments