mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
config: improve config schema
This commit is contained in:
parent
687dc5acd4
commit
94520ca502
1 changed files with 12 additions and 4 deletions
|
|
@ -174,10 +174,18 @@ export namespace Config {
|
|||
.describe("Modes configuration, see https://opencode.ai/docs/modes"),
|
||||
provider: z
|
||||
.record(
|
||||
ModelsDev.Provider.partial().extend({
|
||||
models: z.record(ModelsDev.Model.partial()),
|
||||
options: z.record(z.any()).optional(),
|
||||
}),
|
||||
ModelsDev.Provider.partial()
|
||||
.extend({
|
||||
models: z.record(ModelsDev.Model.partial()),
|
||||
options: z
|
||||
.object({
|
||||
apiKey: z.string().optional(),
|
||||
baseURL: z.string().optional(),
|
||||
})
|
||||
.catchall(z.any())
|
||||
.optional(),
|
||||
})
|
||||
.strict(),
|
||||
)
|
||||
.optional()
|
||||
.describe("Custom provider configurations and model overrides"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue