Study guides / CCDV-F

Quick reference

One condensed cheat-sheet per domain - the tables and rules worth re-reading right before the exam.

Model Tier Comparison

ModelInput / 1MOutput / 1MContextThinking DefaultNotes
Claude Fable 5$10.00$50.001M tokensAlways on - cannot be disabledRequires 30-day retention; unavailable under ZDR
Claude Opus 5$5.00$25.001M tokensOn by default; disable allowed only at effort high or belowOwn rate-limit bucket, separate from Opus 4.x
Claude Sonnet 5$2.00$10.001M tokensAdaptive by defaultBalanced production workhorse
Claude Haiku 4.5$1.00$5.00200K tokensLightweightFastest/cheapest - high-volume, simple tasks

Output is billed at roughly 5x the input rate on every tier. stop_reason: "refusal" is a normal 200 response on Fable 5 and Opus 5 - check it before reading content. Distractor to reject: "newest/most capable = best default choice" - each tier is a different point on the trade-off curve, not a strict upgrade.

The Four Token Buckets

Bucketusage FieldRate vs. Base InputWhen It's Billed
Regular inputinput_tokens1xAnything not cached
Cache writecache_creation_input_tokens~1.25x (5-min TTL) / ~2x (1-hour TTL)First time a prefix is cached
Cache readcache_read_input_tokens~0.1xA later call reuses the cached prefix
Outputoutput_tokens~5xEvery generated token

If cache_read_input_tokens stays at zero across repeated, near-identical requests, something is silently breaking the cache (an interpolated timestamp, unsorted JSON, a varying tool list).

Cost Myths vs. Reality

MythReality
max_tokens caps cost safelyIt's an enforced ceiling the model can't see; hitting it truncates output (stop_reason: "max_tokens") - a failed attempt, not a saving
Caching makes repeated input freeCache reads cost ~0.1x input rate, not zero; cache writes cost *more* than a plain input token
Fewer API calls = lower costCost tracks token volume across all four buckets, not call count - 2 bloated calls can cost more than 20 lean ones
Image cost scales with what matters in the imageImages are tokenized by pixel area (~1 token per 28x28 patch) - downscale (e.g. to 1280x720, ~1,200 tokens) to cut cost with no accuracy loss
count_tokens runs inference to estimate costIt returns an exact input count with no inference run - free pre-flight estimate
Checking org-wide spend costs tokensThe Usage and Cost Admin API reports the four buckets in aggregate without spending any tokens - report reads aren't inference calls

Four Questions for Model Selection

QuestionPoints Toward Fast/Cheap TierPoints Toward Strongest Tier
Task difficultyLookup, template-fill, simple classificationMulti-step reasoning, nuanced judgment, ambiguity
Latency budgetTight (interactive chat turn)None (nightly/async job → also consider Batches API)
VolumeHigh (multiplies any per-call price gap)Low (per-call gap stays small in absolute terms)
Cost of a wrong answerLow (human re-routes in seconds)High (autonomous action, no review, real downstream cost)

Scenario questions usually turn on identifying which one factor dominates - they don't all point the same direction. "Price the tail, not the median": always test candidate models on deliberately hard edge cases, since cost and error concentrate in the hardest slice of a workload.

Stepping-Down Method (Order Matters)

  1. Provisionally pick a tier using the four-question framework.
  2. Sweep effort (low → high) on that tier against an eval set that includes hard cases.
  3. If a lower effort holds accuracy, take that saving first - no model change needed.
  4. Only then consider dropping to the next tier down.
  5. Confirm the new tier's supported parameters and effort levels - they differ by tier.
  6. Reset effort to that tier's own default; don't carry over a hardcoded value.
  7. Re-sweep from there, one notch at a time - never several changes at once.
  8. Revisit periodically: volume grows, and a cheaper tier's capability can close the gap over time.

Distractor to reject: judging keep/revert from a single test run. A difference of a task or two of pass rate on one comparison is noise, not signal - use repeated trials against a fixed eval set.

Three Independent Optimisation Knobs

LeverControlsWhere It LivesKey Caveat
EffortThinking depth and tool-call consolidation togetheroutput_config.effort: low/medium/high/xhigh/maxChanging it mid-conversation invalidates the prompt cache
Adaptive thinkingWhether the model reasons step-by-step before answeringthinking: {type: "adaptive"}Replaces the removed budget_tokens on current models (Fable 5, Opus 5, Sonnet 5)
Task budget (beta)Token ceiling for a whole agentic loop, advisory - model paces itselfoutput_config.task_budget, requires streamingFloor of 20,000 tokens; changing mid-task invalidates the cache

Not the same as max_tokens: that's a hard, model-blind ceiling with zero thoroughness effect - hitting it truncates output rather than saving cost.

Effort Pitfalls & Patterns

Symptom / SituationFixWhy
Want to save cost on a model with thinking on by default (e.g. Opus 5)Lower effort, don't disable thinkingDisabling thinking can leak a tool call into visible text instead of a tool_use block - no error raised, agentic loop silently breaks
Code uses budget_tokens on Fable 5 / Opus 5 / Sonnet 5Switch to effort + adaptive thinkingbudget_tokens is removed on current models and errors
Research/knowledge-style task, cost-sensitiveTry low effort firstAccuracy curve tends to be nearly flat - low effort often captures most of the accuracy
Long-horizon coding/agentic taskSweep effort carefully before cutting itEffort is a genuine trade-off here - dropping it can give up real accuracy
Workload has a cheap, reliable pass/fail signal (tests, validator)Run everything at low effort, re-run only failures at high effortCaptures most of the accuracy of always running high, while paying the higher cost only on the harder tail

Cost Optimisation Order & Driver Matching

Free wins first (lower cost, no quality loss - apply always): prompt caching (biggest lever in agentic loops - an uncached loop's cost grows roughly with the square of turn count), the Batches API (50% off every token type, async/latency-insensitive work only, no mid-batch tool loop), and input hygiene (retrieval instead of inlining large docs, pruning unused tool schemas, downscaling images).

Trade-offs after that (exchange cost for capability - validate against an eval set each time): effort/task budget tuning, model tier / cheap-tier-first routing, then multi-model architectures.

Cost DriverMatching LeverNot This
Repeated system prompt / tool schema on every callPrompt cachingA cheaper model
Large reference doc inlined into every promptRetrieval tool (input hygiene)Batching
Async work nobody waits on synchronouslyBatches APIEffort tuning
Bulky tool results piling up in a long loopContext editing / compaction / pruningA model downgrade (doesn't touch the accumulation)
Thinking/tool-call depth dominates spend, eval headroom existsEffort first, tier drop only afterJumping straight to a cheaper model
Two-Model PatternPays Off WhenBackfires When
Advisor (cheap model runs loop, escalates hard cases)Wide capability gap + reliable escalation signalEscalation signal is weak - can be worse than the strong model alone
Orchestrator (strong model plans, delegates bulk sub-tasks)Genuine bulk fan-out of independent workA single dependent chain - one tuned model usually beats the delegate/merge overhead

Distractor to reject: treating caching, batching, and routing as mutually exclusive - a mature system stacks them. Always measure cost per completed task, not per token or per request - a cheaper config that fails more often can cost more overall.