mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
feat: add openai/gpt-oss-120b model to Chutes provider
- Added openai/gpt-oss-120b to ChutesModelId type definition - Added model configuration with 128k context window and 32k max tokens - Added test coverage for the new model - Fixes #6973
This commit is contained in:
parent
5f3c67fa91
commit
a578952d01
2 changed files with 32 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ export type ChutesModelId =
|
|||
| "zai-org/GLM-4.5-Air"
|
||||
| "zai-org/GLM-4.5-FP8"
|
||||
| "moonshotai/Kimi-K2-Instruct-75k"
|
||||
| "openai/gpt-oss-120b"
|
||||
|
||||
export const chutesDefaultModelId: ChutesModelId = "deepseek-ai/DeepSeek-R1-0528"
|
||||
|
||||
|
|
@ -278,4 +279,13 @@ export const chutesModels = {
|
|||
outputPrice: 0.5926,
|
||||
description: "Moonshot AI Kimi K2 Instruct model with 75k context window.",
|
||||
},
|
||||
"openai/gpt-oss-120b": {
|
||||
maxTokens: 32768,
|
||||
contextWindow: 131072,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description: "OpenAI GPT OSS 120B model - latest open source coding model.",
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
|
|
|||
|
|
@ -275,6 +275,28 @@ describe("ChutesHandler", () => {
|
|||
)
|
||||
})
|
||||
|
||||
it("should return openai/gpt-oss-120b model with correct configuration", () => {
|
||||
const testModelId: ChutesModelId = "openai/gpt-oss-120b"
|
||||
const handlerWithModel = new ChutesHandler({
|
||||
apiModelId: testModelId,
|
||||
chutesApiKey: "test-chutes-api-key",
|
||||
})
|
||||
const model = handlerWithModel.getModel()
|
||||
expect(model.id).toBe(testModelId)
|
||||
expect(model.info).toEqual(
|
||||
expect.objectContaining({
|
||||
maxTokens: 32768,
|
||||
contextWindow: 131072,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description: "OpenAI GPT OSS 120B model - latest open source coding model.",
|
||||
temperature: 0.5, // Default temperature for non-DeepSeek models
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it("completePrompt method should return text from Chutes API", async () => {
|
||||
const expectedResponse = "This is a test response from Chutes"
|
||||
mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue