File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/opencode/src/cli/cmd Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11import type { Argv } from "yargs"
22import { Instance } from "../../project/instance"
33import { Provider } from "../../provider/provider"
4+ import { ModelsDev } from "../../provider/models"
45import { cmd } from "./cmd"
56import { UI } from "../ui"
67import { EOL } from "os"
@@ -19,8 +20,17 @@ export const ModelsCommand = cmd({
1920 describe : "use more verbose model output (includes metadata like costs)" ,
2021 type : "boolean" ,
2122 } )
23+ . option ( "refresh" , {
24+ describe : "refresh the models cache from models.dev" ,
25+ type : "boolean" ,
26+ } )
2227 } ,
2328 handler : async ( args ) => {
29+ if ( args . refresh ) {
30+ await ModelsDev . refresh ( )
31+ UI . println ( UI . Style . TEXT_SUCCESS_BOLD + "Models cache refreshed" + UI . Style . TEXT_NORMAL )
32+ }
33+
2434 await Instance . provide ( {
2535 directory : process . cwd ( ) ,
2636 async fn ( ) {
You can’t perform that action at this time.
0 commit comments