Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) litellm.amoderation - support using model=openai/omni-moderation-latest, model=omni-moderation-latest, model=None #7475

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Dec 30, 2024

(fix) litellm.amoderation - support using model=openai/omni-moderation-latest, model=omni-moderation-latest, model=None

Details

  • moderation on the litellm.Router started routing to the correct deployment on v1.55.8-stable
  • Router passed model=openai/omni-moderation-latest to litellm.amoderation but litellm.amoderation needed to handle stripping out custom_llm_provider

Relevant issues

Type

🐛 Bug Fix
✅ Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

Added parametrized test for this scenario

@pytest.mark.parametrize(
    "model", ["omni-moderation-latest", "openai/omni-moderation-latest", None]
)

Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ❌ Failed (Inspect) Dec 30, 2024 3:51pm

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@ishaan-jaff ishaan-jaff merged commit a003af6 into main Dec 30, 2024
29 of 30 checks passed
ishaan-jaff added a commit that referenced this pull request Jan 4, 2025
…tion-latest`, `model=omni-moderation-latest`, `model=None` (#7475)

* test_moderation_endpoint

* fix litellm.amoderation
rajatvig pushed a commit to rajatvig/litellm that referenced this pull request Jan 16, 2025
…tion-latest`, `model=omni-moderation-latest`, `model=None` (BerriAI#7475)

* test_moderation_endpoint

* fix litellm.amoderation
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