Pārlūkot izejas kodu

fix(core): refresh model catalog every five minutes (#38142)

Co-authored-by: Victor Navarro <36263538+vimtor@users.noreply.github.com>
opencode-agent[bot] 4 nedēļas atpakaļ
vecāks
revīzija
023f76f6fc
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      packages/core/src/models-dev.ts

+ 1 - 1
packages/core/src/models-dev.ts

@@ -651,7 +651,7 @@ export const layer = (options?: Options) => Layer.effect(
 
 
     if (fetch && !process.argv.includes("--get-yargs-completions")) {
     if (fetch && !process.argv.includes("--get-yargs-completions")) {
       // Schedule.spaced runs the effect once, then waits between completions.
       // Schedule.spaced runs the effect once, then waits between completions.
-      yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced("60 minutes")), Effect.ignore))
+      yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced(ttl)), Effect.ignore))
     }
     }
 
 
     return Service.of({ get, refresh })
     return Service.of({ get, refresh })