Skip to content
Apothem
Comparación

Apothem vs. raw GLM backend wiring

Why route GLM (Z.ai) backend configuration through Apothem instead of hand-wiring environment variables per project.

[Machine-seeded — pending review] This page is seeded from the English source and awaits native-language review per the i18n review gate.

GLM (Z.ai) is a model backend a compatible harness points at by setting a base URL and a key. You can export those environment variables by hand, per project, per machine, forever. Apothem's glm adapter records the backend endpoints and operator-configurable placeholders in one provider file and keeps that file consistent across every project. This page contrasts hand-wiring that backend against managing it with Apothem.

Effort comparison

TaskRaw hand-configApothem-managed
Record the backend URLsMemorize and re-export per projectWritten into one provider file
Source of truthEach shell's own exportsOne canonical provider file
Keep backends aligned across projectsRe-wire per projectRendered the same way every time
Update the configHand-edit every projectapothem update --harness glm --project <path>
Remove the configManual deleteapothem uninstall with a backup

What Apothem manages

The glm adapter renders a single provider file at <project>/.apothem/providers/glm.toml and writes nothing else. It records the Anthropic-compatible base URL (https://api.z.ai/api/anthropic), the OpenAI-compatible base URL (https://api.z.ai/api/coding/paas/v4), an auth-token placeholder, and model-mapping placeholders. Your Z.ai key and your model-id choices stay operator-owned — Apothem never writes a real secret and pins no version-volatile model id.

Migration path

  1. Run apothem profile init to create the shared profile if you have not yet.
  2. Run apothem install --harness glm --project <path> to render the glm.toml provider file.
  3. Fill in your Z.ai key and the model ids you want from the current Z.ai documentation.
  4. Run apothem verify --harness glm --project <path> to confirm the config landed.
  5. Use apothem update --harness glm --project <path> for every later change.

On this page