refactor(core): simplify model requests

This commit is contained in:
Dax Raad
2026-06-24 13:17:14 -04:00
parent 116ac93ddb
commit 17f312d537
21 changed files with 56 additions and 685 deletions
+4 -6
View File
@@ -55,7 +55,7 @@ function request(headers: Record<string, string>, variant?: string) {
const decode = Schema.decodeUnknownSync(Config.Info)
describe("ConfigProviderPlugin.Plugin", () => {
it.effect("partitions existing model variant bodies without changing config shape", () =>
it.effect("keeps configured model variant bodies unchanged", () =>
Effect.gen(function* () {
const catalog = yield* Catalog.Service
const providerID = ProviderV2.ID.opencode
@@ -96,8 +96,7 @@ describe("ConfigProviderPlugin.Plugin", () => {
expect(model.variants).toMatchObject([
{
id: "high",
body: {},
options: {
body: {
reasoningEffort: "high",
reasoningSummary: "auto",
include: ["reasoning.encrypted_content"],
@@ -107,7 +106,7 @@ describe("ConfigProviderPlugin.Plugin", () => {
}),
)
it.effect("uses the effective provider package across layered config", () =>
it.effect("keeps layered model variant bodies unchanged", () =>
Effect.gen(function* () {
const catalog = yield* Catalog.Service
const providerID = ProviderV2.ID.opencode
@@ -147,8 +146,7 @@ describe("ConfigProviderPlugin.Plugin", () => {
const model = required(yield* catalog.model.get(providerID, modelID))
expect(model.variants[0]).toMatchObject({
id: "high",
body: {},
options: { reasoningEffort: "high" },
body: { reasoningEffort: "high" },
})
}),
)