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

Co-authored-by: Victor Navarro <36263538+vimtor@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-21 16:34:54 +00:00 committed by GitHub
commit 023f76f6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -651,7 +651,7 @@ export const layer = (options?: Options) => Layer.effect(
if (fetch && !process.argv.includes("--get-yargs-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 })