Back to musings
CodingAI

86% as Good, 1/6th the Cost — GLM 4.6, Claude Code, & Synthetic

2 min read

The Numbers

GLM-4.6 is 85.6% as good as Sonnet 4.5 at 16.7% of the price. That works out to 5.13x better cost-value.

Performance calculation:
I averaged across all four benchmarks: (23.433.3+69.571.4+5663+38.444.7)/4=0.856\left(\frac{23.4}{33.3} + \frac{69.5}{71.4} + \frac{56}{63} + \frac{38.4}{44.7}\right) / 4 = 0.856

Here's the breakdown:

Cost calculation:
For pay-per-token pricing, the pricing is as follows:

  • Claude Sonnet 4.5: $3.00 input / $15.00 output per million tokens
  • GLM-4.6: $0.60 input / $2.00 output per million tokens

This puts the average cost ratio at (0.603.00+2.0015.00)/2=0.167\left(\frac{0.60}{3.00} + \frac{2.00}{15.00}\right) / 2 = 0.167

The value ratio comes out to 0.8560.167=5.13x\frac{0.856}{0.167} = \textbf{5.13x}.

For subscription plans, the math is similar:

  • $20/mo GLM vs $100/mo Sonnet: 0.8560.20=4.28x\frac{0.856}{0.20} = \textbf{4.28x} (same value ratio as pay-per-token)
  • $60/mo GLM vs $200/mo Sonnet: 0.8560.30=2.85x\frac{0.856}{0.30} = \textbf{2.85x} (still solid value)

Setup: GLM-4.6 via Claude Code

You can use GLM-4.6 through Claude Code with Synthetic's API. It has better availability and runs faster than z.ai's direct coding plan.

Synthetic is also private and doesn't use your data for model training. z.ai is based in China, so who knows what they're doing with your data.

1. Install Claude Code
Follow the quickstart guide

2. Get your Synthetic API key
Sign up here

3. Add this config to your .zshrc or .bashrc:

export SYNTHETIC_API_KEY="your-api-key-here"

synclaude() {
  ANTHROPIC_BASE_URL=https://api.synthetic.new/anthropic \
  ANTHROPIC_AUTH_TOKEN=${SYNTHETIC_API_KEY} \
  ANTHROPIC_DEFAULT_OPUS_MODEL=hf:zai-org/GLM-4.6 \
  ANTHROPIC_DEFAULT_SONNET_MODEL=hf:zai-org/GLM-4.6 \
  ANTHROPIC_DEFAULT_HAIKU_MODEL=hf:zai-org/GLM-4.6 \
  CLAUDE_CODE_SUBAGENT_MODEL=hf:zai-org/GLM-4.6 \
  CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \
  claude "$@"
}

4. Run it from your terminal

synclaude

You can swap hf:zai-org/GLM-4.6 with any model from Synthetic's API docs. I haven't tested the other models, but they're available.

Join their Discord for support.

Share this post