feat(core): widen interleaved reasoning fields
This commit is contained in:
parent
1f2de535aa
commit
f28cc51f12
13 changed files with 140 additions and 37 deletions
|
|
@ -289,6 +289,24 @@ describe("Config", () => {
|
|||
}),
|
||||
)
|
||||
|
||||
it.effect("migrates provider-specific interleaved reasoning fields", () =>
|
||||
Effect.sync(() => {
|
||||
const migrated = ConfigMigrateV1.migrate({
|
||||
provider: {
|
||||
custom: {
|
||||
models: {
|
||||
chat: { interleaved: { field: "vendor_reasoning" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
expect(migrated.providers?.custom?.models?.chat?.capabilities?.interleaved).toEqual({
|
||||
field: "vendor_reasoning",
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
it.effect("migrates v1 provider lists to policies", () =>
|
||||
Effect.sync(() => {
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -170,7 +170,12 @@ describe("ConfigProviderPlugin.Plugin", () => {
|
|||
models: {
|
||||
chat: {
|
||||
name: "First",
|
||||
capabilities: { tools: true, input: ["text"], output: ["text"] },
|
||||
capabilities: {
|
||||
tools: true,
|
||||
input: ["text"],
|
||||
output: ["text"],
|
||||
interleaved: { field: "vendor_reasoning" },
|
||||
},
|
||||
disabled: true,
|
||||
limit: { context: 100, output: 50 },
|
||||
cost: { input: 1, output: 2 },
|
||||
|
|
@ -251,7 +256,12 @@ describe("ConfigProviderPlugin.Plugin", () => {
|
|||
expect(model.id).toBe(modelID)
|
||||
expect(model.modelID).toBe(ModelV2.ID.make("api-chat"))
|
||||
expect(model.name).toBe("Last")
|
||||
expect(model.capabilities).toEqual({ tools: true, input: ["text"], output: ["text"] })
|
||||
expect(model.capabilities).toEqual({
|
||||
tools: true,
|
||||
input: ["text"],
|
||||
output: ["text"],
|
||||
interleaved: { field: "vendor_reasoning" },
|
||||
})
|
||||
expect(model.enabled).toBe(false)
|
||||
expect(model.limit).toEqual({ context: 100, output: 75 })
|
||||
expect(model.cost).toEqual([
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ const fixture = {
|
|||
reasoning: false,
|
||||
temperature: true,
|
||||
tool_call: true,
|
||||
interleaved: { field: "vendor_reasoning" },
|
||||
limit: { context: 128000, output: 8192 },
|
||||
},
|
||||
},
|
||||
|
|
@ -69,7 +70,7 @@ const fixtureSnapshot = [
|
|||
family: undefined,
|
||||
package: undefined,
|
||||
settings: undefined,
|
||||
capabilities: { tools: true, input: [], output: [] },
|
||||
capabilities: { tools: true, input: [], output: [], interleaved: { field: "vendor_reasoning" } },
|
||||
variants: [],
|
||||
time: { released: Date.parse("2026-01-01") },
|
||||
cost: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue