Skip to content

Commit 093e84e

Browse files
committed
🐛 fix(providers): fix prefer-const lint warnings after rebase (#404)
1 parent 91b03f7 commit 093e84e

6 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/api/providers/anthropic-vertex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class AnthropicVertexHandler extends BaseProvider implements SingleComple
217217

218218
getModel() {
219219
const modelId = this.options.apiModelId
220-
let id = modelId && modelId in vertexModels ? (modelId as VertexModelId) : vertexDefaultModelId
220+
const id = modelId && modelId in vertexModels ? (modelId as VertexModelId) : vertexDefaultModelId
221221
let info: ModelInfo = vertexModels[id]
222222

223223
// Check if 1M context beta should be enabled for supported models
@@ -278,7 +278,7 @@ export class AnthropicVertexHandler extends BaseProvider implements SingleComple
278278
async completePrompt(prompt: string) {
279279
const signal = this.createAbortSignal()
280280
try {
281-
let {
281+
const {
282282
id,
283283
info: { supportsPromptCache },
284284
temperature,

src/api/providers/anthropic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
358358

359359
getModel() {
360360
const modelId = this.options.apiModelId
361-
let id = modelId && modelId in anthropicModels ? (modelId as AnthropicModelId) : anthropicDefaultModelId
361+
const id = modelId && modelId in anthropicModels ? (modelId as AnthropicModelId) : anthropicDefaultModelId
362362
let info: ModelInfo = anthropicModels[id]
363363

364364
// If 1M context beta is enabled for supported models, update the model info

src/api/providers/lite-llm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export class LiteLLMHandler extends RouterProvider implements SingleCompletionHa
187187
}
188188

189189
// Required by some providers; others default to max tokens allowed
190-
let maxTokens: number | undefined = info.maxTokens ?? undefined
190+
const maxTokens: number | undefined = info.maxTokens ?? undefined
191191

192192
// Check if this is a GPT-5 model that requires max_completion_tokens instead of max_tokens
193193
const isGPT5Model = this.isGpt5(modelId)

src/api/providers/minimax.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export class MiniMaxHandler extends BaseProvider implements SingleCompletionHand
8383
): ApiStream {
8484
const signal = this.createAbortSignal()
8585
try {
86-
let stream: AnthropicStream<Anthropic.Messages.RawMessageStreamEvent>
8786
const cacheControl: CacheControlEphemeral = { type: "ephemeral" }
8887
const { id: modelId, info, maxTokens, temperature } = this.getModel()
8988

@@ -117,7 +116,7 @@ export class MiniMaxHandler extends BaseProvider implements SingleCompletionHand
117116
tool_choice: convertOpenAIToolChoice(metadata?.tool_choice),
118117
}
119118

120-
stream = await this.client.messages.create(requestParams, { signal })
119+
const stream = await this.client.messages.create(requestParams, { signal })
121120

122121
let inputTokens = 0
123122
let outputTokens = 0

src/api/providers/requesty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class RequestyHandler extends BaseProvider implements SingleCompletionHan
213213
try {
214214
const { id: model, maxTokens: max_tokens, temperature } = await this.fetchModel()
215215

216-
let openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [{ role: "system", content: prompt }]
216+
const openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [{ role: "system", content: prompt }]
217217

218218
const completionParams: RequestyChatCompletionParams = {
219219
model,

src/api/providers/unbound.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class UnboundHandler extends BaseProvider implements SingleCompletionHand
201201
try {
202202
const { id: model, maxTokens: max_tokens, temperature } = await this.fetchModel()
203203

204-
let openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [{ role: "system", content: prompt }]
204+
const openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [{ role: "system", content: prompt }]
205205

206206
const completionParams: UnboundChatCompletionParams = {
207207
model,

0 commit comments

Comments
 (0)