Skip to content

fix(cost-map): remove duplicate openrouter/perceptron/perceptron-mk1.5 entry - #43273

Merged
yuneng-berri merged 1 commit into
mainfrom
litellm_cost_map_perceptron_duplicate
Sep 26, 2026
Merged

yuneng-berri merged 1 commit into
mainfrom
litellm_cost_map_perceptron_duplicate

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • openrouter/perceptron/perceptron-mk1.5 is defined twice in the cost map
  • JSON keeps the last entry, which says no tool calling, no audio
  • test_price_map_has_no_duplicate_keys is red on main and every open PR

How it solves it:

User Flow

Before: a developer routing tool calls to this model through the proxy sees the gateway report that the model cannot call tools

  1. The proxy admin lists openrouter/perceptron/perceptron-mk1.5 in model_list and starts the proxy
  2. The developer sends GET http://localhost:4000/model/info with the master key
  3. The entry for that model comes back with "supports_function_calling": false and "supports_tool_choice": false

After: the same call reports the model's real capabilities

  1. The proxy admin lists openrouter/perceptron/perceptron-mk1.5 in model_list and starts the proxy
  2. The developer sends GET http://localhost:4000/model/info with the master key
  3. The entry for that model comes back with "supports_function_calling": true, "supports_tool_choice": true and "supports_audio_input": true

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests (the existing tests/unit/test_model_prices_schema.py::test_price_map_has_no_duplicate_keys is the regression test and goes from red to green)
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/test_model_prices_schema.py -q
  • 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
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Setup: a DB-free proxy at each commit with LITELLM_LOCAL_MODEL_COST_MAP=True and this config

model_list:
  - model_name: perceptron-mk1.5
    litellm_params:
      model: openrouter/perceptron/perceptron-mk1.5
      api_key: os.environ/OPENROUTER_API_KEY
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

Before (2530255)

  1. curl -s localhost:4010/model/info -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq '.data[] | select(.model_name=="perceptron-mk1.5") | .model_info | {key, supports_function_calling, supports_tool_choice, supports_audio_input}'
  2. Output:
{
  "key": "openrouter/perceptron/perceptron-mk1.5",
  "supports_function_calling": false,
  "supports_tool_choice": false,
  "supports_audio_input": false
}

After (e2535ba)

  1. curl -s localhost:4011/model/info -H "Authorization: Bearer $LITELLM_MASTER_KEY" | jq '.data[] | select(.model_name=="perceptron-mk1.5") | .model_info | {key, supports_function_calling, supports_tool_choice, supports_audio_input}'
  2. Output:
{
  "key": "openrouter/perceptron/perceptron-mk1.5",
  "supports_function_calling": true,
  "supports_tool_choice": true,
  "supports_audio_input": true
}

Type

🐛 Bug Fix

Caveats (if any)

Low

  • The provider-info sync bot wrote the duplicate; if it re-appends this key the test goes red again. Its scripts are out of scope here

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/96982ad7232940348b9d4b447bab43ee
Open in Devin Desktop: https://app.devin.ai/desktop/session/96982ad7232940348b9d4b447bab43ee?variant=devin

…5 entry

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

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Removes a model pricing entry from the cost map.

The PR appears safe to merge; no actionable issue was identified in the changed maps.

Summary

Removes the trailing duplicate Perceptron model entry from both cost maps, allowing the earlier entry’s capability metadata to take effect.

  • Keeps the bundled backup identical to the root cost map.
  • Leaves the model’s pricing and token limits unchanged.

Reviews (1) · Last reviewed commit: "fix(cost-map): remove duplicate openrout..."

@codspeed

codspeed Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_cost_map_perceptron_duplicate (e2535ba) with main (4179860)1

Open in CodSpeed

Footnotes

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

@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

shrey-berri pushed a commit that referenced this pull request Sep 26, 2026
…5 entry

Ports the change from #43273 so the duplicate-key schema test
passes on this branch. It no-ops once main carries the same fix
shrey-berri added a commit that referenced this pull request Sep 26, 2026
…5 entry

Ports the change from #43273 so the duplicate-key schema test
passes on this branch. It no-ops once main carries the same fix
shrey-berri added a commit that referenced this pull request Sep 26, 2026
…5 entry

Port of #43273. Main currently defines this key twice, which fails test_price_map_has_no_duplicate_keys on every PR's misc shard. This becomes a no-op once #43273 lands
@yuneng-berri
yuneng-berri merged commit 4d7aa89 into main Sep 26, 2026
97 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_cost_map_perceptron_duplicate branch September 26, 2026 06:15
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.

1 participant