Skip to content

refactor(cost-map): remove openrouter rows, part 2 of 5 - #45666

Merged
klu-berri merged 3 commits into
mainfrom
litellm_remove_openrouter_cost_map_2
Oct 9, 2026
Merged

klu-berri merged 3 commits into
mainfrom
litellm_remove_openrouter_cost_map_2

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Part 2 of 5 of removing the redundant litellm_provider: openrouter rows from the cost map (OpenRouter bills from usage.cost since #45640; see #45665 for why this is split into 5 stacked deletion-only PRs). Stacked on part 1

Deletes the second contiguous block, 29 rows starting at openrouter/anthropic/claude-fable-5, from model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json. No source, schema or test changes

Check against the base branch:

python3 -c "import json,subprocess as s;o=json.loads(s.check_output(['git','show','origin/litellm_remove_openrouter_cost_map_1:model_prices_and_context_window.json']));n=json.load(open('model_prices_and_context_window.json'));r=set(o)-set(n);print(len(r),set(n)-set(o),all(o[k]['litellm_provider']=='openrouter' for k in r),all(o[k]==n[k] for k in n))"
# 29 set() True True

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


Note

Devin errored when opening this Pull Request as kerry-berri.
As a fallback, Devin opened this PR as itself.

kerry-berri and others added 2 commits October 9, 2026 21:09
… google block)

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

Copy link
Copy Markdown
Contributor Author

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.


kerry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Removes model pricing and capability data from configuration.

Preserve or replace the deleted model metadata before merging

Findings

  1. P1 Model information disappears ▶

Summary

Removes 29 OpenRouter model records from the main catalog and bundled backup

  • The cost catalogs drop 29 OpenRouter model records.

Reviews (1) · Last reviewed commit: "refactor(cost-map): remove openrouter ro..." · Reviewed by Greptile

@@ -65132,675 +65132,6 @@
"cache_read_input_token_cost": 2.5e-07,
"source": "https://docs.perplexity.ai/docs/agent-api/models"
},

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.

P1 Model information disappears

Deleting openrouter/openai/gpt-4o-mini makes get_model_info raise ModelNotMappedError and supports_function_calling return false. OpenRouter has no replacement lookup for this record. Receiving usage.cost does not replace capabilities or token limits

Keep or replace that metadata before deleting the rows in both maps. This violates the repository requirement against backwards-incompatible changes without a user-controlled flag

Rule Used: What: avoid backwards-incompatible changes without a user-controlled flag Why: they break current behavior for users relying on existing functionality Bad: #22164 added _run_post_custom_auth_checks unconditi... (source)

Knowledge Base Used: Provider adapters and capabilities

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Base automatically changed from litellm_remove_openrouter_cost_map_1 to main October 9, 2026 21:51
@klu-berri
klu-berri merged commit 2248fce into main Oct 9, 2026
84 of 86 checks passed
@klu-berri
klu-berri deleted the litellm_remove_openrouter_cost_map_2 branch October 9, 2026 22:00
@codspeed

codspeed Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 31 untouched benchmarks


Comparing litellm_remove_openrouter_cost_map_2 (76f7b90) with main (aa64b07)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (1f1b28f) during the generation of this report, so aa64b07 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

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.

3 participants