mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Add test for qwen/qwen3-32b maxTokens validation
Fixes #5136
- Added specific test to verify qwen/qwen3-32b model has correct maxTokens value of 40960
- This ensures the fix from commit c797c9a1d is properly tested and prevents regression
- The maxTokens limit of 40960 matches Groq API documentation requirements
This commit is contained in:
parent
3a8ba27615
commit
1307037926
1 changed files with 10 additions and 0 deletions
|
|
@ -52,6 +52,16 @@ describe("GroqHandler", () => {
|
|||
expect(model.info).toEqual(groqModels[testModelId])
|
||||
})
|
||||
|
||||
it("should return qwen/qwen3-32b model with correct maxTokens", () => {
|
||||
const testModelId: GroqModelId = "qwen/qwen3-32b"
|
||||
const handlerWithModel = new GroqHandler({ apiModelId: testModelId, groqApiKey: "test-groq-api-key" })
|
||||
const model = handlerWithModel.getModel()
|
||||
expect(model.id).toBe(testModelId)
|
||||
expect(model.info).toEqual(groqModels[testModelId])
|
||||
// Verify that maxTokens is set to 40960 as per Groq API documentation
|
||||
expect(model.info.maxTokens).toBe(40960)
|
||||
})
|
||||
|
||||
it("completePrompt method should return text from Groq API", async () => {
|
||||
const expectedResponse = "This is a test response from Groq"
|
||||
mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue