-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: add GPT-OSS-120B model to SambaNova provider #8187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have these specifications (64K context window, /bin/sh.6/.2 pricing) been verified against SambaNova's actual API documentation? It would be good to confirm these values are accurate. |
||
| 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> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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") | ||
| }) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good test coverage for GPT-OSS-120B! If we add DeepSeek V3.1, we should add a similar test for it as well. |
||
|
|
||
| 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 } }] }) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue #8185 mentions that SambaNova has both "deepseek v3.1 and gpt oss 120 b" available. While we've added GPT-OSS-120B, we're missing DeepSeek V3.1.
Looking at other providers in the codebase, they have DeepSeek V3.1 defined:
Should we add "DeepSeek-V3.1" here to fully address the issue? The existing "DeepSeek-V3-0324" appears to be a date-versioned model (March 24), not the V3.1 mentioned in the issue.