mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: add browser-use support for Qwen3-Coder-480B models on Cerebras
- Enable supportsComputerUse for qwen-3-coder-480b-free and qwen-3-coder-480b models - Add comprehensive tests to verify computer use support - Fixes #6693
This commit is contained in:
parent
1d714c8ce4
commit
33152ae999
2 changed files with 59 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ export const cerebrasModels = {
|
|||
contextWindow: 64000,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
supportsComputerUse: true,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description:
|
||||
|
|
@ -21,6 +22,7 @@ export const cerebrasModels = {
|
|||
contextWindow: 128000,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
supportsComputerUse: true,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -175,4 +175,61 @@ describe("CerebrasHandler", () => {
|
|||
// Test fallback token estimation logic
|
||||
})
|
||||
})
|
||||
|
||||
describe("computer use support", () => {
|
||||
it("should return supportsComputerUse true for qwen-3-coder-480b-free model", () => {
|
||||
const testModelId: CerebrasModelId = "qwen-3-coder-480b-free"
|
||||
const handlerWithModel = new CerebrasHandler({
|
||||
cerebrasApiKey: "test-api-key",
|
||||
apiModelId: testModelId,
|
||||
})
|
||||
const { id, info } = handlerWithModel.getModel()
|
||||
// The model ID is routed from qwen-3-coder-480b-free to qwen-3-coder-480b
|
||||
expect(id).toBe("qwen-3-coder-480b")
|
||||
// But the info should be from the original model (qwen-3-coder-480b-free)
|
||||
expect("supportsComputerUse" in info && info.supportsComputerUse).toBe(true)
|
||||
expect(info.maxTokens).toBe(40000)
|
||||
expect(info.contextWindow).toBe(64000)
|
||||
expect(info.inputPrice).toBe(0)
|
||||
expect(info.outputPrice).toBe(0)
|
||||
expect(info.description).toContain("SOTA coding model")
|
||||
expect(info.description).toContain("$0 free tier")
|
||||
})
|
||||
|
||||
it("should return supportsComputerUse true for qwen-3-coder-480b model", () => {
|
||||
const testModelId: CerebrasModelId = "qwen-3-coder-480b"
|
||||
const handlerWithModel = new CerebrasHandler({
|
||||
cerebrasApiKey: "test-api-key",
|
||||
apiModelId: testModelId,
|
||||
})
|
||||
const { id, info } = handlerWithModel.getModel()
|
||||
expect(id).toBe(testModelId)
|
||||
expect("supportsComputerUse" in info && info.supportsComputerUse).toBe(true)
|
||||
expect(info.maxTokens).toBe(40000)
|
||||
expect(info.contextWindow).toBe(128000)
|
||||
expect(info.inputPrice).toBe(0)
|
||||
expect(info.outputPrice).toBe(0)
|
||||
expect(info.description).toContain("SOTA coding model")
|
||||
})
|
||||
|
||||
it("should not have supportsComputerUse for other Cerebras models", () => {
|
||||
const otherModels: CerebrasModelId[] = [
|
||||
"llama-3.3-70b",
|
||||
"qwen-3-235b-a22b-instruct-2507",
|
||||
"qwen-3-32b",
|
||||
"qwen-3-235b-a22b-thinking-2507",
|
||||
]
|
||||
|
||||
otherModels.forEach((modelId) => {
|
||||
const handlerWithModel = new CerebrasHandler({
|
||||
cerebrasApiKey: "test-api-key",
|
||||
apiModelId: modelId,
|
||||
})
|
||||
const { id, info } = handlerWithModel.getModel()
|
||||
expect(id).toBe(modelId)
|
||||
// Should be undefined or false
|
||||
expect("supportsComputerUse" in info ? info.supportsComputerUse : undefined).toBeFalsy()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue