Skip to content

Price GPT-6.2 Astra usage in Loom - #14772

Merged
rjwalters merged 1 commit into
mainfrom
feature/issue-14741
Nov 20, 2026
Merged

rjwalters merged 1 commit into
mainfrom
feature/issue-14741

Conversation

@rjwalters

@rjwalters rjwalters commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Price gpt-6.2-astra in the resync-delivered card and compiled fallback. The Standard short-context rates are $8 input, $0.40 cached input and $40 output per million tokens. This is the only explicit model named by the current canonical roleDraw.
  • Use the published $10 per million 30-minute cache write price as the default write estimate in both legacy fields. Usage supplies a single cache-write counter, and the 12-hour tier remains outside the card's pricing model. The card keeps its oldest vendor verification date. OpenAI pricing

Test Plan

  • cargo test --locked --offline -p loom-daemon -j 2 --lib --test model_pricing_card pricing in an isolated target. All 25 targeted unit cases and the pricing entry point agreement test passed. The cases cover bare, openai/ and codex/ IDs, the older Astra row, and compiled versus shipped asset parity.
  • Full model_pricing_card integration file and for_model_is_tier_agnostic passed. The integration suite's deliberate live forge guard control remained ignored.
  • Both delivered JSON cards are byte-identical. rustfmt --check and git diff --check passed.

The issue stays open through the ordinary release for live verification of the unknown-model warning and cost on a Codex usage span from the active card.

Part of #14741

loom dashboard

@rjwalters rjwalters added the loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. label Nov 20, 2026
@loom-fleet-dispatch

loom-fleet-dispatch Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR #14772's loom:reviewing claim is held by the judge of sweep step-judge-14772-1795167319 on host host-a6032f0c. This comment is a PR lease record (#9401): its liveness signal is its own forge-assigned updated_at, renewed while the judge works and released when it is done. Another judge that finds this lease live stands down before touching a worktree. See defaults/docs/lease-record.md § "PR-phase leases".

@loom-fleet-dispatch loom-fleet-dispatch Bot added the loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). label Nov 20, 2026
@loom-fleet-dispatch

Copy link
Copy Markdown
Contributor

✅ Approved!

A tightly scoped, correct pricing-card addition. Every rate and ordering claim below was re-derived here rather than taken from the PR body.

Spec reconciliation

spec=f630bd0f96a696ca comments=7030767428@2026-11-20T04:52:52Z,…,7035820378@2026-11-20T09:28:40Z
baseline: none - no earlier spec baseline available; reviewed against current requirements

Reviewed against the current body of #14741 (Curator enhancement of 2026-11-20) and its trusted comments — all of which are bot lease/orphan-recovery records carrying no requirement changes. No material difference between the current requirements and this PR's scope or implementation. Part of #14741 is judged as the partial increment it declares: the card row lands now, the issue stays open for the post-release out-of-band check ("no Unknown model 'gpt-6.2-astra' WARN on a host running the fixed release"). That partial scope is intentional and correct; no stray close/fix/resolve #14741 keyword is present in the body (grepped), so the merge will not close it.

Verification performed

1. Vendor rates re-derived independently (not taken from the PR body). Fetched https://developers.openai.com/api/docs/pricing, Standard tier, short context, per 1M tokens:

input cached input write 30m write 12h output
gpt-6.2-astra (vendor) $8.00 $0.40 $10.00 $20.00 $40.00
this PR (×1/1000) 0.008 0.0004 0.01 (not modelled) 0.04

Exact match. The write-field choice is also consistent with precedent, not a fresh guess: the pre-existing gpt-6-astra row carries 0.0125 = that model's published $12.50 30m rate, so storing the 30m rate in both legacy TTL fields is what the card already does. The 12h tier ($20/MTok) is explicitly declared unmodelled in both notes and the doc comment.

2. Ordered cascade — no shadowing, no regression. Simulated the shipped card's first-match-wins cascade over .loom/pricing.json directly:

gpt-6.2-astra        -> gpt-6-2-astra in=0.008 out=0.04 cr=0.0004 w5=0.01 w1h=0.01
openai/gpt-6.2-astra -> gpt-6-2-astra (same)
codex/gpt-6.2-astra  -> gpt-6-2-astra (same)
gpt-6-astra          -> gpt-6-astra  in=0.01  out=0.05 cr=0.001  w5=0.0125   (unchanged)
gpt-6.1-sol          -> gpt-6-1-sol  (unchanged)
gpt-6-sol            -> gpt-6-sol    (unchanged)
gpt-6-luna           -> gpt-6-luna   (unchanged)
gpt-6-nova           -> NONE (unpriced -> WARN)

The new row sits at index 18, ahead of every other gpt-6 row, and "gpt-6-astra" is correctly not a substring of "gpt-6.2-astra", so neither row shadows the other. gpt-6-nova still falls through unpriced — the deliberate no-gpt-6-catch-all invariant survives.

3. Compiled card agrees, and the agreement is actually tested. The m.contains("gpt-6.2-astra") guard is at resource_usage.rs:379, ahead of all other gpt-6 guards; nothing earlier in the chain matches the id (checked every m.contains( guard in order). Self::openai() stores the single write argument into both cache_write_cost_per_1k and cache_write_1h_cost_per_1k, matching the JSON's w5 == w1h == 0.01. Crucially the three new ids were added to CODEX_MODEL_IDS, which parity_model_ids() feeds to shipped_pricing_asset_agrees_with_the_compiled_card — so the new row is genuinely covered by the drift guard, not merely added beside it. .loom/pricing.json and defaults/pricing.json are byte-identical (cmp).

4. The AC's completeness clause — measured, not assumed. The PR body claims gpt-6.2-astra is the only explicitly named model in the canonical roleDraw. Confirmed against the live fleet store: the canonical fleet/defaults.json roleDraw names codex/gpt-6.2-astra for builder/doctor/curator/judge/champion/guide/hermit, and a scan of every blob in the fleet store finds codex/gpt-6.2-astra as the only runtime/model key anywhere (874 occurrences, no other). Every other entry (claude, opencode) names a runtime with no explicit model.

5. The production symptom this fixes is the only one outstanding. grep -ho "Unknown model '[^']*'" over this host's recent daemon logs returns exactly one distinct id — Unknown model 'gpt-6.2-astra' (407 occurrences) — and the WARN is logged with the bare id, which the new row matches. So this row closes the whole current gap; no sibling unpriced model is hiding behind it.

6. Supporting checks. verified_on correctly stays at the older 2026-09-18 per the existing rule; notes records the 2026-11-20 read date and source for the new row; the doc-comment table row (0.008 / 0.04 / 0.0004 / 0.01) matches the code; the generalised note sentence ("The earlier rows use one published cache-write rate for both write fields") is accurate now that the page publishes 30m/12h tiers. No other site in the repo carries a hardcoded Codex model list needing the new id.

Test Execution

CI is GREEN at the exact reviewed head 62b7acad99e3e1f2f9316e8259f09746ec796f12 (loom-daemon forge wait-checks, settled in-turn), merge state CLEAN. Per #11690 CI is the test gate, so I did not re-run the suite; the specific doubts I had (cascade order, agreement-test coverage, vendor rates, roleDraw completeness) were each resolved by the independent static/live checks above rather than by re-running the Builder's commands.

Test plan from the PR description:

  1. cargo test … -p loom-daemon --lib --test model_pricing_card pricing — ⏭️ Not re-run locally: covered by green CI (Host-side test burden to a bare minimum: CI is the test gate, Builders don't run the suite (operator direction 2026-10-13) #11690). Its substance is independently verified in items 2–3 above.
  2. Integration file + for_model_is_tier_agnostic — ⏭️ Same; covered by green CI.
  3. Both delivered JSON cards byte-identical — ✅ Executed: cmp .loom/pricing.json defaults/pricing.json → identical.

Non-blocking notes

  • No TDD: line in the Test Plan. Advisory only, and a reasonable omission for a rate-card row: the natural test asserts the new lookup exists, which cannot fail before the row is added in the same diff. Not a defect.
  • The 12h cache-write tier is unmodelled, so a 12h write would be estimated at $10/MTok rather than $20. This is documented in both the asset and the doc comment, is consistent with how every existing row handles write TTLs, and is unobservable today because usage supplies a single cache-write counter. Correctly out of scope per the issue's "Out of Scope" section — flagging it only so the choice stays visible, not as work to do.
  • Live verification remains outstanding by design. The issue's out-of-band AC (no WARN on a host running the fixed release) is a post-release observation; I have not performed it and am not stamping an ac-verified marker. Item 5 above is strong mechanism-level evidence that the WARN will stop, but it is not the post-release check. Part of #14741 correctly keeps the issue open for it.

Neither live-verification trigger from the Judge role's "Circular-Fixture" section fires here: the diff touches no browser/scraper/DOM code, and the linked issue reports a loudly logged WARN, not a silent omission (checked against the fragment list; zero matches). No circular fixture: the rates came from the vendor page, and the cascade behaviour is asserted against the real ModelPricing::lookup and the real shipped asset.

loom dashboard

@loom-fleet-dispatch loom-fleet-dispatch Bot added loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge. and removed loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). labels Nov 20, 2026
@rjwalters

rjwalters commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

PR #14772's (no label: the lease is the claim) claim is held by the champion of sweep sweep-insession-s38728-ThuNov191721502026 on host host-d9142cf3. This comment is a PR lease record (#9401): its liveness signal is its own forge-assigned updated_at, renewed while the champion works and released when it is done. Another champion that finds this lease live stands down before touching a worktree. See defaults/docs/lease-record.md § "PR-phase leases".

@rjwalters

Copy link
Copy Markdown
Member Author

Champion Auto-Merge

  • Fleet Judge approval matches the signed and GitHub-verified head 62b7acad99e3e1f2f9316e8259f09746ec796f12. Hosted CI succeeded on that head.
  • The two shipped cards and the compiled fallback agree with the OpenAI Standard Short rates. Per million tokens the row uses $8 for input, $0.40 for cached input, $40 for output, and the $10 30-minute write rate in both legacy write estimate fields. All 25 existing card rows and the four existing compiled OpenAI rate rows retain their rates. Coverage includes bare, openai/ and codex/ IDs.
  • The four-file change clears the critical-path, ratification, and hold checks and combines cleanly with current main. The approval is current. The partial link leaves pricing: gpt-6.2-astra is not on the pricing card; every Codex step is costed at the Sonnet fallback #14741 open for post-release telemetry verification.

Proceeding with the repository's merge-commit path.

Automated by Champion role

loom dashboard

@rjwalters
rjwalters merged commit f8f0315 into main Nov 20, 2026
25 checks passed
@rjwalters
rjwalters deleted the feature/issue-14741 branch November 20, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant