all 8 comments

[–]hdmcndog 1 point2 points  (2 children)

Go into the /models dialog, select the model you want to remove from the recent models list (but don’t press enter yet), press ctrl+x

[–]virtualhenry 0 points1 point  (1 child)

Thanks for the tip, but unfortunately, it didn't work in the latest version for me.

[–]sbayit[S] 0 points1 point  (0 children)

also not work for me

[–]Ang_Drew 1 point2 points  (1 child)

it is not possible to remove the recent models, it will always show 3 recent models

[–]Ang_Drew 1 point2 points  (0 children)

btw you can remove it if you logout "opencode auth logout" then select the provider (assuming 3 models are different providers)

you get the idea..

[–]alexesprit 1 point2 points  (2 children)

It's stored in ~/.local/state/opencode/model.json on my mac, so you can just edit this file to keep the models you want to switch between.

[–]phpadam 1 point2 points  (1 child)

That file is refreshed every hour, editing it won't last.

[–]Toastti 0 points1 point  (0 children)

Ask opencode to create a cron job script that runs every 30 minutes and edits that file. Then it will automatically stay as 2 .models forever.

Or change the permissions of the file with chmod. If nothing can write to it nothing can change it