feat(core): widen interleaved reasoning fields
This commit is contained in:
parent
1f2de535aa
commit
f28cc51f12
13 changed files with 140 additions and 37 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { describe, expect, test } from "bun:test"
|
||||
import { Schema } from "effect"
|
||||
import { Model } from "../src/model.js"
|
||||
|
||||
describe("Model.Ref", () => {
|
||||
|
|
@ -20,3 +21,13 @@ describe("Model.Ref", () => {
|
|||
expect(() => Model.Ref.parse("openai/gpt-5#high#extra")).toThrow()
|
||||
})
|
||||
})
|
||||
|
||||
describe("Model.Interleaved", () => {
|
||||
test("accepts known and provider-specific fields", () => {
|
||||
const decode = Schema.decodeUnknownSync(Model.Interleaved)
|
||||
const fields = ["reasoning", "reasoning_content", "reasoning_text", "reasoning_details", "vendor_reasoning"]
|
||||
|
||||
for (const field of fields) expect(decode({ field })).toEqual({ field })
|
||||
expect(decode(true)).toBe(true)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue