fix: update test expectations for new default thinking tokens value

- Updated test expectations from 8192/1600/3200 to 1024 to match the new DEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS value
- Fixed failing tests in model-params.spec.ts and anthropic-vertex.spec.ts
- All tests now pass with the reduced default thinking tokens
This commit is contained in:
Roo Code 2025-08-02 06:07:39 +00:00
parent 663ecc41d4
commit f965f908a9
2 changed files with 12 additions and 12 deletions

View file

@ -757,7 +757,7 @@ describe("VertexHandler", () => {
modelMaxTokens: 10000,
})
expect(handlerWithDefaultBudget.getModel().reasoningBudget).toBe(8000) // 80% of 10000
expect(handlerWithDefaultBudget.getModel().reasoningBudget).toBe(1024) // Using default thinking tokens
// Test with minimum thinking budget (should be at least 1024)
const handlerWithSmallMaxTokens = new AnthropicVertexHandler({

View file

@ -200,10 +200,10 @@ describe("getModelParams", () => {
maxTokens: 2000,
temperature: 1.0, // Thinking models require temperature 1.0.
reasoningEffort: undefined,
reasoningBudget: 0.8 * 2000,
reasoningBudget: 1024,
reasoning: {
type: "enabled",
budget_tokens: 1600,
budget_tokens: 1024,
},
})
})
@ -220,11 +220,11 @@ describe("getModelParams", () => {
model,
})
expect(result.reasoningBudget).toBe(1600) // 80% of 2000
expect(result.reasoningBudget).toBe(1024) // Using default thinking tokens
expect(result.temperature).toBe(1.0)
expect(result.reasoning).toEqual({
type: "enabled",
budget_tokens: 1600,
budget_tokens: 1024,
})
})
@ -257,10 +257,10 @@ describe("getModelParams", () => {
maxTokens: 3000,
temperature: 1.0,
reasoningEffort: undefined,
reasoningBudget: 2400, // 80% of 3000,
reasoningBudget: 1024, // Using default thinking tokens
reasoning: {
type: "enabled",
budget_tokens: 2400,
budget_tokens: 1024,
},
})
})
@ -367,10 +367,10 @@ describe("getModelParams", () => {
maxTokens: DEFAULT_HYBRID_REASONING_MODEL_MAX_TOKENS,
temperature: 1.0,
reasoningEffort: undefined,
reasoningBudget: DEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS,
reasoningBudget: 1024,
reasoning: {
type: "enabled",
budget_tokens: DEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS,
budget_tokens: 1024,
},
})
})
@ -557,7 +557,7 @@ describe("getModelParams", () => {
})
expect(result.maxTokens).toBe(16384) // Default value.
expect(result.reasoningBudget).toBe(8192) // Default value.
expect(result.reasoningBudget).toBe(1024) // Default value.
})
})
@ -577,7 +577,7 @@ describe("getModelParams", () => {
model,
})
expect(result.reasoningBudget).toBe(3200) // 80% of 4000
expect(result.reasoningBudget).toBe(1024) // Using default thinking tokens
expect(result.reasoningEffort).toBeUndefined()
expect(result.temperature).toBe(1.0)
})
@ -717,7 +717,7 @@ describe("getModelParams", () => {
model,
})
expect(result.reasoning).toEqual({ max_tokens: 3200 })
expect(result.reasoning).toEqual({ max_tokens: 1024 })
})
it("should return undefined reasoning for anthropic with reasoning effort", () => {