Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public API removal of AbstractSimpleModel lacks a justified java.class.removed exception in service/definition/src/build/revapi-differences.json.
1 open issue
What changed in this PR
Removes AbstractSimpleModel from the service API, taking the removal option proposed in #2509.
Changes:
- Removes the base class and its special handling in Quarkus discovery.
- Updates Java and Kotlin examples to implement the service interfaces directly.
- Adds migration guidance and updates override documentation.
| File | Description |
|---|---|
| service/quarkus/deployment/src/main/java/ai/timefold/solver/service/quarkus/deployment/TimefoldModelsProcessor.java | Removes base-class filtering and score fallback. |
| service/definition/src/main/java/ai/timefold/solver/service/definition/api/AbstractSimpleModel.java | Deletes the simplified model base class. |
| docs/src/modules/ROOT/pages/upgrading-timefold-solver/upgrade-to-latest.adoc | Adds migration instructions. |
| docs/src/modules/ROOT/pages/running-timefold-solver/service/model-config-overrides.adoc | Updates the explanation of trivial conversion. |
| docs/src/modules/ROOT/pages/quickstart/service/getting-started.adoc | Uses explicit interfaces and score properties. |
| docs/src/modules/ROOT/pages/domain-modeling/modeling-planning-problems.adoc | Removes examples using the deleted class. |
Review effort: Balanced
| - `ModelConvertor` and `ModelConvertorBase` moved to `ai.timefold.solver.service.definition.api.conversion`. | ||
| - Demo data types moved to the preview API in `ai.timefold.solver.service.definition.preview.api.demo`. | ||
| - `UserModel` was removed without a replacement. | ||
| - `AbstractSimpleModel` was removed without a replacement. |
rsynek
commented
Dec 4, 2026
| This requires a custom `ModelConvertor`. | ||
| If your `SolverModel` also serves as `ModelInput` and `ModelOutput`, for example because you extend `AbstractSimpleModel`, the framework uses a trivial `ModelConvertor` by default, which ignores `modelConfig` entirely. | ||
| If your `SolverModel` also serves as `ModelInput` and `ModelOutput`, by implementing all these interfaces, the framework uses a trivial `ModelConvertor` by default, which ignores `modelConfig` entirely. | ||
| With only the trivial convertor in place, constraint weight overrides submitted in a request are silently dropped: the request succeeds, but the override never reaches the solver. |
Contributor
Author
There was a problem hiding this comment.
This problem still exists if a user implement all the three interfaces. I am thinking of dropping the generated trivial convertor that hides it and let the user always implement the conversion.
A bit more boilerplate code, but no surprises.
rsynek
force-pushed
the
chore/remove-abstract-simple-model
branch
from
December 4, 2026 16:00
927eda6 to
e2d5306
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #2509.