Skip to content

Commit 71e3bfc

Browse files
committed
🐛 fix(providers): fix prefer-const lint warnings after rebase (#404)
1 parent f2bfe60 commit 71e3bfc

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
@@ -219,7 +219,7 @@ export class AnthropicVertexHandler extends BaseProvider implements SingleComple
219219

220220
getModel() {
221221
const modelId = this.options.apiModelId
222-
let id = modelId && modelId in vertexModels ? (modelId as VertexModelId) : vertexDefaultModelId
222+
const id = modelId && modelId in vertexModels ? (modelId as VertexModelId) : vertexDefaultModelId
223223
let info: ModelInfo = vertexModels[id]
224224

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

src/api/providers/anthropic.ts

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

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

365365
// 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
@@ -84,7 +84,6 @@ export class MiniMaxHandler extends BaseProvider implements SingleCompletionHand
8484
): ApiStream {
8585
const signal = this.createAbortSignal()
8686
try {
87-
let stream: AnthropicStream<Anthropic.Messages.RawMessageStreamEvent>
8887
const cacheControl: CacheControlEphemeral = { type: "ephemeral" }
8988
const { id: modelId, info, maxTokens, temperature } = this.getModel()
9089

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

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

123122
let inputTokens = 0
124123
let outputTokens = 0

src/api/providers/requesty.ts

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

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

219219
const completionParams: RequestyChatCompletionParams = {
220220
model,

src/api/providers/unbound.ts

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

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

207207
const completionParams: UnboundChatCompletionParams = {
208208
model,

0 commit comments

Comments
 (0)