fix: resolve TypeScript errors in DeepSeekHandler

- Rename private client property to deepSeekClient to avoid conflict with parent class
This commit is contained in:
Roo Code 2025-12-02 15:43:32 +00:00
parent cdf7f739fb
commit 73c848a335

View file

@ -16,7 +16,7 @@ import type { ApiHandlerCreateMessageMetadata } from "../index"
import { handleOpenAIError } from "./utils/openai-error-handler"
export class DeepSeekHandler extends OpenAiHandler {
private client: OpenAI
private deepSeekClient: OpenAI
constructor(options: ApiHandlerOptions) {
super({
@ -29,7 +29,7 @@ export class DeepSeekHandler extends OpenAiHandler {
})
// Create our own OpenAI client since the parent's is private
this.client = new OpenAI({
this.deepSeekClient = new OpenAI({
baseURL: options.deepSeekBaseUrl ?? "https://api.deepseek.com",
apiKey: options.deepSeekApiKey ?? "not-provided",
})
@ -85,7 +85,7 @@ export class DeepSeekHandler extends OpenAiHandler {
let stream
try {
stream = await this.client.chat.completions.create(requestOptions)
stream = await this.deepSeekClient.chat.completions.create(requestOptions)
} catch (error) {
throw handleOpenAIError(error, "DeepSeek")
}