Repository navigation
fix(OMN-20833): the cost-accounting hook prices from the infra pricing manifest (plugin 2.4.59) - #2641
Merged
Conversation
…g manifest (plugin 2.4.59) plugins/onex/hooks/lib/cost_accounting.py drops PRICING_USD_PER_1M and its hand-written version label. _cost_usd reads each model's rate from the omnibase_infra pricing manifest; a model the manifest lacks stays unpriced, and if omnibase_infra cannot be imported in the hook's interpreter every cloud model is unpriced and no cost record is written. Records are labelled with the omnibase_infra version they were priced from. The literals were off the published rates: Opus 4.6 and 4.5 at $15 / $75 against $5 / $25, Haiku 4.5 at $0.80 / $4 against $1 / $5. Removes the four hardcoded-model-config baseline rows the literals held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jake-b-omni
enabled auto-merge (squash)
October 9, 2026 20:38
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 9, 2026
) * evidence(OMN-20833): author OCC companion for OmniNode-ai/omniclaude#2641 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head bae4b65968c8c048c5ca20171a19233392c9caff. * evidence(OMN-20833): self-bind OCC#13468 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
Contributor
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Findings
Gate semantics (pilot phase)
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
…twice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The PostToolUse cost-accounting hook stops keeping its own prices.
plugins/onex/hooks/lib/cost_accounting.pydropsPRICING_USD_PER_1Mand the hand-writtenPRICING_MANIFEST_VERSION._cost_usdnow reads each model's rate from the omnibase_infra pricing manifest, the one pricing authority:localstays at zero marginal API cost.pricing_manifest_versionnow names the omnibase_infra release it was priced from.The literals were off the published rates. Opus 4.6 and 4.5 were at $15 / $75 against a published $5 / $25, and Haiku 4.5 was at $0.80 / $4 against $1 / $5. Because
BASELINE_MODELis Opus 4.6, every baseline and saving the hook wrote was three times too high on the Opus rate. Today's omnibase_infra release still carries the old $15 / $75 Opus row, so the hook reads the corrected figure once a release carries omnibase_infra#4631. omnimarket's pin moves with that release under OMN-20833 AC1.The four
config/hardcoded_model_config_baseline.yamlrows the literals held are removed. The ratchet reported them stale.Plugin 2.4.59, with
plugin.jsonand the dev marketplace entry bumped together.Acceptance criteria (OMN-20833)
tests/unit/hooks/lib/test_cost_accounting_manifest_omn20833.py::test_the_hook_carries_no_price_literalandtest_a_model_is_priced_at_the_manifest_rate.test_a_planted_unknown_model_is_unpriced_and_writes_no_recordandtest_without_the_manifest_every_cloud_model_is_unpriced. omnimarket's half is omnimarket#3667.Tests
RED first, at origin/dev:
uv run pytest tests/unit/hooks/lib/test_cost_accounting_manifest_omn20833.pygave 3 failed and 3 passed. The failures were the no-literal test, the Haiku 4.5 rate and the no-manifest test. Opus and Sonnet passed at dev only because today's omnibase_infra release still carries the old Opus figure.After the change:
tests/unit/hooks/lib/test_cost_accounting.py,tests/unit/hooks/lib/test_cost_accounting_manifest_omn20833.pyandtests/hook_measurement/: 37 passed.pre-commit run --files <changed>: every hook passed.Lab
Lab: host=mac-scratch lane=omn20833-manifest-pricing command=uv run pytest tests/unit/hooks/lib/test_cost_accounting.py tests/unit/hooks/lib/test_cost_accounting_manifest_omn20833.py tests/hook_measurement/ -q observed=37 passed head=bae4b65968c8c048c5ca20171a19233392c9caff
This is a detached host. No lab lane, lab host or cluster was touched.
🤖 Generated with Claude Code
Evidence-Ticket: OMN-20833
Evidence-Source: OCC#13468