feat(config): add model variant support
Allow optional model variant config for agents and categories. Propagate category variants into task model payloads so category-driven runs inherit provider-specific variants. Closes: #647
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { createFirstMessageVariantGate } from "./first-message-variant"
|
||||
|
||||
describe("createFirstMessageVariantGate", () => {
|
||||
test("marks new sessions and clears after apply", () => {
|
||||
// #given
|
||||
const gate = createFirstMessageVariantGate()
|
||||
|
||||
// #when
|
||||
gate.markSessionCreated({ id: "session-1" })
|
||||
|
||||
// #then
|
||||
expect(gate.shouldOverride("session-1")).toBe(true)
|
||||
|
||||
// #when
|
||||
gate.markApplied("session-1")
|
||||
|
||||
// #then
|
||||
expect(gate.shouldOverride("session-1")).toBe(false)
|
||||
})
|
||||
|
||||
test("ignores forked sessions", () => {
|
||||
// #given
|
||||
const gate = createFirstMessageVariantGate()
|
||||
|
||||
// #when
|
||||
gate.markSessionCreated({ id: "session-2", parentID: "session-parent" })
|
||||
|
||||
// #then
|
||||
expect(gate.shouldOverride("session-2")).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user