Skip to content

chore(cost-map): add search_free_requests to the model prices schema - #47635

Merged
klu-berri merged 1 commit into
mainfrom
litellm_regen_model_prices_schema
Oct 20, 2026
Merged

klu-berri merged 1 commit into
mainfrom
litellm_regen_model_prices_schema

Conversation

@klu-berri

@klu-berri klu-berri commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The provider pricing sync can't open cost map PRs right now because 47 rows gained search_free_requests in #47494 and the legacy model prices schema never got that field. This adds it to the schema so the sync can publish again

Details

TLDR

Problem this solves:

  • The catalog PR service refuses main with an unclassified field error
  • Every provider's price sync is blocked until the schema knows search_free_requests

How it solves it:

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Screenshots / Proof of Fix

Before (dc9c31e)

  1. The sync posts entries to the hosted catalog PR service against main
  2. It fails with The catalog uses fields its schema does not define and the sync cannot classify: search_free_requests

After (9df258b)

  1. python -m pytest tests/unit/test_cost_map_guard.py -q reports 30 passed
  2. The schema now defines search_free_requests, so the service keeps it as an existing property instead of refusing it

Type

🚄 Infrastructure

Caveats (if any)

Low

  • The schema is a legacy file now, so nothing in CI checks it against the catalog
  • The longer-term fix is for the sync service to stop maintaining this schema

Link to Devin session: https://app.devin.ai/sessions/5bae2a21b4b74b68bdacd0577c58b117
Open in Devin Desktop: https://app.devin.ai/desktop/session/5bae2a21b4b74b68bdacd0577c58b117?variant=devin
Requested by: @kerrylu-berri


Note

Low Risk
Schema-only change to a legacy JSON Schema file; no runtime logic or pricing behavior changes.

Overview
Unblocks provider pricing sync by defining the optional search_free_requests field on model entries in model_prices_and_context_window.schema.json, so the catalog PR service no longer rejects rows that already carry this property.

The new schema object describes free Google Search grounding allowances: required count, period (day or month), and shared_group (non-empty string), with no extra properties—aligned with the in-repo SearchFreeRequests shape used by catalog tests and cost tracking.

Reviewed by Cursor Bugbot for commit 9df258b. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@klu-berri

Copy link
Copy Markdown
Contributor Author

@litellm-stampbot

1 similar comment
@klu-berri

Copy link
Copy Markdown
Contributor Author

@litellm-stampbot

@kerry-berri

kerry-berri commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

litellm-stampbot: risk low

Approved at 9df258b.

Rules (stampbot/risk_rules.yml):

  • low: no rule flagged it

Cursor Bugbot: Low Risk at 9df258b. Schema-only change to a legacy JSON Schema file; no runtime logic or pricing behavior changes. Bugbot run requested, finished in 2 min.
Bugbot Low is low, Medium and High are high. The judge model was not called.

Pushes do not re-run this check. Comment @litellm-stampbot again to re-check the new head.

@kerry-berri

Copy link
Copy Markdown
Contributor

bugbot run

@klu-berri
klu-berri enabled auto-merge (squash) October 20, 2026 22:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9df258b. Configure here.

@kerry-berri kerry-berri added the risk:low Small, isolated, low-risk change label Oct 20, 2026

@kerry-berri kerry-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low risk by rule and by judgement at 9df258b

@klu-berri
klu-berri merged commit 2cba80c into main Oct 20, 2026
140 of 144 checks passed
@klu-berri
klu-berri deleted the litellm_regen_model_prices_schema branch October 20, 2026 22:11
Cartofante pushed a commit to CartoDB/litellm that referenced this pull request Oct 26, 2026
…erriAI#47635)

Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Backport of BerriAI#47635 to stable/1.106.x
Cherry-picked from 2cba80c (main)
yuneng-berri pushed a commit that referenced this pull request Oct 28, 2026
…47635)

Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 2cba80c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Small, isolated, low-risk change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants