fix: honor agent variant overrides (#1394)
* fix(shared): honor agent variant overrides * test(shared): use model in fallback chain to verify override precedence Address PR review: test now uses claude-opus-4-5 (which has default variant 'max' in sisyphus chain) to properly verify that agent override 'high' takes precedence over the fallback chain's default variant.
This commit is contained in:
@@ -83,6 +83,23 @@ describe("applyAgentVariant", () => {
|
||||
})
|
||||
|
||||
describe("resolveVariantForModel", () => {
|
||||
test("returns agent override variant when configured", () => {
|
||||
// given - use a model in sisyphus chain (claude-opus-4-5 has default variant "max")
|
||||
// to verify override takes precedence over fallback chain
|
||||
const config = {
|
||||
agents: {
|
||||
sisyphus: { variant: "high" },
|
||||
},
|
||||
} as OhMyOpenCodeConfig
|
||||
const model = { providerID: "anthropic", modelID: "claude-opus-4-5" }
|
||||
|
||||
// when
|
||||
const variant = resolveVariantForModel(config, "sisyphus", model)
|
||||
|
||||
// then
|
||||
expect(variant).toBe("high")
|
||||
})
|
||||
|
||||
test("returns correct variant for anthropic provider", () => {
|
||||
// given
|
||||
const config = {} as OhMyOpenCodeConfig
|
||||
|
||||
Reference in New Issue
Block a user