fix(presets): update Zhipu coding plan endpoints

This commit is contained in:
makoMakoGo
2026-06-01 23:30:13 +08:00
parent c67494bafc
commit e50ba8b7d4
5 changed files with 20 additions and 20 deletions
+4 -4
View File
@@ -286,10 +286,10 @@ requires_openai_auth = true`,
auth: generateThirdPartyAuth(""),
config: generateThirdPartyConfig(
"zhipu_glm",
"https://open.bigmodel.cn/api/paas/v4",
"https://open.bigmodel.cn/api/coding/paas/v4",
"glm-5.1",
),
endpointCandidates: ["https://open.bigmodel.cn/api/paas/v4"],
endpointCandidates: ["https://open.bigmodel.cn/api/coding/paas/v4"],
apiFormat: "openai_chat",
modelCatalog: modelCatalog([
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
@@ -312,10 +312,10 @@ requires_openai_auth = true`,
auth: generateThirdPartyAuth(""),
config: generateThirdPartyConfig(
"zhipu_glm_en",
"https://api.z.ai/api/paas/v4",
"https://api.z.ai/api/coding/paas/v4",
"glm-5.1",
),
endpointCandidates: ["https://api.z.ai/api/paas/v4"],
endpointCandidates: ["https://api.z.ai/api/coding/paas/v4"],
apiFormat: "openai_chat",
modelCatalog: modelCatalog([
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
+2 -2
View File
@@ -393,7 +393,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
apiKeyUrl: "https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII",
settingsConfig: {
name: "zhipu_glm",
base_url: "https://open.bigmodel.cn/api/paas/v4",
base_url: "https://open.bigmodel.cn/api/coding/paas/v4",
api_key: "",
api_mode: "chat_completions",
models: [{ id: "glm-5.1", name: "GLM-5.1" }],
@@ -411,7 +411,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
apiKeyUrl: "https://z.ai/subscribe?ic=8JVLJQFSKB",
settingsConfig: {
name: "zhipu_glm_en",
base_url: "https://api.z.ai/api/paas/v4",
base_url: "https://api.z.ai/api/coding/paas/v4",
api_key: "",
api_mode: "chat_completions",
models: [{ id: "glm-5.1", name: "GLM-5.1" }],
+6 -6
View File
@@ -306,7 +306,7 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
websiteUrl: "https://open.bigmodel.cn",
apiKeyUrl: "https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII",
settingsConfig: {
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
apiKey: "",
api: "openai-completions",
models: [
@@ -324,8 +324,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
templateValues: {
baseUrl: {
label: "Base URL",
placeholder: "https://open.bigmodel.cn/api/paas/v4",
defaultValue: "https://open.bigmodel.cn/api/paas/v4",
placeholder: "https://open.bigmodel.cn/api/coding/paas/v4",
defaultValue: "https://open.bigmodel.cn/api/coding/paas/v4",
editorValue: "",
},
apiKey: {
@@ -344,7 +344,7 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
websiteUrl: "https://z.ai",
apiKeyUrl: "https://z.ai/subscribe?ic=8JVLJQFSKB",
settingsConfig: {
baseUrl: "https://api.z.ai/v1",
baseUrl: "https://api.z.ai/api/coding/paas/v4",
apiKey: "",
api: "openai-completions",
models: [
@@ -362,8 +362,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
templateValues: {
baseUrl: {
label: "Base URL",
placeholder: "https://api.z.ai/v1",
defaultValue: "https://api.z.ai/v1",
placeholder: "https://api.z.ai/api/coding/paas/v4",
defaultValue: "https://api.z.ai/api/coding/paas/v4",
editorValue: "",
},
apiKey: {
+6 -6
View File
@@ -442,7 +442,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
npm: "@ai-sdk/openai-compatible",
name: "Zhipu GLM",
options: {
baseURL: "https://open.bigmodel.cn/api/paas/v4",
baseURL: "https://open.bigmodel.cn/api/coding/paas/v4",
apiKey: "",
setCacheKey: true,
},
@@ -456,8 +456,8 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
templateValues: {
baseURL: {
label: "Base URL",
placeholder: "https://open.bigmodel.cn/api/paas/v4",
defaultValue: "https://open.bigmodel.cn/api/paas/v4",
placeholder: "https://open.bigmodel.cn/api/coding/paas/v4",
defaultValue: "https://open.bigmodel.cn/api/coding/paas/v4",
editorValue: "",
},
apiKey: {
@@ -475,7 +475,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
npm: "@ai-sdk/openai-compatible",
name: "Zhipu GLM en",
options: {
baseURL: "https://api.z.ai/v1",
baseURL: "https://api.z.ai/api/coding/paas/v4",
apiKey: "",
setCacheKey: true,
},
@@ -489,8 +489,8 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
templateValues: {
baseURL: {
label: "Base URL",
placeholder: "https://api.z.ai/v1",
defaultValue: "https://api.z.ai/v1",
placeholder: "https://api.z.ai/api/coding/paas/v4",
defaultValue: "https://api.z.ai/api/coding/paas/v4",
editorValue: "",
},
apiKey: {
@@ -44,14 +44,14 @@ const expectedChatPresets = new Map<
[
"Zhipu GLM",
{
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
contextWindows: { "glm-5.1": 200000 },
},
],
[
"Zhipu GLM en",
{
baseUrl: "https://api.z.ai/api/paas/v4",
baseUrl: "https://api.z.ai/api/coding/paas/v4",
contextWindows: { "glm-5.1": 200000 },
},
],