◉CLAUDE LABJP
●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through
Articles/API & SDK
⬡ API & SDK/2026-07-10Advanced

My Nightly Batch Was Quietly Running on a Bigger Model — Declaring Per-Task Model Ceilings and Enforcing Them

Scatter model names through your code and a cheap batch job will eventually run on an expensive model. Here is a manifest that declares a ceiling per task, a deny-by-default resolver, and a morning audit that catches drift — with working code.

Claude API150Cost DesignModel Selection3Operations25Governance

✦ Premium Article

I opened the billing page and my hand stopped on the trackpad.

Same number of nightly jobs as the month before. The number was 1.7x higher. When you run scheduled work unattended across several sites as a solo developer, a jump like that is not a billing anomaly. It is a signal that something in the design broke.

It took a few minutes to find. A small auxiliary task had been refactored six months earlier to pull its model name from a shared constant. That constant was named for the interactive default, and someone — me — later pointed it at a stronger model. Nobody lied. The judgment that this particular task was fine on a cheap model simply had never been written down anywhere the code could see.

The per-model entitlements and spend alerts that landed for Enterprise in July 2026 close exactly this hole at organizational scale. The same idea works at solo scale, and you can build it yourself. What follows is the implementation I run today across the four Dolice Labs sites.

Treat a model name as a contract, not a setting

To the code, model="claude-opus-4-8" is a configuration value. To operations, it is a statement about how much this task is permitted to spend per invocation.

Contracts scattered across config files get silently rewritten by refactors. So I split the two concerns.

Each task declares the minimum capability it needs and the maximum cost it tolerates. A resolver decides which concrete model satisfies those bounds.

With that split, rewriting a shared constant cannot lift a task above its ceiling. And a task that genuinely needs a stronger model now requires editing the manifest — which means the change shows up as a reviewable diff.

The manifest: what gets declared

Keep the declaration small. Anything larger stops being maintained.

FieldMeaningExample
ceilingStrongest model this task may usesonnet-5
floorBelow this, do not run at allhaiku-4-5
max_output_tokensPer-call output cap4096
daily_usdApproximate daily budget for this task alone0.80
on_ceiling_missBehavior when the request exceeds the ceilingdegrade / fail

The floor exists because silent downgrades are the worst failure mode in this system. Errors announce themselves. A weaker model producing plausible-looking output can go unnoticed for weeks. I wrote about that failure in depth in A Silent Drop to a Weaker Model Is Scarier Than an Error.

Here is a real manifest.

# config/model_entitlements.yaml
_ladder:            # cheapest first. the resolver trusts only this ordering
  - haiku-4-5
  - sonnet-5
  - opus-4-8
 
_aliases:
  haiku-4-5: claude-haiku-4-5-20251001
  sonnet-5:  claude-sonnet-5
  opus-4-8:  claude-opus-4-8
 
tasks:
  news_ticker_summarize:
    ceiling: haiku-4-5
    floor: haiku-4-5
    max_output_tokens: 1024
    daily_usd: 0.15
    on_ceiling_miss: fail
 
  article_draft:
    ceiling: sonnet-5
    floor: sonnet-5
    max_output_tokens: 8192
    daily_usd: 2.50
    on_ceiling_miss: degrade
 
  weekly_seo_synthesis:
    ceiling: opus-4-8
    floor: sonnet-5
    max_output_tokens: 4096
    daily_usd: 1.20
    on_ceiling_miss: degrade

_ladder is explicit so that nothing has to infer price ordering from a model string. Inference like that will betray you the moment a naming convention shifts. When a new model ships, a human edits those three lines. That is the only entry point.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A 120-line deny-by-default policy layer that resolves each task to the cheapest model satisfying its declared ceiling and floor
✦A morning audit script that reconciles declared ceiling, resolved tier, and the model the API actually billed
✦Clear criteria for when to degrade-and-continue versus fail hard, and why cost drift and capability drift deserve opposite treatment
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-11-30
The unit price drops 20%, yet the bill may rise: estimating the Opus 4.5 to 5.5 switch before January 22
claude-opus-4-5-20251101 retires on January 22, 2027, and the official replacement is claude-opus-5-5. Prices fall by a fifth, but the tokenizer changes and thinking can no longer be turned off. You will be able to count the cost per 1,000 of your own requests and pick a replacement and an effort level.
⬡ API & SDK2026-11-25
Five Days Before Sonnet 4.5 Retires: Compare the Three Things That Change Without an Error While the Old Model Still Answers
claude-sonnet-4-5 retires on November 30. Switch the ID to claude-sonnet-5-5 and nothing returns a 400, yet thinking now runs by default, max_tokens covers more than the answer, and stop_reason shifts. Here is a small script to run the same requests on both models before the old one stops answering, and how to read the differences.
⬡ API & SDK2026-11-18
Before Your Customers Pay Through Linked Billing: Reading a 402 or 403 to Find Whose Wallet Is Empty
Linked billing, released in beta on November 17, lets you choose who pays on every Claude API request through billing_policy. When a request billed to a customer comes back as a 402 or 403, here is how I work out which wallet is the cause, when to pay for it myself, and a small Python wrapper that keeps that decision in one place.