feat(core): flatten provider config and load native packages (#35563)
Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
co-authored by
Dax Raad
parent
d603eed5a1
commit
e57d9ca390
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user