Skip to content

Commit 71a5293

Browse files
cameronrsudo-tee
authored andcommitted
fix(config_file): provider filtering
Filter was broken so count percentages weren't showing in the footer
1 parent 418bfbb commit 71a5293

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/opencode/config_file.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ end
5959
function M.get_model_info(provider, model)
6060
local config_file = require('opencode.config_file')
6161
local providers = config_file.get_opencode_providers() or {}
62-
providers = vim.tbl_filter(function(p)
62+
local filtered_providers = vim.tbl_filter(function(p)
6363
return p.id == provider
64-
end, providers)
64+
end, providers.providers)
6565

66-
if #providers == 0 then
66+
if #filtered_providers == 0 then
6767
return nil
6868
end
6969

70-
return providers[1] and providers[1].models and providers[1].models[model] or nil
70+
return filtered_providers[1] and filtered_providers[1].models and filtered_providers[1].models[model] or nil
7171
end
7272

7373
function M.get_opencode_agents()

0 commit comments

Comments
 (0)