Skip to content

refactor(cost-map): remove openrouter rows, part 4 of 5 - #45668

Merged
klu-berri merged 5 commits into
mainfrom
litellm_remove_openrouter_cost_map_4
Oct 9, 2026
Merged

klu-berri merged 5 commits into
mainfrom
litellm_remove_openrouter_cost_map_4

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Part 4 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 3

Deletes three contiguous blocks, 202 rows starting at openrouter/~anthropic/claude-fable-latest and including the openrouter/openai/gpt-image-* rows, from model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json, and deletes tests/unit/test_openrouter_gpt_image_model_metadata.py, which only pinned those image rows. No source or schema 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_3: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))"
# 202 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 4 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>
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: 3/5

[Medium impact] Removes OpenRouter image model pricing data and its test.

Restore model details and cost estimates before merging

Summary

Removes 202 OpenRouter records from both model maps and deletes the GPT image metadata tests

  • Both cost maps drop OpenRouter model rows and their image-row test.

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

@greptile-apps

greptile-apps Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings could not be posted inline.

  • P1 Model details disappear model_prices_and_context_window.json:68394 ▶

    Removing these rows makes get_model_info raise and supports_function_calling return False for openrouter/aion-labs/aion-3.5. OpenRouter has no replacement metadata lookup, and no fallback rule matches this model. This violates the requirement to avoid breaking existing behavior without a user-controlled flag. Keep the capability metadata until a replacement exists

  • P1 Cost estimates stop working model_prices_and_context_window.json:68385 ▶

    Deleting these prices makes /spend/calculate return HTTP 400 for openrouter/aion-labs/aion-3.5 instead of an estimate. The endpoint calls completion_cost with messages but no provider response, so usage.cost cannot replace the removed prices. Preserve estimate pricing or provide a replacement

@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_3 to main October 9, 2026 22:33
@klu-berri
klu-berri enabled auto-merge (squash) October 9, 2026 22:34
@klu-berri
klu-berri merged commit fe3ace9 into main Oct 9, 2026
87 checks passed
@klu-berri
klu-berri deleted the litellm_remove_openrouter_cost_map_4 branch October 9, 2026 22:40
@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_4 (561c746) with main (d1945f6)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (ed22fd9) during the generation of this report, so d1945f6 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