Login
Back to Blog
PortuguêsComparison

GLM-5.2 vs Claude Fable 5: orçamento de saída, reasoning_tokens e discount 0.8

Teste prático via API compatível com OpenAI da Crazyrouter, comparando glm-5.2 e claude-fable-5 em matemática, física e uma animação Canvas, com nota sobre o discount 0.8 atual do glm-5.2.

C
Crazyrouter Team
July 6, 2026 / 1 views
Share:
GLM-5.2 vs Claude Fable 5: orçamento de saída, reasoning_tokens e discount 0.8

GLM-5.2 vs Claude Fable 5: a diferença apareceu no orçamento de saída#

Este texto não é um ranking genérico de modelos. No teste real via API, o GLM-5.2 resolveu as tarefas de raciocínio depois que aumentamos o orçamento de saída, mas em limites baixos podia retornar HTTP 200 sem conteúdo visível. O Claude Fable 5 foi mais estável em orçamentos menores e melhor na entrega de um HTML longo e executável.

GLM-5.2 vs Claude Fable 5 benchmark

Por que este teste importa#

The test used the Crazyrouter OpenAI-compatible API rather than a chat UI. That matters because the result was not judged only by prose quality. Each response was checked with operational metadata:

text
Base URL: https://cn.crazyrouter.com/v1
Endpoint: POST /v1/chat/completions
Models: glm-5.2, claude-fable-5
temperature: 0.2
Test date: 2026-07-06

The important fields were max_tokens, completion_tokens, reasoning_tokens, finish_reason, visible content length, whether the generated HTML was closed, and whether the animation actually moved in a browser.

Como o teste foi desenhado#

The benchmark deliberately mixed three task types:

TaskPurposeReference result
MATH-003State-based expectation reasoningExpected flips until HH = 6
PHYS-003Momentum plus energy accountingV = 3.0 m/s, x ≈ 0.148 m
CODE-003-ANIMLong runnable artifact generationComplete 800x500 Canvas animation HTML

The first two tasks measured reasoning. The third task measured whether a model can produce a complete artifact, not merely a convincing partial code block.

Resultados observados#

Taskglm-5.2claude-fable-5
Math, original budgetfinish_reason=length, completion_tokens=1601, reasoning_tokens=1600, visible body emptyfinish_reason=stop, complete and correct
Math, retestCorrect after max_tokens=3200Retest not needed
Physics, original budgetfinish_reason=length, visible body emptyComplete and correct
Physics, retestCorrect after max_tokens=8000Retest not needed
Animation, original budgetEmpty visible HTML at max_tokens=3200Partial HTML, truncated
Animation, retestStill truncated at max_tokens=8000Complete HTML; browser validation passed

The most important observation is that GLM-5.2 was not failing the reasoning itself. In the math and physics tasks, it produced correct answers after a larger output budget. The problem was visibility and completion: a request could return HTTP 200 while the user-facing content was empty or incomplete.

For the long Canvas animation, the difference was sharper. GLM-5.2 produced a visible HTML fragment at max_tokens=8000, but it stopped inside JavaScript and did not close the file. Claude Fable 5 completed the HTML at max_tokens=8000; browser validation showed no console errors, an 800x500 canvas, controls, a speed slider, and changedPixels=55090 after 700 ms.

Leitura de custo-benefício#

No momento da publicação, a pricing API da Crazyrouter retorna discount: 0.8 para glm-5.2. Isso torna o modelo bem competitivo em custo quando sua aplicação consegue monitorar reasoning_tokens, finish_reason e ajustar max_tokens corretamente.

This is the practical tradeoff:

WorkloadBetter fit from this test
Short reasoning with enough output budgetGLM-5.2 can be a cost-effective option
Low-budget reasoning responsesClaude Fable 5 was steadier
Long single-file code generationClaude Fable 5 was stronger in this run
Batch evaluations where metadata is loggedGLM-5.2 becomes easier to operate safely

Do not treat the 0.8 multiplier as a permanent universal price. It is a pricing-data snapshot from Crazyrouter at publication time and should be checked again before a large deployment.

Notas de integração#

Minimal request:

bash
curl https://cn.crazyrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $CRAZYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [
      {
        "role": "user",
        "content": "Solve the HH expected-flips problem with state equations."
      }
    ],
    "temperature": 0.2,
    "max_tokens": 3200
  }'

To compare Claude Fable 5, keep the same payload and change only the model:

json
{
  "model": "claude-fable-5"
}

For production-style evaluations, log this shape for every request:

json
{
  "model": "glm-5.2",
  "max_tokens": 3200,
  "finish_reason": "length",
  "completion_tokens": 3200,
  "reasoning_tokens": 3178,
  "visible_content_chars": 0,
  "html_closed": false,
  "browser_validation": "not_run_incomplete_html"
}

API endpoints should stay clean. Do not add UTM parameters to https://cn.crazyrouter.com/v1. Use tracking only on human-facing article or registration links.

Você pode rodar a mesma chamada compatível com OpenAI na Crazyrouter e comparar os modelos nos seus próprios prompts.

https://crazyrouter.com/register?utm_source=crazyrouter_blog&utm_medium=article&utm_campaign=glm52_fable5_budget_cost_20260706&utm_content=crazyrouter_blog_glm-52-vs-claude-fable-5-output-budget-cost-pt_20260706__bottom&utm_term=glm-5.2+claude+fable+5+benchmark

FAQ#

Did GLM-5.2 fail the reasoning tasks?#

No. In this run, GLM-5.2 solved the math task after max_tokens=3200 and the physics task after max_tokens=8000. The issue was that lower budgets were consumed mostly by reasoning tokens before visible content appeared.

Why not score HTTP 200 as success?#

Because HTTP 200 only means the API call returned. A benchmark answer can still be unusable if finish_reason=length, visible content is empty, or generated code is incomplete.

Why was the animation task included?#

Long code generation exposes a different failure mode. A model can write a convincing first half of a file and still fail if the HTML or JavaScript is cut off.

Is GLM-5.2 still worth testing?#

Yes. The current 0.8 discount multiplier makes it attractive for workloads where you can allocate enough output budget and monitor response metadata.

What should be recorded in future comparisons?#

At minimum: max_tokens, completion_tokens, reasoning_tokens, finish_reason, visible output length, artifact completeness, and runtime validation.

Final verdict#

Conclusão prática: GLM-5.2 é atraente em custo e pode raciocinar bem, mas exige controle de orçamento de saída. Claude Fable 5 foi mais previsível para respostas curtas e para gerar um HTML completo.

Implementation Guides

Topics

Comparison

Related Posts

Como Acessar o GPT-5 e GPT-5.2 via API - Guia Completo para DesenvolvedoresTutorial

Como Acessar o GPT-5 e GPT-5.2 via API - Guia Completo para Desenvolvedores

Aprenda a acessar os modelos mais recentes da OpenAI — GPT-5, GPT-5.2 e o3-pro — por meio de uma API unificada. Guia passo a passo com exemplos em Python, Node.js e curl.

Jan 23
Melhor Gateway de API de IA para Desenvolvedores em 2026: 9 Plataformas TestadasComparison

Melhor Gateway de API de IA para Desenvolvedores em 2026: 9 Plataformas Testadas

Testamos 9 gateways de API de IA para cobertura de modelos, preços, suporte multi-modal e experiência do desenvolvedor.

Mar 27
Guia Rápido da CrazyRouter API

Guia Rápido da CrazyRouter API

Este artigo apresenta como integrar rapidamente a Crazyrouter API, realizar a primeira chamada em 5 minutos, com suporte a OpenAI, Claude, Gemini e outros

Jan 19
Guia de Instalação e Uso do Claude Code - Configuração do Assistente de Programação com IATutorial

Guia de Instalação e Uso do Claude Code - Configuração do Assistente de Programação com IA

Guia completo para instalar e configurar o Claude Code, o assistente de programação com IA. Aprenda a configurar o Node.js, definir tokens de API e começar a programar com IA no seu terminal.

Jan 24
Tutorial da API Text-Embedding-3-Small - Guia do Modelo de Embeddings da OpenAITutorial

Tutorial da API Text-Embedding-3-Small - Guia do Modelo de Embeddings da OpenAI

Guia completo para usar a API text-embedding-3-small da OpenAI para busca semântica, sistemas RAG e correspondência de similaridade. Inclui exemplos em Python, Node.js e comparação de preços.

Jan 26
Clawdbot em Menos de 2 Minutos (HOSPEDAGEM 24/7 GRÁTIS)

Clawdbot em Menos de 2 Minutos (HOSPEDAGEM 24/7 GRÁTIS)

Aprenda a fazer o deploy do Clawdbot (Claude.bot) em menos de dois minutos com hospedagem gratuita 24/7 na AWS. Este tutorial mostra a configuração, integração com canais (WhatsApp, Discord, Telegram), skills como busca na web com Exa e casos de uso reais como assistência em compras usando os óculos inteligentes Meta Ray-Ban.

Jan 26