Skip to content

fix(venice): preserve authoritative model pricing - #129694

Merged
steipete merged 2 commits into
mainfrom
codex/qa-venice-authoritative-model-pricing-20260825
Aug 30, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa-venice-authoritative-model-pricing-20260825

Conversation

@steipete

@steipete steipete commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Venice's model decorator replaced the plugin manifest's known model prices with zeroes. Fresh provider configuration and known models returned by live discovery therefore lost their input, output, and cache prices, producing zero-dollar usage estimates despite correct upstream catalog data.

Why This Change Was Made

Preserve the normalized manifest row and apply only Venice's streaming compatibility decoration. The shared manifest builder already clones costs, input modalities, and supported metadata, so the decorator no longer reconstructs a partial row or copies the input array again. The current batch manifest builder stays in place. No manifest, core, configuration, or fallback changes are needed.

User Impact

Fresh/generated Venice catalogs retain known prices. Unknown discovered models still have zero estimates; that does not prove the models are free. Existing explicit zero/custom prices remain authoritative, and onboarding does not overwrite existing entries. The provider docs explain how to back up configuration and correct only obsolete cost fields, and remove a nearby API-key-printing troubleshooting instruction.

Release-note context: preserve manifest pricing for known Venice models in generated configuration and live discovery, preventing zero-dollar estimates caused by lost catalog metadata; retain intentional operator pricing overrides.

Evidence

  • Baseline: the final pricing tests against the pinned main implementation failed in the intended three places (static catalog, known live discovery, and fresh onboarding); 13 other cases passed.
  • Candidate: node scripts/run-vitest.mjs extensions/venice extensions/together/onboard.test.ts src/plugin-sdk/provider-catalog-shared.test.ts src/plugin-sdk/provider-catalog-live-projection.test.ts src/utils/usage-format.test.ts passed 90 tests across 9 files and 3 shards.
  • Real unauthenticated source-runtime discovery: 111 rows, including 19 known and 92 unknown. Before/after known-price matches are 0/19 -> 19/19 for static catalog, fresh onboarding, and live discovery. Unknown prices remain zero. For one million input, output, and cache-read tokens each on the default model, the estimate changes from $0.0000 to $3.31. An explicit zero override remains unchanged. This is metadata/runtime proof, not inference or billing verification.
  • Fresh isolated Codex autoreview covered the complete staged candidate against main base e8406570015f70e0a98e39d4408503668c12e115. Default P0 scope: scoped-clean, no findings, no retained lower-priority findings.
  • Independent public-price check: all 19 bundled rows match Venice's current base USD input, output, cached-input, and cache-write rates from GET https://api.venice.ai/api/v1/models; the published model catalog also retains those 19 correct base-price rows.
  • Independent candidate rerun: the parent verified the same 19/19 static, onboarding, and live-price matches against unchanged production-source hashes. A real discovery timeout also preserved the corrected fallback prices; the unchanged-limit retry returned all 111 live rows.
  • Scope limit / separate follow-up: this repairs preservation of existing manifest prices, not missing extended-context tier data. Two bundled models expose additional extended-context rates that the current manifest does not encode. Those tier/threshold semantics require separate verification; no complete billing-tier coverage is claimed.
  • Production LOC: +1/-7 (net -6). Tests: +55/-2. Docs: +15/-3.

Local validation also passed pnpm build, node scripts/check-changed.mjs -- extensions/venice/models.ts extensions/venice/models.test.ts extensions/venice/onboard.test.ts docs/providers/venice.md (including extension source/test typechecks, lint, and all final guards), pnpm docs:list, and the staged-content guard. The final onboarding-test rerun passed all 3 cases after expectation refinements. The build had no ineffective-dynamic-import warnings; dependency eval and plugin-timing warnings were nonfatal.

Candidate: 1adf37728b82b32d7597ca092aa81b3aa9ab8e43, whose tree exactly matches the final local review/test freeze. Hosted CI and native preparation must still pass for the published head before landing; local proof is not a claim that those gates have completed.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 9:45 PM ET / August 30, 2026, 01:45 UTC.

ClawSweeper review

What this changes

This PR preserves manifest-defined Venice costs in static catalogs, live discovery, and repeat onboarding, and documents the pricing behavior safely.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. Current main still replaces known Venice prices with zeroes; this owner-local fix preserves the manifest row and appears correct. Member authorship and the protected maintainer label require explicit maintainer handling after exact-head checks complete.

Priority: P2
Reviewed head: 1adf37728b82b32d7597ca092aa81b3aa9ab8e43
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative owner-boundary repair with targeted regression coverage and no supported correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository State identifies a member-authored PR, so the external-contributor proof gate does not apply; independently, the PR body reports an after-fix unauthenticated production discovery probe retaining all 19 known prices.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a member-authored PR, so the external-contributor proof gate does not apply; independently, the PR body reports an after-fix unauthenticated production discovery probe retaining all 19 known prices.
Evidence reviewed 7 items Current-main defect: Current main reconstructs every bundled model with the shared zero-cost object, discarding the normalized manifest cost before the static catalog is used.
Owner-boundary repair: The PR changes the Venice decorator to retain the complete normalized entry while preserving the Venice streaming-usage compatibility setting.
Manifest contract and discovery consumer: The shared manifest builder clones each model cost, and the Venice discovery projection clones the known catalog entry's cost rather than assigning an API-derived price.
Findings None None.
Security None None.

How this fits together

The Venice provider turns manifest rows and public model discovery into model records used by setup and usage-cost estimates. Those records feed provider configuration and model selection.

flowchart LR
  A[Venice plugin manifest] --> B[Static model catalog]
  C[Public model discovery] --> D[Known or unknown model projection]
  B --> D
  D --> E[Onboarding configuration]
  D --> F[Usage cost estimates]
Loading

Decision needed

Question Recommendation
Should this member-authored correction to Venice cost estimates be merged once the exact-head checks are green? Merge after exact-head CI: Accept the narrow Venice-plugin repair once required checks for the published head complete successfully.

Why: The current-main bug and repair are clear, but the protected maintainer label and member authorship require an explicit human merge decision.

Before merge

  • Resolve merge risk (P1) - Exact-head CI is still in progress; merge only after required checks reach a terminal green state.
  • Complete next step (P2) - No repair work is needed: the patch has no concrete actionable defect, while member authorship, the protected maintainer label, and incomplete exact-head CI require human merge handling.
Agent review details

Security

None.

PR surface

Source -6, Tests +53, Docs +12. Total +59 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 7 -6
Tests 2 55 2 +53
Docs 1 15 3 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 71 12 +59

Review metrics

Metric Value Why it matters
Production versus test LOC production -6, tests +53, docs +12 The bug repair simplifies production code while adding coverage for each affected catalog and onboarding boundary.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the owner-local preservation fix after exact-head checks pass, keeping the manifest as the price source for known models and zero estimates only for newly discovered unknown models.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the owner-local preservation fix after exact-head checks pass, keeping the manifest as the price source for known models and zero estimates only for newly discovered unknown models.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main assigns zero cost in the Venice decorator, and the added static-catalog, live-discovery, and onboarding cases isolate the resulting behavior; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. Preserving the already normalized manifest entry at the Venice decorator is the narrow canonical repair, while the shared onboarding merger continues to retain explicit operator prices.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a151c1e0d350.

Labels

Label changes:

  • remove merge-risk: 🚨 other: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: Incorrect Venice estimates affect provider cost reporting but do not show an outage, security boundary failure, or data loss.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository State identifies a member-authored PR, so the external-contributor proof gate does not apply; independently, the PR body reports an after-fix unauthenticated production discovery probe retaining all 19 known prices.

Evidence

What I checked:

  • Current-main defect: Current main reconstructs every bundled model with the shared zero-cost object, discarding the normalized manifest cost before the static catalog is used. (extensions/venice/models.ts:36, a151c1e0d350)
  • Owner-boundary repair: The PR changes the Venice decorator to retain the complete normalized entry while preserving the Venice streaming-usage compatibility setting. (extensions/venice/models.ts:32, 1adf37728b82)
  • Manifest contract and discovery consumer: The shared manifest builder clones each model cost, and the Venice discovery projection clones the known catalog entry's cost rather than assigning an API-derived price. (src/plugin-sdk/provider-catalog-shared.ts:207, 1adf37728b82)
  • Onboarding preserves explicit entries: The shared onboarding applier keeps existing provider model entries before appending missing catalog entries, so explicit zero and custom costs remain authoritative. (src/plugin-sdk/provider-onboard.ts:621, 1adf37728b82)
  • Regression coverage: New tests cover manifest-to-static preservation, known-versus-unknown discovery pricing, fresh onboarding, and repeat onboarding with explicit zero/custom costs. (extensions/venice/models.test.ts:187, 1adf37728b82)
  • Introduction and merge identity: The verified test merge has the pinned base and PR head as parents; the implementation commit is dated 2026-08-29T18:17:44-07:00. (extensions/venice/models.ts:32, 1adf37728b82)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for exact-head required checks to finish green before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-26T00:10:19.506Z sha 437f2ef :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T00:52:38.522Z sha 437f2ef :: needs maintainer review before merge. :: none

Preserve the canonical manifest model definition without redundant input
copying, use a neutral unknown-model fixture, and cover fresh onboarding
prices plus existing zero/custom overrides. Document pricing ownership and
remove the API-key-printing troubleshooting example.

The full candidate has three failing-before pricing regressions and 90
passing focused tests. Full build, changed-file gates, and fresh isolated
P0-scoped Codex review pass. Real catalog/discovery and usage-estimator
probes preserve all 19 known base prices and 92 unknown zero estimates;
synthetic token totals render $3.31 instead of $0.0000. No inference or
provider-billing claim is made.
@steipete
steipete force-pushed the codex/qa-venice-authoritative-model-pricing-20260825 branch from 437f2ef to 1adf377 Compare August 30, 2026 01:39
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 30, 2026
@steipete

steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Published the reviewed candidate 1adf37728b82. The Venice producer now preserves the normalized manifest row; production LOC is +1/-7. Existing explicit zero/custom rates and unknown-model defaults remain unchanged.

The requested redacted public-endpoint comparison covers all 19 bundled rows (USD per million tokens, base rates):

{
  "checkedAt": "2026-08-29T23:58:41.710596+00:00",
  "endpoint": "https://api.venice.ai/api/v1/models",
  "manifestRows": 19,
  "matchedBasePriceRows": 19,
  "missingRows": 0,
  "baseFieldMatches": {
    "input": 19,
    "output": 19,
    "cacheRead": 19,
    "cacheWrite": 19
  }
}

Real unauthenticated source-runtime discovery returned 111 rows: known static/onboarding/live prices improved from 0/19 to 19/19 matches, with all 92 unknown estimates still zero. Independent verification first hit a real discovery timeout with correct fallback prices, then returned all 111 rows on an unchanged-limit retry. These are metadata and usage-estimate checks, not inference or billing verification. Extended-context rates for two bundled models remain a separately tracked data gap; base-rate matching does not establish complete billing-tier coverage.

Local proof: 90 owner/sibling tests, the final 3-case onboarding rerun, full build, and all changed-file/type/lint guards passed. Fresh isolated full-candidate Codex autoreview was clean within its P0 scope. The PR body records commands and limits; hosted CI and native preparation were pending when this proof was first posted; their completed results follow below.

Final pre-merge verification

CI run 33286183632 completed successfully on the exact published head, including the required openclaw/ci-gate. No CI reruns or source changes were needed.

Native review artifacts validated, then OPENCLAW_TESTBOX=1 scripts/pr prepare-run 129694 passed using the exact-head hosted proof. The prepared tree still matches the reviewed/tested candidate; no extra push, rebase, or Testbox lease was needed.

The fresh ClawSweeper review has no actionable code/security finding. Its exact-head-green-CI request is now satisfied. The maintainer-requested landing can proceed through the native merge workflow; no merge has yet been performed.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Aug 30, 2026
@steipete steipete self-assigned this Aug 30, 2026
@steipete
steipete merged commit 6774ca2 into main Aug 30, 2026
171 checks passed
@steipete
steipete deleted the codex/qa-venice-authoritative-model-pricing-20260825 branch August 30, 2026 02:17
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 30, 2026
* fix(venice): preserve authoritative model pricing

* test(venice): verify pricing through setup and explicit overrides

Preserve the canonical manifest model definition without redundant input
copying, use a neutral unknown-model fixture, and cover fresh onboarding
prices plus existing zero/custom overrides. Document pricing ownership and
remove the API-key-printing troubleshooting example.

The full candidate has three failing-before pricing regressions and 90
passing focused tests. Full build, changed-file gates, and fresh isolated
P0-scoped Codex review pass. Real catalog/discovery and usage-estimator
probes preserve all 19 known base prices and 92 unknown zero estimates;
synthetic token totals render $3.31 instead of $0.0000. No inference or
provider-billing claim is made.
steipete added a commit that referenced this pull request Aug 31, 2026
Use complete native OpenCode and Venice pricing schedules while preserving
authored zero, partial, flat and tiered costs across preparation and lookup.
Avoid generated price pins during fresh merge-mode Venice onboarding.

Follow-up to #133349 (cached long-context accounting) and #129694
(Venice runtime pricing); related to #113549 (broader OpenCode catalog drift).
steipete added a commit that referenced this pull request Aug 31, 2026
Use complete native OpenCode and Venice pricing schedules while preserving
authored zero, partial, flat and tiered costs across preparation and lookup.
Avoid generated price pins during fresh merge-mode Venice onboarding.

Follow-up to #133349 (cached long-context accounting) and #129694
(Venice runtime pricing); related to #113549 (broader OpenCode catalog drift).
steipete added a commit that referenced this pull request Aug 31, 2026
* fix(models): refresh native pricing without pinning defaults

Use complete native OpenCode and Venice pricing schedules while preserving
authored zero, partial, flat and tiered costs across preparation and lookup.
Avoid generated price pins during fresh merge-mode Venice onboarding.

Follow-up to #133349 (cached long-context accounting) and #129694
(Venice runtime pricing); related to #113549 (broader OpenCode catalog drift).

* fix(pricing): preserve native schedules through resolution

Merge prepared costs beneath authored display prices, retain validated native
free schedules under exact owner policy, and compile OpenRouter overrides
with strict thresholds and source-order inheritance for each price key.

Preserve zero, partial, flat and tiered user pricing without new settings
or storage. Follow-up repairs for #133695.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…w#133695)

* fix(models): refresh native pricing without pinning defaults

Use complete native OpenCode and Venice pricing schedules while preserving
authored zero, partial, flat and tiered costs across preparation and lookup.
Avoid generated price pins during fresh merge-mode Venice onboarding.

Follow-up to openclaw#133349 (cached long-context accounting) and openclaw#129694
(Venice runtime pricing); related to openclaw#113549 (broader OpenCode catalog drift).

* fix(pricing): preserve native schedules through resolution

Merge prepared costs beneath authored display prices, retain validated native
free schedules under exact owner policy, and compile OpenRouter overrides
with strict thresholds and source-order inheritance for each price key.

Preserve zero, partial, flat and tiered user pricing without new settings
or storage. Follow-up repairs for openclaw#133695.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: venice maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant