Skip to content

Commit d3de137

Browse files
committed
Remove Doubao embedder and clean up provider code
- Removed all Doubao embedder-related code - Cleaned up commented code and personal comments in src/api/providers/doubao.ts - Updated related imports and configurations
1 parent 83d415c commit d3de137

File tree

7 files changed

+2
-95
lines changed

7 files changed

+2
-95
lines changed

packages/types/src/codebase-index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export const codebaseIndexModelsSchema = z.object({
4848
"openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
4949
gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
5050
mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
51-
doubao: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
5251
})
5352

5453
export type CodebaseIndexModels = z.infer<typeof codebaseIndexModelsSchema>

src/api/providers/doubao.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { DOUBAO_API_BASE_URL, doubaoDefaultModelId, doubaoModels } from "@roo-co
44
import { getModelParams } from "../transform/model-params"
55
import { ApiStreamUsageChunk } from "../transform/stream"
66

7-
// by a fan of Doubao, his name on Github is AntiMoron.
87
// Core types for Doubao API
98
interface ChatCompletionMessageParam {
109
role: "system" | "user" | "assistant" | "developer"
@@ -50,17 +49,6 @@ interface ChatCompletionChunk {
5049
}
5150
}
5251

53-
// interface ApiHandlerOptions {
54-
// doubaoBaseUrl?: string
55-
// doubaoApiKey?: string
56-
// doubaoHeaders?: Record<string, string>
57-
// doubaoModelId?: string
58-
// doubaoStreamingEnabled?: boolean
59-
// modelTemperature?: number
60-
// includeMaxTokens?: boolean
61-
// modelMaxTokens?: number
62-
// }
63-
6452
export class DoubaoHandler extends OpenAiHandler {
6553
constructor(options: ApiHandlerOptions) {
6654
super({

src/services/code-index/constants/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,3 @@ export const BATCH_PROCESSING_CONCURRENCY = 10
2929

3030
/**Gemini Embedder */
3131
export const GEMINI_MAX_ITEM_TOKENS = 2048
32-
33-
/**Doubao Embedder */
34-
export const DOUBAO_MAX_ITEM_TOKENS = 2048

src/services/code-index/embedders/doubao.ts

Lines changed: 0 additions & 76 deletions
This file was deleted.

src/services/code-index/embedders/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ export * from "./openai"
33
export * from "./ollama"
44
export * from "./gemini"
55
export * from "./mistral"
6-
export * from "./doubao"

src/shared/embeddingModels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Defines profiles for different embedding models, including their dimensions.
33
*/
44

5-
export type EmbedderProvider = "openai" | "ollama" | "openai-compatible" | "gemini" | "mistral" | "doubao" // Add other providers as needed
5+
export type EmbedderProvider = "openai" | "ollama" | "openai-compatible" | "gemini" | "mistral" // Add other providers as needed
66

77
export interface EmbeddingModelProfile {
88
dimension: number

webview-ui/src/context/ExtensionStateContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
238238
codebaseIndexSearchMaxResults: undefined,
239239
codebaseIndexSearchMinScore: undefined,
240240
},
241-
codebaseIndexModels: { ollama: {}, openai: {}, doubao: {} },
241+
codebaseIndexModels: { ollama: {}, openai: {} },
242242
alwaysAllowUpdateTodoList: true,
243243
includeDiagnosticMessages: true,
244244
maxDiagnosticMessages: 50,

0 commit comments

Comments
 (0)