core: expose v2 model listing API (#25821)

This commit is contained in:
Dax 2026-05-13 10:43:08 -04:00 committed by GitHub
commit 8345152319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
138 changed files with 8188 additions and 302 deletions

View file

@ -0,0 +1,18 @@
import { Effect } from "effect"
import { PluginV2 } from "../plugin"
export const EnvPlugin = PluginV2.define({
id: PluginV2.ID.make("env"),
effect: Effect.gen(function* () {
return {
"provider.update": Effect.fn(function* (evt) {
const key = evt.provider.env.find((item) => process.env[item])
if (!key) return
evt.provider.enabled = {
via: "env",
name: key,
}
}),
}
}),
})