Skip to content

chore: Change moderations api response to Provider returned categories#3098

Merged
slekkala1 merged 6 commits into
mainfrom
clean-moderations-api-resp
Aug 13, 2025
Merged

chore: Change moderations api response to Provider returned categories#3098
slekkala1 merged 6 commits into
mainfrom
clean-moderations-api-resp

Conversation

@slekkala1

@slekkala1 slekkala1 commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

To be compliant with model policies for LLAMA, just return the categories as is from provider, we will lose the OAI compat in moderations api response.

Test Plan

SAFETY_MODEL=llama-guard3:8b LLAMA_STACK_CONFIG=starter uv run pytest -v tests/integration/safety/test_safety.py --text-model=llama3.2:3b-instruct-fp16 --embedding-model=all-MiniLM-L6-v2 --safety-shield=ollama

@ehhuang ehhuang left a comment

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.

LG

@slekkala1 slekkala1 force-pushed the clean-moderations-api-resp branch from b3ec1b1 to 85dc53e Compare August 12, 2025 23:15
@slekkala1 slekkala1 force-pushed the clean-moderations-api-resp branch from 85dc53e to 356b4df Compare August 12, 2025 23:22
@slekkala1 slekkala1 merged commit 25e0553 into main Aug 13, 2025
32 checks passed
@slekkala1 slekkala1 deleted the clean-moderations-api-resp branch August 13, 2025 16:47
slekkala1 added a commit that referenced this pull request Aug 18, 2025
# What does this PR do?
Add CodeScanner implementations

## Test Plan
`SAFETY_MODEL=CodeScanner LLAMA_STACK_CONFIG=starter uv run pytest -v
tests/integration/safety/test_safety.py
--text-model=llama3.2:3b-instruct-fp16
--embedding-model=all-MiniLM-L6-v2 --safety-shield=ollama`

This PR need to land after this
#3098
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants