Skip to content
Cloud Score Docs

Roll out an optimization safely

Promote one optimization mechanism from observe to auto without surprising your callers: read the would-apply counts, set a confidence floor, confirm the promotion, verify it per request in Observability, read the savings on Optimizations, and roll back in one save.

WhereGatewayOptimization SettingsNeeds a connected providerNeeds enabled modelsNeeds gateway trafficOpen in Cloud Score
The Settings tab of Optimization settings: Workspace defaults with the Prompt Optimization switch, the reference model and the response cache mode, then the Mechanisms table with a mode, min confidence and last 7 days counts per mechanism, and the output budget line.
Optimization settings: the workspace defaults, then a mode per mechanism.
On this page

Prompt Optimization: optimize, review, then run

Prompt Optimization has one ON/OFF control, defaults ON, and accepts any prompt length. In Playground, Optimize prompt prepares a complete optimized prompt before answer routing, at the level you pick — Standard, Balanced or Thorough. Live counts use a real backend tokenizer. Review the original, optimized version and diff, then choose Run original or Run optimized. Our checks cannot guarantee that meaning is preserved, which is why you review the result. Editing the request invalidates its comparison. Workspace defaults are under Optimization › Settings.

Playground explicitly requests a bounded optimization and shows its recorded cost. A rejected, unavailable or unhelpful result falls back to your original without hiding its expense. Requests sent ON without a prepared proposal are optimized by structural rules only. Comparison details show the outcome, the rules applied and the measured work time. Infrastructure still consumes resources; unallocated compute keeps fully loaded savings unknown. Historical optimization expenses remain recorded and are not reset to zero.

The execution receipt distinguishes the selected prompt from the prompt actually sent for the answer, including no provider send when a cache supplies it. Optimization can have a recorded cost even when the original is selected or no answer is generated. Unknown infrastructure cost keeps fully loaded net unknown. Fewer tokens do not establish a latency or quality improvement. Analytics, ROI and Reports reuse Prompt Optimization evidence with production/demo filters and daily, weekly and monthly views.

See Playground for comparison and recovery, and Analytics for measurement coverage. Historical compression receipts do not establish choices or costs that were never recorded.

The path

Optimizationsread the observe counts
Observabilityverify per request
Optimizationsread the savings

Every mechanism climbs the same ladder. Nothing on it changes a request until you move it to auto and confirm.

off

nothing runs; the plan records skip / not_available

observe

the full decision runs and is recorded; nothing is applied

auto

applied only when confidence reaches the mechanism's minimum

Anything new starts in observe.

In-flight dedup, Output budget, Routing adjustments and Context caching ship at observe. The two response caches ship at auto but only act on requests that a policy cache_mode or the Response cache workspace default has opted in. Prompt Optimization has a separate ON/OFF control, defaults ON, and needs no compression policy. Playground comparisons run with a bounded hosted rewrite and require review; ordinary ON requests without a prepared proposal retain deterministic rules. Review changed wording and estimated input savings before adopting a candidate.

Read what observe would do

Why: a mechanism in observe already records what it would have done. Read that record before you let it act, and note the quality baseline you will compare against later.

The Overview tab of Optimizations, next to Prompt Optimization: the 30 days, 90 days, 180 days and 1 year range switch, the Provider, Model, Team, Application and Agent filter chips with + More, the reference-model coverage line, eight tiles (Projected annual savings, Saved (net), Actual / Would-have-paid, Saved (gross), Routing savings, Compressed tokens, Cache-served requests, Provider cache-read tokens), the Savings breakdown chart of daily Cache + dedup, Compression and Routing savings with its Hour, Day, Week and Month switch, then the top of Breakdown.
Optimizations: what was saved against the reference model, in eight tiles and a savings breakdown by mechanism over time.
  1. Click Optimizations under Analytics in the sidebar and keep 30 days.

    The range (30 days, 90 days, 180 days or 1 year) and the filter bar (Provider, Model, Team, API key and so on) narrow every figure on the Overview tab.

  2. Read By mechanism.

    Columns are Mechanism, Mode, Applied, Would apply, Saved, Would save and Conf p50. The Mode badge names the current mode. Would apply and Would save read — here for every mechanism except Prompt Optimization; the per-window observe counts are in Optimization settings.

  3. Get the 7-day observe counts from Settings.

    The Settings tab of Optimization settings counts applied and would-apply requests per mechanism in its Last 7 days column, described in the next station.

  4. Note your quality baseline in Usage & cost.

    Switch its Breakdown by to Model and write down Success and $/completed request per model. After promotion you want Success unchanged and $/completed requestlower. Gateway health's Request outcomes and Retries & fallbacks give the same baseline over time.

  5. Read Recommendations and the Output budget line.

    Recommendations on Optimizations names what a change could still save, with an estimated monthly effect that is never added to savings. The Output budget, last 30 days (UTC) line, under the mechanism table in Optimization settings, shows Caps applied, Observed safety rate, Rollbacks · cost and Added latency p50 / p95.

Without reference-priced traffic, the Savings waterfall reads No requests with a reference model in this range. Set one under Optimization settings › Reference model first; see Costs, savings, and estimates.

Promote one mechanism

Why: promote one mechanism per save. The confirm dialog then names exactly one change, and every difference you see afterwards in Observability and on Optimizations has one cause.

The Settings tab of Optimization settings: Workspace defaults with the Prompt Optimization switch, the reference model and the response cache mode, then the Mechanisms table with a mode, min confidence and last 7 days counts per mechanism, and the output budget line.
Optimization settings: the workspace defaults, then a mode per mechanism.
  1. Open Optimization settings under Gateway; the Settings tab opens first.

    The mechanism table has columns Mechanism, Mode, Min confidence, Last 7 days, with one row per mechanism.

  2. Read the row's Last 7 days cell.

    It reads {applied} applied · {would_apply} would; hover it for saved {fmtUsd} · would save {fmtUsd}. A row with 0 applied · 96 would has enough evidence to act on; a cell that reads — has no rows yet, so keep observing.

  3. Check the wiring badge beside the label.

    No badge means the control is live. Observe only means you can set auto and save, but no request changes because of it yet. Not wired means the control is disabled and the value is stored but ignored. Hover either badge for the backend line behind it.

  4. Set Min confidence for the row.

    A number input that accepts 0.5 to 1 in steps of 0.05, present only for Semantic response cache, Output budget and Routing adjustments (the others show —). In auto, a decision below this bar behaves as observe and records the reason low_confidence, so start at the default and lower it only if almost every request reads skipped · low confidence.

  5. Change the row's Mode select from observe to auto.

    Leave every other row as it is. For In-flight dedup or Output budget the banner Auto dedup and output budgets change what clients receive. appears at once, with the consequence: Coalesced followers stream nothing until the leader settles; a capped call that truncates bills one rollback attempt.

  6. Click Save optimization settings.

    Because a mechanism moves to auto, the dialog Start applying these mechanisms automatically? opens. Its body names the promoted mechanism and warns that clients may receive cached or coalesced answers, a smaller output budget, or a different model.

  7. Click Save and apply.

    The button reads Working…, then the table shows the saved mode and the Mode badge in By mechanism on Optimizations reads auto. Cancel keeps your draft unsaved. A failed save shows the server message or Save failed.

  8. Optional: try one request with Check a decision.

    Open it at the foot of the tab, paste an OpenAI-style body in the textarea and click Check decision. The plan grid shows Reference as {reference.model_key} ({reference.source}) and one cell per mechanism as {mode} · {decision} · {reason}. It runs the decision node only: no policy, no provider call, nothing stored.

What auto changes for the caller, per mechanism
MechanismDefault min confidenceIn auto, the caller may get
In-flight dedupnone (no threshold)an in-flight leader's answer; followers stream nothing until the leader settles and bill zero
Output budget0.8a predicted max_tokens cap; a call that truncates is re-run once and bills one rollback attempt
Routing adjustments0.7a different model when measured health, reliability, or latency penalties shade a near-tie
Semantic response cache0.7 (a floor; a policy's similarity bar can raise it, never lower it)a stored answer for a paraphrase above the similarity bar
Exact response cachenone (no threshold)the stored answer for a repeated prompt
Context cachingnone (no threshold)nothing yet: badged Observe only

Prompt Optimization uses a separate review flow

It does not use the mode or confidence controls in this table. Optimize prompt in Playground, review the original, optimized prompt and diff, then choose a version. Explicit Playground optimization requests a bounded hosted rewrite with recorded API expense. Historical paid optimizer expenses stay visible in their original records, while current local compute remains an infrastructure cost. Requests without a reviewed proposal retain the deterministic engine.

Context caching is observe-only today.

Context caching wears the Observe only badge on every backend. Setting it to auto saves but changes no request. What actually attaches a provider prompt-cache breakpoint is the checkbox Legacy Anthropic prompt-cache hint (pre-engine baseline) under Show advanced settings.

The two response caches are the exception to the ladder.

They default to auto, and turning the Response cache workspace default from off to exact or semantic asks first with Turn the response cache on for this workspace?. The help beside Mechanisms says of their observe setting that it arrives with the caches sub-project (until then it behaves as auto). Roll a cache out per policy instead; see Response cache.

Verify it per request in Observability

Why: aggregates lag and blend. One request in Observability tells you whether the promoted mechanism applied, skipped, or fell below its floor on real traffic.

  1. Open Observability from the sidebar and a recent completed row.

    Narrow with the API key chip if you promoted for one team's traffic. The Request drawer opens.

  2. Read the Optimize station on the route board.

    Its summary counts modes in the plan, for example 1 auto · 4 observe. After your save the auto count should have risen by one.

  3. Find the mechanism's row in Optimization decision.

    Seven rows, one per mechanism. Each shows the mode badge (auto green, observe amber, off grey), the decision word when it is not skip, a state badge, and the confidence as a percentage when above zero.

  4. Read the state badge.

    Use the table below. A row that says observe did not change the request; it only recorded what it would have done.

  5. Read the ledger at the bottom of the card.

    An executed request shows Reference cost (est.), − Routing (est.), − Compression (est.), = Cost. A served request (cache hit or dedup follower) shows a single Served · saved (est.) line. The footer reads engine added {n} ms. View full request opens the request page, whose Savings receipt splits the saving by mechanism.

State badges on a mechanism row
BadgeMeaningWhat to do
appliedthe mechanism changed this requestcompare cost and quality against your baseline
skipped · low confidencemode was auto but confidence fell below Min confidence, so it behaved as observeexpected on some rows; if it is every row, the floor is above what the mechanism ever reaches
skippedthe outcome writer ran and the mechanism did not apply; hover for the reasonnothing, unless the reason surprises you
—unrecorded: the row predates the outcome writerdo not read it as skipped; pick a newer row

In the list, Gateway status and Retry / fallback evidencesummarize each row; the drawer's Cache section shows whether a cache or a dedup leader served it. To dig into one request further, follow Investigate a request.

Output budget promoted with the floor at 0.8

What you do

On Settings, set Output budget to auto with Min confidence 0.8, confirm Save and apply, then open two later requests in Observability.

What Cloud Score does

Predicts a cap for each request. Where its confidence reaches 0.8 it caps the call; where it does not, it records the decision and leaves the call untouched.

What you see

In the first drawer, the Output budget row reads auto, applied and a confidence such as 91%. In the second it reads auto and skipped · low confidence. Both requests still show completed.

Read the savings

Why: Optimizationssplits the savings by mechanism over your range and filters, so the promoted mechanism's share grows once traffic has run through it.

  1. Click Optimizations under Analytics in the sidebar and keep 30 days.

    Apply the same filter you used in Observability, for example the API key chip set to one key, so the figures match the traffic you promoted.

  2. Read the Savings waterfall.

    Routing, Compression and Cache + dedup step the Reference down to Cost. The Provider cache (est.) step that follows is never Cloud Score savings.

  3. Read the promoted mechanism's row in By mechanism.

    Applied climbs, and Saved fills where the mechanism records a dollar estimate. Prompt optimization has its own tab, Prompt Optimization.

  4. Read Recommendations.

    A promotion that works removes the recommendation it addresses. Their monthly figures stay estimates and are never added to savings.

Output budget claims no dollars.

Output budget and Context caching carry no dollar estimate: in By mechanism their Saved reads — with its cause. Judge output budget on the Output budget, last 30 days (UTC) line and on Success and $/completed requestin Usage & cost, not on a savings line.

Roll back

Why: a downgrade needs no confirmation. Rolling back is one select and one save.

  1. Open Optimization settings › Settings.

  2. Set the row's Mode back to observe.

    Choose off only if you also want to stop recording; observe keeps the would-apply counts growing so you can try again with a higher Min confidence. Leave Min confidence and the advanced fields as they are; the mode alone decides whether anything is applied.

  3. Click Save optimization settings.

    No dialog: only a promotion to auto or a cache default going on asks first. The button reads Saving…, then the table shows observe and theMode badge in By mechanism on Optimizations reads observe.

  4. If you rolled a cache out, set the Response cache workspace default back to off.

    Entries already stored stay in the store. To clear them, use the Purge row of the Response cache section on the same tab with One API key or One model and confirm Purge cache entries?. A caller can also opt any single request out with constraints.cache = "no-store" or the X-Dex-Cache-Control header, no admin needed.

Two meanings of rollback
RollbackWhereWhat it means
Setting rollbackSettings mode selectMove a mechanism from auto to observe or off. Saves immediately. Requests already recorded keep the plan they ran with; nothing in Observability is rewritten.
Output budget rollbackSettings › Output budget, last 30 days (UTC) linePer request, in auto: a capped call that truncates is re-run once, and that re-run bills one rollback attempt. Rollbacks · cost counts them once the backend records them; until then it reads —. Observed safety rate shows the share of capped rows that would have been safe.

Purge · Everything cold-starts every client.

The Everything scope removes every entry in the workspace and asks Purge every cache entry? before its red Purge everything button. The Purge help says it plainly: Nothing here is reversible. Prefer Expired entries, One API key or One model.

What to check afterwards

WhereLook atWhat tells you it worked
Observabilitya fresh row's Optimization decision cardthe promoted row reads auto with applied on most requests and skipped · low confidence on the rest; Status stays completed
Observabilitythe Optimize stationthe auto count in {n} auto · {n} observe rose by one
Optimization settingsSettings › Last 7 days cellsthe applied half of {applied} applied · {would_apply} would starts climbing
Usage & costBreakdown by ModelSuccess matches your baseline; $/completed request is lower
OptimizationsBy mechanismthe row's Mode badge reads auto; Applied and Saved fill where the mechanism records them
OptimizationsSavings waterfall and Recommendationsthe mechanism's step grows and the recommendation it addresses goes away
Gateway healthRequest outcomes and Retries & fallbacksfailed and retried requests stay at your baseline

Give each promotion a full 7d before the next one, then repeat from Read what observe would do for the next mechanism. For the wider cost programme, see Cut cost without losing quality.

Related