Skip to content

Migrate to Mistral Moderation 2 (mistral-moderation-2603)#6554

Open
nicolaskrier wants to merge 1 commit into
spring-projects:mainfrom
nicolaskrier:mistral-moderation-2603
Open

Migrate to Mistral Moderation 2 (mistral-moderation-2603)#6554
nicolaskrier wants to merge 1 commit into
spring-projects:mainfrom
nicolaskrier:mistral-moderation-2603

Conversation

@nicolaskrier

@nicolaskrier nicolaskrier commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Description

  • Update moderation categories and category scores,
  • Improve null safety based on OpenAPI Specifications,
  • Polish integration tests.

Explanations

mistral-moderation-2411 has been retired the 30th of June 2026 and is replaced by mistral-moderation-2603. Here are the corresponding documentation links:

Regarding nullability, the following elements of the OAS are relevant:

Related work

#6565

- Update moderation categories and category scores
- Improve null safety based on OpenAPI Specifications
- Polish integration tests

See spring-projects#6565

Signed-off-by: Nicolas Krier <7557886+nicolaskrier@users.noreply.github.com>
@nicolaskrier nicolaskrier force-pushed the mistral-moderation-2603 branch from cb61fcf to 6098d78 Compare July 6, 2026 17:06
@nicolaskrier nicolaskrier marked this pull request as ready for review July 6, 2026 17:06
@nicolaskrier

Copy link
Copy Markdown
Contributor Author

Hi @ilayaperumalg, could you check this one when you have a moment?

@ilayaperumalg

Copy link
Copy Markdown
Member

@nicolaskrier Thanks for the PR!

@JsonProperty("financial") Boolean financial,
@JsonProperty("law") Boolean law,
@JsonProperty("pii") Boolean pii) {
@JsonProperty("sexual") @Nullable Boolean sexual,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that using additionalProperties on boolean type makes all these attributes nullable.

@JsonProperty("financial") Double financial,
@JsonProperty("law") Double law,
@JsonProperty("pii") Double pii) {
@JsonProperty("sexual") @Nullable Double sexual,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here for number type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants