The GLM Coding Plan now supports the latest GLM-5.1 model for all users (Max, Pro, and Lite), and you can switch between models within your preferred Coding Agent.
Method 1: In the terminal, run vim ~/.claude/settings.json to open and edit the file. When you’re done, press Esc, type :wq, and save your changes.Method 2: In Finder, choose Go → Go to Folder, then enter ~/.claude/settings.json to locate and edit the configuration file.You can also ask directly in Claude Code:To use GLM-5.1, add or replace the following environment variables in settings.json:
For users who are already using OpenClaw and cannot switch to glm-5.1 by selecting a provider model directly you can update the configuration manually after completing the provider setup in the previous step.
Locate the configuration file at ~/.openclaw/openclaw.json, as shown below:In ~/.openclaw/openclaw.json, add the glm-5.1 model to the models.providers.zai.models array.Append the following object after the last model in the array. Be sure to include a comma if required by JSON syntax:
After making these changes, restart the gateway by running: openclaw gateway restartOnce restarted, you should be able to use the glm-5.1 model directly. You can run openclaw tui in the terminal to enter the chat interface, where you should see that glm-5.1 is now in use.
This currently only works with coding agents that support custom model configuration. If your agent tool does not allow custom model settings, you will need to wait for official support in a future release.
Model:Choose Custom Model and enter the model name, such as glm-5.1 or glm-5
Other settings:
Uncheck Support Images
Set Context Window Size to 200000
Adjust temperature and any other parameters based on your task requirements
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Overview - Z.AI DEVELOPER DOCUMENT","description":"Use GLM models like GLM-5.3 \u0026 GLM-5.3-FLASH for AI coding in Claude Code, Kilo Code, Cline, OpenCode, Clawdbot/OpenClaw and more. Plans from $18/month—fast, reliable code generation and tool use for daily dev work.","colors":{"primary":"#141618","light":"#9fa0a0","dark":"#141618"},"logo":{"light":"https://mintcdn.com/zhipu-32152247/B_E8wI-eiNa1QlPV/logo/dark.svg?fit=max\u0026auto=format\u0026n=B_E8wI-eiNa1QlPV\u0026q=85\u0026s=75deefa9dea5bdbc84d4da68885c267f","dark":"https://mintcdn.com/zhipu-32152247/B_E8wI-eiNa1QlPV/logo/light.svg?fit=max\u0026auto=format\u0026n=B_E8wI-eiNa1QlPV\u0026q=85\u0026s=c1ecf1af358fa8eeab8c06052337f8f6","href":"https://z.ai/model-api"},"favicon":"https://mintcdn.com/zhipu-32152247/ZWmez2h5N6TCeIMS/favicon.svg?fit=max\u0026auto=format\u0026n=ZWmez2h5N6TCeIMS\u0026q=85\u0026s=f41adc4aa1fc28f2be33d46791810b1f","api":{"openapi":["openapi.json"],"params":{"expanded":"all"},"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"all","languages":["bash","python","javascript","java"],"prefill":true}},"appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"https://z.ai/manage-apikey/apikey-list","label":"API Keys"},{"href":"https://z.ai/manage-apikey/billing","label":"Payment Method"}]},"footer":{"socials":{"x":"https://x.com/Zai_org","github":"https://github.com/zai-org","discord":"https://discord.gg/QR7SARHRxK","linkedin":"https://www.linkedin.com/company/zdotai"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zhipu-32152247","hasAudioNarration":false,"actualSubdomain":"zhipu-32152247","customDomains":["docs.z.ai"],"gitSource":{"type":"github","owner":"zai-doc","repo":"zai-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae867131795b614d9d61588","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Guides","count":25},{"language":"default","tag":"API Reference","count":18},{"language":"default","tag":"Coding Plan","count":18},{"language":"default","tag":"Get Started","count":10},{"language":"default","tag":"Guide","count":8},{"language":"default","tag":"Capabilities","count":7},{"language":"default","tag":"SDKs Guide","count":5},{"language":"default","tag":"Agent API","count":4},{"language":"default","tag":"Tool API","count":4},{"language":"default","tag":"GLM Coding Plan","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#footer div:last-child{display:none}.md\\:h-10{height:3rem}.prose-dark :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900}.prose-dark :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900}"}],"page":{"pagePath":"devpack/using5.1","slug":"/devpack/using5.1","pageMetadata":{"title":"How to Switch Models","description":null,"href":"/devpack/using5.1"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,img:`img`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:_jsx(_components.p,{children:`The GLM Coding Plan now supports the latest GLM-5.1 model for all users (Max, Pro, and Lite), and you can switch between models within your preferred Coding Agent.`})}),`\n`,_jsx(Heading,{level:`2`,id:`switching-models-in-claude-code`,children:`Switching Models in Claude Code`}),`\n`,_jsx(Heading,{level:`3`,id:`step-0-claude-code-default-configuration`,children:`Step 0 Claude Code default configuration`}),`\n`,_jsx(_components.p,{children:`By default, Claude Code maps its internal model environment variables to GLM models as follows:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ANTHROPIC_DEFAULT_OPUS_MODEL`}),`:`,_jsx(_components.code,{children:`GLM-4.7`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ANTHROPIC_DEFAULT_SONNET_MODEL`}),`:`,_jsx(_components.code,{children:`GLM-4.7`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-update-the-default-configuration`,children:`Step 1 Update the default configuration`}),`\n`,_jsx(Heading,{level:`4`,id:`for-windows-users`,children:`For Windows Users`}),`\n`,_jsxs(_components.p,{children:[`Locate the configuration file at `,_jsx(_components.code,{children:`~/.claude/settings.json`}),`, as shown below:`]}),`\n`,_jsx(Heading,{level:`4`,id:`for-macos-users`,children:`For macOS Users`}),`\n`,_jsxs(_components.p,{children:[`Method 1: In the terminal, run `,_jsx(_components.code,{children:`vim ~/.claude/settings.json`}),` to open and edit the file. When you’re done, press Esc, type `,_jsx(_components.code,{children:`:wq`}),`, and save your changes.`]}),`\n`,_jsxs(_components.p,{children:[`Method 2: In Finder, choose Go → Go to Folder, then enter `,_jsx(_components.code,{children:`~/.claude/settings.json`}),` to locate and edit the configuration file.`]}),`\n`,_jsx(_components.p,{children:`You can also ask directly in Claude Code:`}),`\n`,_jsxs(_components.p,{children:[`To use GLM-5.1, add or replace the following environment variables in `,_jsx(_components.code,{children:`settings.json`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"env\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ANTHROPIC_DEFAULT_SONNET_MODEL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"glm-5.1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ANTHROPIC_DEFAULT_OPUS_MODEL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"glm-5.1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-confirm-that-the-model-has-been-switched`,children:`Step 2 Confirm that the model has been switched`}),`\n`,_jsxs(_components.p,{children:[`Open a new terminal window and run `,_jsx(_components.code,{children:`claude`}),` to launch Claude Code. Then type `,_jsx(_components.code,{children:`/status`}),` in Claude Code to verify the current model:`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.img,{src:`https://cdn.bigmodel.cn/markdown/1774606248371image.png?attname=image.png`,alt:`Description`})}),`\n`,_jsx(Heading,{level:`2`,id:`switching-models-in-openclaw`,children:`Switching Models in OpenClaw`}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`For users who are already using OpenClaw and cannot switch to glm-5.1 by selecting a provider model directly you can update the configuration manually after completing the provider setup in the previous step.`}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`step-1-update-the-default-configuration-2`,children:`Step 1 Update the default configuration`}),`\n`,_jsxs(_components.p,{children:[`Locate the configuration file at `,_jsx(_components.code,{children:`~/.openclaw/openclaw.json`}),`, as shown below:`]}),`\n`,_jsxs(_components.p,{children:[`In `,_jsx(_components.code,{children:`~/.openclaw/openclaw.json`}),`, add the `,_jsx(_components.code,{children:`glm-5.1`}),` model to the `,_jsx(_components.code,{children:`models.providers.zai.models`}),` array.Append the following object after the last model in the array. Be sure to include a comma if required by JSON syntax:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"glm-5.1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GLM-5.1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reasoning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cacheRead\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cacheWrite\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contextWindow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`204800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`131072`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Then update the default model under `,_jsx(_components.code,{children:`agents.defaults.model.primary`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"primary\": \"zai/glm-5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Change it to:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"primary\": \"zai/glm-5.1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Next, under agents.defaults.models, add:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"zai/glm-5.1\": {}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`4`,id:`step-2-updated-configuration-reference`,children:`Step 2 Updated configuration reference`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Below are reference snippets showing what the updated configuration should look like:`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`models.providers.zai.models`}),` section:`]}),`\n`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`30`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"models\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"glm-5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"GLM-5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"reasoning\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"input\": [\"text\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"cost\": {\"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"contextWindow\": 204800,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"maxTokens\": 131072`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"glm-4.7\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"GLM-4.7\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"reasoning\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"input\": [\"text\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"cost\": {\"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"contextWindow\": 204800,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"maxTokens\": 131072`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"glm-5.1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"GLM-5.1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"reasoning\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"input\": [\"text\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"cost\": {\"input\": 0, \"output\": 0, \"cacheRead\": 0, \"cacheWrite\": 0},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"contextWindow\": 204800,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"maxTokens\": 131072`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`agents.defaults.model.primary`}),` section:`]}),`\n`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"model\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"primary\": \"zai/glm-5.1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"fallbacks\": [\"zai/glm-4.7\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ol,{start:`3`,children:[`\n`,_jsx(_components.li,{children:`agents.defaults.models section:`}),`\n`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"models\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"zai/glm-5\": {\"alias\": \"GLM\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"zai/glm-4.7\": {},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"zai/glm-5.1\": {}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`After making these changes, restart the gateway by running: `,_jsx(_components.code,{children:`openclaw gateway restart`})]}),`\n`,_jsxs(_components.p,{children:[`Once restarted, you should be able to use the glm-5.1 model directly. You can run `,_jsx(_components.code,{children:`openclaw tui`}),` in the terminal to enter the chat interface, where you should see that glm-5.1 is now in use.`]}),`\n`,_jsx(Heading,{level:`2`,id:`switching-models-in-other-tools`,children:`Switching Models in Other Tools`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This currently only works with coding agents that support custom model configuration. If your agent tool does not allow custom model settings, you will need to wait for official support in a future release.`})}),`\n`,_jsx(Heading,{level:`3`,id:`using-cline-as-an-example`,children:`Using Cline as an example:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.img,{src:`https://cdn.bigmodel.cn/markdown/177461553487720260327-204436.jpeg?attname=20260327-204436.jpeg`,alt:`Description`})}),`\n`,_jsx(_components.p,{children:`Please use the following settings:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`API Provider:Select OpenAI Compatible`}),`\n`,_jsxs(_components.li,{children:[`Base URL:Enter `,_jsx(_components.a,{href:`https://api.z.ai/api/coding/paas/v4`,children:`https://api.z.ai/api/coding/paas/v4`})]}),`\n`,_jsx(_components.li,{children:`API Key:Enter your Z.AI API key`}),`\n`,_jsx(_components.li,{children:`Model:Choose Custom Model and enter the model name, such as glm-5.1 or glm-5`}),`\n`,_jsxs(_components.li,{children:[`Other settings:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Uncheck Support Images`}),`\n`,_jsx(_components.li,{children:`Set Context Window Size to 200000`}),`\n`,_jsx(_components.li,{children:`Adjust temperature and any other parameters based on your task requirements`}),`\n`]}),`\n`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How to Switch Models","description":null,"href":"/devpack/using5.1"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Switching Models in Claude Code","slug":"switching-models-in-claude-code","depth":2,"children":[{"title":"Step 0 Claude Code default configuration","slug":"step-0-claude-code-default-configuration","depth":3,"children":[]},{"title":"Step 1 Update the default configuration","slug":"step-1-update-the-default-configuration","depth":3,"children":[]},{"title":"For Windows Users","slug":"for-windows-users","depth":4,"children":[]},{"title":"For macOS Users","slug":"for-macos-users","depth":4,"children":[]},{"title":"Step 2 Confirm that the model has been switched","slug":"step-2-confirm-that-the-model-has-been-switched","depth":3,"children":[]}]},{"title":"Switching Models in OpenClaw","slug":"switching-models-in-openclaw","depth":2,"children":[{"title":"Step 1 Update the default configuration","slug":"step-1-update-the-default-configuration-2","depth":4,"children":[]},{"title":"Step 2 Updated configuration reference","slug":"step-2-updated-configuration-reference","depth":4,"children":[]}]},{"title":"Switching Models in Other Tools","slug":"switching-models-in-other-tools","depth":2,"children":[{"title":"Using Cline as an example:","slug":"using-cline-as-an-example","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"zhipu-32152247","siteName":"Overview - Z.AI DEVELOPER DOCUMENT","title":"How to Switch Models - Overview - Z.AI DEVELOPER DOCUMENT","navMaps":{"firstHrefInVersion":{"English":{"href":"/devpack/using5.1","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T09:24:26.288Z","originalFileLocation":"devpack/using5.1.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Overview - Z.AI DEVELOPER DOCUMENT\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to Switch Models - Overview - Z.AI DEVELOPER DOCUMENT\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Overview - Z.AI DEVELOPER DOCUMENT\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.z.ai/devpack/using5.1\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zhipu-32152247.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+Switch+Models\u0026amp;theme=28cd11ffa578495b9d6a62e8\u0026amp;signature=5a119ca5655a10218da501204b8ab04e5606ba0657ac5aaccfc59e928855dc71\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How to Switch Models - Overview - Z.AI DEVELOPER DOCUMENT\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zhipu-32152247.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+Switch+Models\u0026amp;theme=28cd11ffa578495b9d6a62e8\u0026amp;signature=5a119ca5655a10218da501204b8ab04e5606ba0657ac5aaccfc59e928855dc71\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zhipu-32152247/ksfquWFAc8TQf_Hb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Overview - Z.AI DEVELOPER DOCUMENT\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#141618\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.z.ai/devpack/using5.1\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/devpack/using5.1.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Overview - Z.AI DEVELOPER DOCUMENT\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Overview - Z.AI DEVELOPER DOCUMENT","nav":{"global":null,"versions":[{"version":"English","tabs":[{"tab":"Guides","groups":[{"group":"Get Started","pages":[{"title":"Quick Start","href":"/guides/overview/quick-start"},{"title":"Overview","href":"/guides/overview/overview"},{"title":"Pricing","href":"/guides/overview/pricing"},{"title":"Core Parameters","href":"/guides/overview/concept-param"},{"group":"SDKs Guide","pages":[{"title":"HTTP API Calls","href":"/guides/develop/http/introduction"},{"title":"Official Python SDK","href":"/guides/develop/python/introduction"},{"title":"Official Java SDK","href":"/guides/develop/java/introduction"},{"title":"OpenAI Python SDK","href":"/guides/develop/openai/python"},{"title":"LangChain Integration","href":"/guides/develop/langchain/introduction"}]},{"title":"Migrate to GLM-5.3","href":"/guides/overview/migrate-to-glm-new"}]},{"group":"Models","pages":[{"title":"GLM-5.3-Flash/FlashX","tag":"New","href":"/guides/vlm/glm-5.3-flash"},{"title":"GLM-5.3","tag":"Hot","href":"/guides/llm/glm-5.3"},{"title":"GLM-5.2","href":"/guides/llm/glm-5.2"}]},{"group":"Capabilities","pages":[{"title":"Thinking Mode","href":"/guides/capabilities/thinking-mode"},{"title":"Deep Thinking","href":"/guides/capabilities/thinking"},{"title":"Streaming Messages","href":"/guides/capabilities/streaming"},{"title":"Tool Streaming Output","href":"/guides/capabilities/stream-tool"},{"title":"Function Calling","href":"/guides/capabilities/function-calling"},{"title":"Context Caching","href":"/guides/capabilities/cache"},{"title":"Structured Output","href":"/guides/capabilities/struct-output"}]},{"group":"Tools","pages":[{"title":"Web Search","href":"/guides/tools/web-search"},{"title":"Stream Tool Call","href":"/guides/tools/stream-tool"}]},{"group":"Agents","pages":[{"title":"GLM Slide/Poster Agent(beta)","href":"/guides/agents/slide"},{"title":"Translation Agent","href":"/guides/agents/translation"},{"title":"Video Effect Template Agent","href":"/guides/agents/video-template"}]}]},{"tab":"API Reference","groups":[{"group":"Using the APIs","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/api-code"},{"title":"Rate Limits","url":"https://z.ai/manage-apikey/rate-limits","href":"/api-reference/rate-limit"}]},{"group":"Model API","pages":[{"title":"Chat Completion","openapi":"POST /paas/v4/chat/completions","href":"/api-reference/llm/chat-completion"}]},{"group":"Image API","pages":[{"title":"Generate Image","openapi":"POST /paas/v4/images/generations","href":"/api-reference/image/generate-image"},{"title":"Generate Image(Async)","openapi":"POST /paas/v4/async/images/generations","href":"/api-reference/image/generate-image-async"},{"title":"Retrieve Result","openapi":"GET /paas/v4/async-result/{id}","href":"/api-reference/image/get-image-status"}]},{"group":"Video API","pages":[{"title":"Generate Video(Async)","openapi":"POST /paas/v4/videos/generations","href":"/api-reference/video/generate-video"},{"title":"Retrieve Result","openapi":"GET /paas/v4/async-result/{id}","href":"/api-reference/video/get-video-status"}]},{"group":"Audio API","pages":[{"title":"Audio Transcriptions","openapi":"POST /paas/v4/audio/transcriptions","href":"/api-reference/audio/audio-transcriptions"}]},{"group":"Tool API","pages":[{"title":"Tokenizer","openapi":"POST /paas/v4/tokenizer","href":"/api-reference/tools/tokenizer"},{"title":"Layout Parsing","openapi":"POST /paas/v4/layout_parsing","href":"/api-reference/tools/layout-parsing"},{"title":"Web Search","openapi":"POST /paas/v4/web_search","href":"/api-reference/tools/web-search"},{"title":"Web Reader","openapi":"POST /paas/v4/reader","href":"/api-reference/tools/web-reader"}]},{"group":"Agent API","pages":[{"title":"Agent Chat","openapi":"POST /v1/agents","href":"/api-reference/agents/agent"},{"title":"File Upload","openapi":"POST /paas/v4/files","href":"/api-reference/agents/file-upload"},{"title":"Retrieve Result","openapi":"POST /v1/agents/async-result","href":"/api-reference/agents/get-async-result"},{"title":"Conversation History","openapi":"POST /v1/agents/conversation","href":"/api-reference/agents/agent-conversation"}]}]},{"tab":"Coding Plan","pages":[{"group":"GLM Coding Plan","pages":[{"title":"Overview","href":"/devpack/overview"},{"title":"Usage Policy","href":"/devpack/usage-policy"},{"title":"FAQ","href":"/devpack/faq"},{"title":"Team Plan Benefits","href":"/devpack/teamplan"}]},{"group":"Guide","pages":[{"title":"Quick Start","href":"/devpack/quick-start"},{"title":"Coding Tool Helper","href":"/devpack/extension/coding-tool-helper"},{"title":"Tool Integration","href":"/devpack/tool/others"},{"title":"How to Switch Models","href":"/devpack/latest-model"},{"group":"MCP Integration","pages":[{"title":"Vision MCP Server","href":"/devpack/mcp/vision-mcp-server"},{"title":"Web Search MCP Server","href":"/devpack/mcp/search-mcp-server"},{"title":"Web Reader MCP Server","href":"/devpack/mcp/reader-mcp-server"},{"title":"Zread MCP Server","href":"/devpack/mcp/zread-mcp-server"}]}]},{"group":"Notice","pages":[{"title":"API Key Management Guide","href":"/devpack/notice/api-key-management"},{"title":"Plan Update Announcement","href":"/devpack/notice/usage-revision"},{"title":"Legacy Plan Migration Notice","href":"/devpack/transition"}]},{"group":"Learning Resources","pages":[{"title":"Best Practice","href":"/devpack/resources/best-practice"},{"title":"Memory-mechanism","href":"/devpack/resources/memory-mechanism"}]},{"group":"Campaign Rules","pages":[{"title":"Invite Friends, Get Credits","href":"/devpack/credit-campaign-rules"}]}]},{"tab":"Released Notes","pages":[{"title":"New Released","href":"/release-notes/new-released"}]},{"tab":"Terms and Policy","pages":[{"title":"Privacy Policy","href":"/legal-agreement/privacy-policy"},{"title":"Terms of Use","href":"/legal-agreement/terms-of-use"},{"title":"Subscriptions, Fees, and Payment","href":"/legal-agreement/subscription-terms"}]},{"tab":"Help Center","pages":[{"title":"FAQ","href":"/help/faq"}]}]}]},"basePath":"","title":"How to Switch Models - Overview - Z.AI DEVELOPER DOCUMENT","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-CE4cYsJE.js","lightbox-handle-r17bVUz3.js"]}