mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-11 16:23:27 +00:00
chore: generate
This commit is contained in:
parent
f64b024f46
commit
b2f0f45c9e
1 changed files with 21 additions and 19 deletions
|
|
@ -59,25 +59,27 @@ function environmentNames(provider: ModelsDev.Snapshot) {
|
|||
}
|
||||
|
||||
function snapshots(data: readonly ModelsDev.Snapshot[]) {
|
||||
return structuredClone(data)
|
||||
// These deprecated aliases are replaced by the canonical Azure and Google Vertex providers.
|
||||
.filter(
|
||||
(provider) => provider.info.id !== "azure-cognitive-services" && provider.info.id !== "google-vertex-anthropic",
|
||||
)
|
||||
.map((provider) => {
|
||||
const environment = new Set(provider.environment)
|
||||
return {
|
||||
...provider,
|
||||
info: {
|
||||
...provider.info,
|
||||
...(provider.info.settings ? { settings: resolveEnvironment(provider.info.settings, environment) } : {}),
|
||||
},
|
||||
models: provider.models.map((model) => ({
|
||||
...model,
|
||||
...(model.settings ? { settings: resolveEnvironment(model.settings, environment) } : {}),
|
||||
})),
|
||||
}
|
||||
})
|
||||
return (
|
||||
structuredClone(data)
|
||||
// These deprecated aliases are replaced by the canonical Azure and Google Vertex providers.
|
||||
.filter(
|
||||
(provider) => provider.info.id !== "azure-cognitive-services" && provider.info.id !== "google-vertex-anthropic",
|
||||
)
|
||||
.map((provider) => {
|
||||
const environment = new Set(provider.environment)
|
||||
return {
|
||||
...provider,
|
||||
info: {
|
||||
...provider.info,
|
||||
...(provider.info.settings ? { settings: resolveEnvironment(provider.info.settings, environment) } : {}),
|
||||
},
|
||||
models: provider.models.map((model) => ({
|
||||
...model,
|
||||
...(model.settings ? { settings: resolveEnvironment(model.settings, environment) } : {}),
|
||||
})),
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
function resolveEnvironment(settings: Readonly<Record<string, unknown>>, environment: Set<string>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue