mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Use deepseek-r1 recommended temperature
This commit is contained in:
@@ -110,12 +110,20 @@ export class OpenRouterHandler implements ApiHandler, SingleCompletionHandler {
|
|||||||
maxTokens = 8_192
|
maxTokens = 8_192
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let temperature = 0
|
||||||
|
switch (this.getModel().id) {
|
||||||
|
case "deepseek/deepseek-r1":
|
||||||
|
// Recommended temperature for DeepSeek reasoning models
|
||||||
|
temperature = 0.6
|
||||||
|
}
|
||||||
|
|
||||||
// https://openrouter.ai/docs/transforms
|
// https://openrouter.ai/docs/transforms
|
||||||
let fullResponseText = ""
|
let fullResponseText = ""
|
||||||
const stream = await this.client.chat.completions.create({
|
const stream = await this.client.chat.completions.create({
|
||||||
model: this.getModel().id,
|
model: this.getModel().id,
|
||||||
max_tokens: maxTokens,
|
max_tokens: maxTokens,
|
||||||
temperature: 0,
|
temperature: temperature,
|
||||||
messages: openAiMessages,
|
messages: openAiMessages,
|
||||||
stream: true,
|
stream: true,
|
||||||
// This way, the transforms field will only be included in the parameters when openRouterUseMiddleOutTransform is true.
|
// This way, the transforms field will only be included in the parameters when openRouterUseMiddleOutTransform is true.
|
||||||
|
|||||||
Reference in New Issue
Block a user