Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/opencode/src/config/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const Model = Schema.Struct({
}),
),
experimental: Schema.optional(Schema.Boolean),
status: Schema.optional(Schema.Literals(["alpha", "beta", "deprecated"])),
status: Schema.optional(Schema.Literals(["alpha", "beta", "deprecated", "active"])),
provider: Schema.optional(
Schema.Struct({ npm: Schema.optional(Schema.String), api: Schema.optional(Schema.String) }),
),
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/provider/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const Model = z.object({
.optional(),
})
.optional(),
status: z.enum(["alpha", "beta", "deprecated"]).optional(),
status: z.enum(["alpha", "beta", "deprecated", "active"]).optional(),
provider: z.object({ npm: z.string().optional(), api: z.string().optional() }).optional(),
})
export type Model = z.infer<typeof Model>
Expand Down Expand Up @@ -160,7 +160,7 @@ const PublishModel = z
.optional(),
})
.optional(),
status: z.enum(["alpha", "beta", "deprecated"]).optional(),
status: z.enum(["alpha", "beta", "deprecated", "active"]).optional(),
provider: z.object({ npm: z.string().optional(), api: z.string().optional() }).optional(),
})
.passthrough()
Expand Down
27 changes: 27 additions & 0 deletions packages/opencode/test/provider/model-status-active.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { test, expect } from "bun:test"
import { Model as ConfigProviderModel } from "../../src/config/provider"
import { ModelsDev } from "../../src/provider"

// Regression for #26592: the runtime emits status "active" (provider.ts), so both the
// config-load schema and the models.dev catalog schema must accept it instead of
// crashing config load on a model that declares status: "active".

test("config provider Model schema accepts status: active", () => {
const result = ConfigProviderModel.zod.safeParse({ status: "active" })
expect(result.success).toBe(true)
})

test("models.dev Model schema accepts status: active", () => {
const result = ModelsDev.Model.safeParse({
id: "test-model",
name: "Test Model",
release_date: "2026-01-01",
attachment: false,
reasoning: false,
temperature: false,
tool_call: false,
limit: { context: 128000, output: 8192 },
status: "active",
})
expect(result.success).toBe(true)
})
Loading