feat(core): flatten provider config and load native packages (#35563)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Shoubhit Dash
2026-07-07 01:48:56 +05:30
committed by GitHub
parent 45935b5770
commit ebdbf02091
107 changed files with 2596 additions and 1987 deletions
@@ -1,4 +1,5 @@
import { define } from "@opencode-ai/plugin/v2/effect"
import { ProviderV2 } from "@opencode-ai/core/provider"
import { Effect } from "effect"
export default define({
@@ -7,14 +8,11 @@ export default define({
ctx.catalog
.transform((catalog) => {
catalog.provider.update("configured", (provider) => {
provider.api = { type: "aisdk", package: "@ai-sdk/openai-compatible" }
provider.package = ProviderV2.aisdk("@ai-sdk/openai-compatible")
})
catalog.model.update("configured", "glm-5.2", (model) => {
model.api = {
id: "glm-5.2",
type: "aisdk",
package: "@ai-sdk/openai-compatible",
}
model.modelID = "glm-5.2"
model.package = ProviderV2.aisdk("@ai-sdk/openai-compatible")
model.variants = [
{
id: "high",