Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.16.0"
".": "1.17.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 27
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-c8e66e827fc2b1465b740a29e87da71c3b1ddca1a4bdb1023aa96c569b80e9be.yml
openapi_spec_hash: 35fdc3e34feb56cafaf4de2834201978
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-5cee858ce17e48e25e7503767dd979c6570a485511274e48129a1922eae67098.yml
openapi_spec_hash: 54c716ac4e888bfddc2c6402192bb33a
config_hash: 13d10207114afb65f7ac4e21f4c0e358
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.17.0 (2026-04-29)

Full Changelog: [v1.16.0...v1.17.0](https://github.com/moderation-api/sdk-python/compare/v1.16.0...v1.17.0)

### Features

* **api:** api update ([20a861b](https://github.com/moderation-api/sdk-python/commit/20a861b7b3eb2befcba207af0ae424e050a6643f))

## 1.16.0 (2026-04-28)

Full Changelog: [v1.15.0...v1.16.0](https://github.com/moderation-api/sdk-python/compare/v1.15.0...v1.16.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "moderation_api"
version = "1.16.0"
version = "1.17.0"
description = "The official Python library for the moderation-api API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/moderation_api/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "moderation_api"
__version__ = "1.16.0" # x-release-please-version
__version__ = "1.17.0" # x-release-please-version
22 changes: 21 additions & 1 deletion src/moderation_api/types/content_submit_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"PolicyEntityMatcherOutputMatchSignals",
"PolicyEntityMatcherOutputMatchSignalsBrandImpersonation",
"Recommendation",
"RecommendationMatchedRule",
"Error",
]

Expand Down Expand Up @@ -321,20 +322,39 @@ class PolicyEntityMatcherOutput(BaseModel):
Policy: TypeAlias = Union[PolicyClassifierOutput, PolicyEntityMatcherOutput]


class RecommendationMatchedRule(BaseModel):
key: str

name: str


class Recommendation(BaseModel):
"""The recommendation for the content based on the evaluation."""

action: Literal["review", "allow", "reject"]
"""The action to take based on the recommendation"""

reason_codes: List[
Literal["severity_reject", "severity_review", "author_block", "dry_run", "trusted_allow", "untrusted_severity"]
Literal[
"severity_reject",
"severity_review",
"author_block",
"dry_run",
"trusted_allow",
"untrusted_severity",
"rule_match",
"rule_default",
"rule_fallback",
]
]
"""The reason code for the recommendation.

Can be used to display a reason to the user.
"""

matched_rules: Optional[List[RecommendationMatchedRule]] = None
"""Rules that matched during evaluation, if rules engine is active."""


class Error(BaseModel):
id: str
Expand Down
Loading