fix: update zai model API and baseUrl in generate-models script
This commit is contained in:
@@ -267,9 +267,9 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||||||
models.push({
|
models.push({
|
||||||
id: modelId,
|
id: modelId,
|
||||||
name: m.name || modelId,
|
name: m.name || modelId,
|
||||||
api: "anthropic-messages",
|
api: "openai-completions",
|
||||||
provider: "zai",
|
provider: "zai",
|
||||||
baseUrl: "https://api.z.ai/api/anthropic",
|
baseUrl: "https://api.z.ai/api/coding/paas/v4",
|
||||||
reasoning: m.reasoning === true,
|
reasoning: m.reasoning === true,
|
||||||
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
@@ -278,6 +278,9 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||||||
cacheRead: m.cost?.cache_read || 0,
|
cacheRead: m.cost?.cache_read || 0,
|
||||||
cacheWrite: m.cost?.cache_write || 0,
|
cacheWrite: m.cost?.cache_write || 0,
|
||||||
},
|
},
|
||||||
|
compat: {
|
||||||
|
supportsDeveloperRole: false,
|
||||||
|
},
|
||||||
contextWindow: m.limit?.context || 4096,
|
contextWindow: m.limit?.context || 4096,
|
||||||
maxTokens: m.limit?.output || 4096,
|
maxTokens: m.limit?.output || 4096,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user