Class ZhipuAIClient

java.lang.Object
com.tnsai.llm.providers.AbstractLLMClient
com.tnsai.llm.providers.ZhipuAIClient
All Implemented Interfaces:
JsonCapableLLMClient, com.tnsai.llm.LLMClient

public class ZhipuAIClient extends AbstractLLMClient implements JsonCapableLLMClient
ZhipuAI (Z.AI/Zhipu) LLM client implementation. Provides access to ZhipuAI's GLM models via OpenAI-compatible API.

ZhipuAI is a Chinese AI company offering advanced language models with strong coding and multilingual capabilities.

Supported models:

  • glm-4-plus - GLM-4 Plus (most capable)
  • glm-4-flash - GLM-4 Flash (fast and efficient)
  • glm-4-air - GLM-4 Air (balanced)
  • glm-4-airx - GLM-4 AirX (extended context)
  • glm-4-long - GLM-4 Long (1M context window)
  • glm-4v-plus - GLM-4V Plus (vision capable)
  • glm-4v-flash - GLM-4V Flash (fast vision)
  • codegeex-4 - CodeGeeX 4 (code-specialized)

Configuration via environment variables:

  • ZHIPUAI_API_KEY - Required API key for authentication
  • ZHIPUAI_BASE_URL - Optional, defaults to https://open.bigmodel.cn/api/paas/v4
See Also: