Skip to content

Provider: add GLM (Zhipu) #73

Description

@csmatar

Summary

Add GLM (Zhipu) as a provider. Zhipu's API is OpenAI Chat Completions-compatible, so this reuses the seam from #71data row + pricing rows + a contract test, not a new adapter.

Blocked by #71 (the OpenAI-compatible provider seam).

Scope

  • Registry entry: provider name zhipu, base_url = Zhipu's OpenAI-compatible endpoint, key from ZHIPUAI_API_KEY. Verify the current base URL and env-var name at implementation time (there are separate CN and international hosts).
  • Pricing rows in dryfire/data/pricing.yaml for the GLM family (e.g. zhipu:glm-4.6).
  • Offline contract test from a recorded GLM payload (one tool-call turn).
  • One @pytest.mark.live smoke test behind ZHIPUAI_API_KEY.

Acceptance

  • provider: zhipu runs from a recorded cassette with no adapter code beyond the seam.
  • make check green, offline.

Notes

GLM is also reachable via an Anthropic-compatible endpoint on some hosts; we standardize on the OpenAI-compatible path here to reuse the seam. Flag it if tool-calling parity forces the Anthropic path instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersproviderModel provider / adapter support

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions