Skip to content

chore(ci): re-issue 31566 for full CI run - #31629

Merged
yuneng-berri merged 3 commits into
litellm_internal_stagingfrom
litellm_yj_june29
Jun 29, 2026
Merged

yuneng-berri merged 3 commits into
litellm_internal_stagingfrom
litellm_yj_june29

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

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

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

stuxf and others added 3 commits June 28, 2026 21:13
The error string is already produced by the f-string interpolation; the
trailing .format() call on it was redundant. Add a regression test that
the message renders the model name verbatim.
get_model_list always returns a list, never None, so the is-None branch
could not execute. Collapse to the single reachable message.
…or_cleanup

chore(router): simplify unknown-model error message construction
@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes router error message construction for unknown model names. The main changes are:

  • Removes a second .format() pass from the no-healthy-deployments error message
  • Preserves caller-supplied model names containing Python format-field syntax as literal text
  • Adds a focused async regression test for the malformed model-name case

Confidence Score: 5/5

The change is narrowly scoped to error-message construction and is safe to merge.

The update removes unsafe formatting of caller-supplied model names and includes a focused regression test for the malformed-name case.

T-Rex T-Rex Logs

What T-Rex did

  • The baseline test run was executed to observe the distorted base message, recording message_length=381, literal_present=True, and padding_detected=True, and it exited with code 0 while reporting litellm.exceptions.BadRequestError.
  • The post-fix test run was executed to confirm the fix, recording message_length=188, literal_present=True, and padding_detected=False, and it rendered model=ghost{:>200}model literally; it exited with code 0 after reporting litellm.exceptions.BadRequestError.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "Merge pull request #31566 from stuxf/lit..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yuneng-berri
yuneng-berri merged commit f5e7f99 into litellm_internal_staging Jun 29, 2026
73 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_yj_june29 branch June 29, 2026 19:44
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