diff options
| author | Dax Raad <[email protected]> | 2026-02-12 09:26:28 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-02-12 09:26:28 -0500 |
| commit | a115565054c9c905788b1684f9b64f0e6dc2dbb4 (patch) | |
| tree | 2df2365cc4f06674f87e38be7db72a0f09a36fb7 | |
| parent | d82d22b2d760e85a4e9a84ff7a69e43420553e20 (diff) | |
| download | opencode-a115565054c9c905788b1684f9b64f0e6dc2dbb4.tar.gz opencode-a115565054c9c905788b1684f9b64f0e6dc2dbb4.zip | |
core: allow model configurations without npm/api provider details
Makes npm and api fields optional in the provider schema so model definitions
can be more flexible when provider package details aren't needed.
| -rw-r--r-- | packages/opencode/src/provider/models.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/provider/models.ts b/packages/opencode/src/provider/models.ts index 4725d0d39..8ce543d37 100644 --- a/packages/opencode/src/provider/models.ts +++ b/packages/opencode/src/provider/models.ts @@ -64,7 +64,7 @@ export namespace ModelsDev { status: z.enum(["alpha", "beta", "deprecated"]).optional(), options: z.record(z.string(), z.any()), headers: z.record(z.string(), z.string()).optional(), - provider: z.object({ npm: z.string(), api: z.string() }).optional(), + provider: z.object({ npm: z.string().optional(), api: z.string().optional() }).optional(), variants: z.record(z.string(), z.record(z.string(), z.any())).optional(), }) export type Model = z.infer<typeof Model> |
