Skip to content

Commit 194b574

Browse files
committed
Back to main
1 parent 2ccab14 commit 194b574

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

src/api/providers/openai.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import { convertToR1Format } from "../transform/r1-format"
1313
import { convertToSimpleMessages } from "../transform/simple-format"
1414
import { ApiStream } from "../transform/stream"
1515

16-
export const DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6
17-
const OPENAI_DEFAULT_TEMPERATURE = 0
18-
1916
export class OpenAiHandler implements ApiHandler, SingleCompletionHandler {
2017
protected options: ApiHandlerOptions
2118
private client: OpenAI
@@ -73,9 +70,7 @@ export class OpenAiHandler implements ApiHandler, SingleCompletionHandler {
7370

7471
const requestOptions: OpenAI.Chat.Completions.ChatCompletionCreateParamsStreaming = {
7572
model: modelId,
76-
temperature:
77-
this.options.modelTemperature ??
78-
(deepseekReasoner ? DEEP_SEEK_DEFAULT_TEMPERATURE : OPENAI_DEFAULT_TEMPERATURE),
73+
temperature: 0,
7974
messages: convertedMessages,
8075
stream: true as const,
8176
stream_options: { include_usage: true },

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ type GlobalStateKey =
123123
| "customModes" // Array of custom modes
124124
| "unboundModelId"
125125
| "unboundModelInfo"
126-
| "modelTemperature"
127126

128127
export const GlobalFileNames = {
129128
apiConversationHistory: "api_conversation_history.json",
@@ -1588,7 +1587,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
15881587
unboundApiKey,
15891588
unboundModelId,
15901589
unboundModelInfo,
1591-
modelTemperature,
15921590
} = apiConfiguration
15931591
await this.updateGlobalState("apiProvider", apiProvider)
15941592
await this.updateGlobalState("apiModelId", apiModelId)
@@ -1630,7 +1628,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
16301628
await this.storeSecret("unboundApiKey", unboundApiKey)
16311629
await this.updateGlobalState("unboundModelId", unboundModelId)
16321630
await this.updateGlobalState("unboundModelInfo", unboundModelInfo)
1633-
await this.updateGlobalState("modelTemperature", modelTemperature)
16341631
if (this.cline) {
16351632
this.cline.api = buildApiHandler(apiConfiguration)
16361633
}
@@ -2391,7 +2388,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
23912388
unboundApiKey,
23922389
unboundModelId,
23932390
unboundModelInfo,
2394-
modelTemperature,
23952391
] = await Promise.all([
23962392
this.getGlobalState("apiProvider") as Promise<ApiProvider | undefined>,
23972393
this.getGlobalState("apiModelId") as Promise<string | undefined>,
@@ -2468,7 +2464,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24682464
this.getSecret("unboundApiKey") as Promise<string | undefined>,
24692465
this.getGlobalState("unboundModelId") as Promise<string | undefined>,
24702466
this.getGlobalState("unboundModelInfo") as Promise<ModelInfo | undefined>,
2471-
this.getGlobalState("modelTemperature") as Promise<number | undefined>,
24722467
])
24732468

24742469
let apiProvider: ApiProvider
@@ -2527,7 +2522,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
25272522
unboundApiKey,
25282523
unboundModelId,
25292524
unboundModelInfo,
2530-
modelTemperature,
25312525
},
25322526
lastShownAnnouncementId,
25332527
customInstructions,

src/shared/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export interface ApiHandlerOptions {
6161
unboundApiKey?: string
6262
unboundModelId?: string
6363
unboundModelInfo?: ModelInfo
64-
modelTemperature?: number
6564
}
6665

6766
export type ApiConfiguration = ApiHandlerOptions & {

0 commit comments

Comments
 (0)