fix: instantiate ModelConfigOverrides records without no-arg ctor (#2493) - #2653
Open
vikas-prasad-cx wants to merge 1 commit into
Open
vikas-prasad-cx wants to merge 1 commit into
vikas-prasad-cx wants to merge 1 commit into
Conversation
…mefoldAI#2493) Allow empty record instances via the canonical constructor so models no longer need an all-null no-arg constructor for default config profiles. Co-authored-by: Cursor <cursoragent@cursor.com>
vikas-prasad-cx
requested a deployment
to
external
September 9, 2026 22:42 — with
GitHub Actions
Waiting
vikas-prasad-cx
requested a deployment
to
external
September 9, 2026 22:42 — with
GitHub Actions
Waiting
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.
Summary
EmptyInstancesso the Service SDK can create empty class/record instances at build time (no-arg constructor for classes; canonical constructor with null/primitive defaults for records).DefaultConfigProfileProcessorto use it instead of requiringgetDeclaredConstructor().newInstance().ModelConfigOverridesto a record with no dummy all-null constructor, proving models can drop that boilerplate.EmptyInstancesTestcoverage for classes, records, primitives, and compact constructors.Fixes #2493
Test plan
./mvnw test -pl service/quarkus/deployment -Dtest=EmptyInstancesTest(5 tests passed)./mvnw test -pl service/quarkus/deployment -Dtest=DefaultConfigProfileTest(passed; record without no-arg constructor)./mvnw test -pl service/quarkus/deployment(49 tests passed, 0 failures)Made with Cursor