Skip to content

Commit 03a0111

Browse files
committed
fix(zai): align handler generics with expanded model ids to satisfy CI compile step
1 parent a0621e4 commit 03a0111

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/api/providers/zai.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
mainlandZAiDefaultModelId,
66
type InternationalZAiModelId,
77
type MainlandZAiModelId,
8+
type ModelInfo,
89
ZAI_DEFAULT_TEMPERATURE,
910
zaiApiLineConfigs,
1011
} from "@roo-code/types"
@@ -13,11 +14,11 @@ import type { ApiHandlerOptions } from "../../shared/api"
1314

1415
import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"
1516

16-
export class ZAiHandler extends BaseOpenAiCompatibleProvider<InternationalZAiModelId | MainlandZAiModelId> {
17+
export class ZAiHandler extends BaseOpenAiCompatibleProvider<string> {
1718
constructor(options: ApiHandlerOptions) {
1819
const isChina = zaiApiLineConfigs[options.zaiApiLine ?? "international_coding"].isChina
19-
const models = isChina ? mainlandZAiModels : internationalZAiModels
20-
const defaultModelId = isChina ? mainlandZAiDefaultModelId : internationalZAiDefaultModelId
20+
const models = (isChina ? mainlandZAiModels : internationalZAiModels) as unknown as Record<string, ModelInfo>
21+
const defaultModelId = (isChina ? mainlandZAiDefaultModelId : internationalZAiDefaultModelId) as string
2122

2223
super({
2324
...options,

0 commit comments

Comments
 (0)