summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-12-19 16:37:36 -0600
committerAiden Cline <[email protected]>2025-12-19 16:37:36 -0600
commitedfe2e4f1c32edee60f88dcc5603be3d23d15cb1 (patch)
tree0ab67faf3de88479a19ccfbc602daa757e1755fc
parent1bc1ea8b477d384d64ca8084aa70d69bbc4397ff (diff)
downloadopencode-edfe2e4f1c32edee60f88dcc5603be3d23d15cb1.tar.gz
opencode-edfe2e4f1c32edee60f88dcc5603be3d23d15cb1.zip
test: fix test case
-rw-r--r--packages/opencode/test/provider/transform.test.ts56
1 files changed, 3 insertions, 53 deletions
diff --git a/packages/opencode/test/provider/transform.test.ts b/packages/opencode/test/provider/transform.test.ts
index 2d8dc5506..17ae7f558 100644
--- a/packages/opencode/test/provider/transform.test.ts
+++ b/packages/opencode/test/provider/transform.test.ts
@@ -200,7 +200,9 @@ describe("ProviderTransform.message - DeepSeek reasoning content", () => {
toolcall: true,
input: { text: true, audio: false, image: false, video: false, pdf: false },
output: { text: true, audio: false, image: false, video: false, pdf: false },
- interleaved: false,
+ interleaved: {
+ field: "reasoning_content",
+ },
},
cost: {
input: 0.001,
@@ -229,58 +231,6 @@ describe("ProviderTransform.message - DeepSeek reasoning content", () => {
expect(result[0].providerOptions?.openaiCompatible?.reasoning_content).toBe("Let me think about this...")
})
- test("DeepSeek model ID containing 'deepseek' matches (case insensitive)", () => {
- const msgs = [
- {
- role: "assistant",
- content: [
- { type: "reasoning", text: "Thinking..." },
- {
- type: "tool-call",
- toolCallId: "test",
- toolName: "get_weather",
- input: { location: "Hangzhou" },
- },
- ],
- },
- ] as any[]
-
- const result = ProviderTransform.message(msgs, {
- id: "someprovider/deepseek-reasoner",
- providerID: "someprovider",
- api: {
- id: "deepseek-reasoner",
- url: "https://api.someprovider.com",
- npm: "@ai-sdk/openai-compatible",
- },
- name: "SomeProvider DeepSeek Reasoner",
- capabilities: {
- temperature: true,
- reasoning: true,
- attachment: false,
- toolcall: true,
- input: { text: true, audio: false, image: false, video: false, pdf: false },
- output: { text: true, audio: false, image: false, video: false, pdf: false },
- interleaved: false,
- },
- cost: {
- input: 0.001,
- output: 0.002,
- cache: { read: 0.0001, write: 0.0002 },
- },
- limit: {
- context: 128000,
- output: 8192,
- },
- status: "active",
- options: {},
- headers: {},
- release_date: "2023-04-01",
- })
-
- expect(result[0].providerOptions?.openaiCompatible?.reasoning_content).toBe("Thinking...")
- })
-
test("Non-DeepSeek providers leave reasoning content unchanged", () => {
const msgs = [
{