mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
feat: add GPT-OSS-120B model to SambaNova provider
- Added GPT-OSS-120B to SambaNovaModelId type - Added model configuration with 64K context window - Added test coverage for the new model Fixes #8185
This commit is contained in:
parent
b75ef1dd83
commit
d9e48db021
2 changed files with 23 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ export type SambaNovaModelId =
|
|||
| "Llama-4-Maverick-17B-128E-Instruct"
|
||||
| "Llama-3.3-Swallow-70B-Instruct-v0.4"
|
||||
| "Qwen3-32B"
|
||||
| "GPT-OSS-120B"
|
||||
|
||||
export const sambaNovaDefaultModelId: SambaNovaModelId = "Meta-Llama-3.3-70B-Instruct"
|
||||
|
||||
|
|
@ -87,4 +88,13 @@ export const sambaNovaModels = {
|
|||
outputPrice: 0.8,
|
||||
description: "Alibaba Qwen 3 32B model with 8K context window.",
|
||||
},
|
||||
"GPT-OSS-120B": {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 65536,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0.6,
|
||||
outputPrice: 1.2,
|
||||
description: "OpenAI GPT-OSS 120B model with 64K context window.",
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,19 @@ describe("SambaNovaHandler", () => {
|
|||
expect(model.info).toEqual(sambaNovaModels[testModelId])
|
||||
})
|
||||
|
||||
it("should return GPT-OSS-120B model when specified", () => {
|
||||
const testModelId: SambaNovaModelId = "GPT-OSS-120B"
|
||||
const handlerWithModel = new SambaNovaHandler({
|
||||
apiModelId: testModelId,
|
||||
sambaNovaApiKey: "test-sambanova-api-key",
|
||||
})
|
||||
const model = handlerWithModel.getModel()
|
||||
expect(model.id).toBe(testModelId)
|
||||
expect(model.info).toEqual(sambaNovaModels[testModelId])
|
||||
expect(model.info.contextWindow).toBe(65536)
|
||||
expect(model.info.description).toContain("GPT-OSS 120B")
|
||||
})
|
||||
|
||||
it("completePrompt method should return text from SambaNova API", async () => {
|
||||
const expectedResponse = "This is a test response from SambaNova"
|
||||
mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue