Skip to content

feat request: add GLM Coding Plan as a LLM provider #134

@FnSK4R17s

Description

@FnSK4R17s

Add support for GLM Coding Plan (ChatGLM by Zhipu AI) as an LLM provider option.

Current state: Dexter supports OpenAI, Anthropic, Google Gemini, Ollama, and OpenRouter as LLM providers (configured in src/model/llm.ts via getChatModel() and resolveProvider()).

Proposed changes:

  • Add a glm provider to resolveProvider() in src/model/llm.ts
  • Add GLM model instantiation in getChatModel() (likely via the OpenAI-compatible API endpoint, since GLM offers an OpenAI-compatible interface)
  • Register available GLM models (e.g., glm-4, glm-4-flash, codegeex-4) in the model selection flow
  • Add GLM_API_KEY environment variable support
  • Update env.example with the new key

Notes: GLM's API is OpenAI-compatible, so it may be possible to use ChatOpenAI with a custom baseURL pointing to https://open.bigmodel.cn/api/paas/v4/, similar to how OpenRouter is handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions