Skip to content

Commit c91ec4c

Browse files
authored
Remove hard-coded temperature from LM Studio API requests and add support for easoning_content in LM Studio API responses. (RooCodeInc#3971)
1 parent d85c8ce commit c91ec4c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/beige-dingos-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
Remove hard-coded temperature from LM Studio API requests and add support for `reasoning_content` in LM Studio API responses.

src/api/providers/lmstudio.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export class LmStudioHandler implements ApiHandler {
2727
const stream = await this.client.chat.completions.create({
2828
model: this.getModel().id,
2929
messages: openAiMessages,
30-
temperature: 0,
3130
stream: true,
3231
})
3332
for await (const chunk of stream) {
@@ -38,6 +37,12 @@ export class LmStudioHandler implements ApiHandler {
3837
text: delta.content,
3938
}
4039
}
40+
if (delta && "reasoning_content" in delta && delta.reasoning_content) {
41+
yield {
42+
type: "reasoning",
43+
reasoning: (delta.reasoning_content as string | undefined) || "",
44+
}
45+
}
4146
}
4247
} catch (error) {
4348
// LM Studio doesn't return an error code/body for now

0 commit comments

Comments
 (0)