Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/types/src/providers/sambanova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor Author

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:

  • Fireworks has it as "deepseek-v3.1"
  • Chutes has it as "deepseek-ai/DeepSeek-V3.1"
  • Vertex has it as "deepseek-v3.1-maas"

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.


export const sambaNovaDefaultModelId: SambaNovaModelId = "Meta-Llama-3.3-70B-Instruct"

Expand Down Expand Up @@ -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,
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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>
13 changes: 13 additions & 0 deletions src/api/providers/__tests__/sambanova.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 } }] })
Expand Down
Loading