Skip to content

feat: rank marketplace offers with effective prices#26

Merged
jmlago merged 1 commit into
mainfrom
codex/marketplace-effective-prices
Jul 1, 2026
Merged

feat: rank marketplace offers with effective prices#26
jmlago merged 1 commit into
mainfrom
codex/marketplace-effective-prices

Conversation

@MuncleUscles

@MuncleUscles MuncleUscles commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • rank marketplace candidates with host-supplied effective_price_* when present
  • keep raw marketplace quotes on the offer object
  • carry price_multiplier into the chosen route so the host can report cost against the raw quote

Validation

  • Covered through parent unhardcoded focused test: tests/test_live_wiring.py::test_marketplace_offers_rank_with_effective_prices_when_present
  • Parent focused multiplier suite passed: 6 passed in ~30s

Summary by CodeRabbit

  • New Features

    • Marketplace pricing now uses “effective” quote prices when available, improving cost calculations.
    • Selected results now include a price multiplier so routed costs can reflect marketplace-provided adjustments.
  • Bug Fixes

    • Falls back to legacy quote prices when effective prices are not provided, preserving compatibility with existing offers.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f88d0fb-fa35-4103-a097-f87e473c1800

📥 Commits

Reviewing files that changed from the base of the PR and between 2750958 and e8263d4.

📒 Files selected for processing (1)
  • llm_policy.lua

📝 Walkthrough

Walkthrough

Marketplace candidate pricing in llm_policy.lua now prefers effective price fields from offers, falling back to legacy price fields, and adds a price_multiplier from ranking_price_multiplier. The execution result's chosen payload now also includes this price_multiplier.

Changes

Effective pricing and multiplier propagation

Layer / File(s) Summary
Candidate pricing and multiplier construction
llm_policy.lua
Candidate price_in/price_out prefer offer.effective_price_*_usd_per_mtok with fallback to legacy offer.price_*_usd_per_mtok, and price_multiplier is set from offer.ranking_price_multiplier; the chosen payload on successful execution now includes price_multiplier from the selected candidate.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: jmlago

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: ranking marketplace offers using effective prices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/marketplace-effective-prices

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmlago jmlago merged commit 38a79c6 into main Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants