Disable input count validation flag - #4492
Open
przepeck wants to merge 9 commits into
Open
Conversation
this change has introduced the parameter for disabling input count validation to match TFS's behavior as the customer requested
przepeck
requested review from
atobiszei and
dtrawins
and
a lite review from Copilot
August 31, 2026 09:55
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new server flag --disable_input_count_validation intended to relax inference-request validation behavior (to align with TFS behavior around extra request inputs), and wires it through CLI parsing, runtime validation, tests, and documentation.
Changes:
- Added CLI/config plumbing for
disable_input_count_validationand exposed it viaovms::Config. - Modified request validation to conditionally skip input-count validation when the flag is enabled.
- Added/updated unit tests and documentation to cover the new flag.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/test/predict_validation_test.cpp |
Adds KFS validation tests for the new flag using a config-toggling test fixture. |
src/test/ovmsconfig_test.cpp |
Extends CLI parsing tests to include the new flag and verifies its default value. |
src/predict_request_validation_utils.hpp |
Gates validateNumberOfTensors() behind the new config flag. |
src/config.hpp |
Declares Config::disableInputCountValidation(). |
src/config.cpp |
Implements Config::disableInputCountValidation(). |
src/cli_parser.cpp |
Adds the --disable_input_count_validation CLI option and maps it into ServerSettingsImpl. |
src/capi_frontend/server_settings.hpp |
Adds disableInputCountValidation to server settings with a default of false. |
src/BUILD |
Adds deps to a CAPI library target (currently used to satisfy new header inclusion requirements). |
docs/security_considerations.md |
Documents security implications of enabling the new flag. |
docs/parameters.md |
Documents the new CLI parameter and its behavior. |
Suppressed comments (1)
src/test/predict_validation_test.cpp:144
TearDown()ignores the return value ofConfig::parse(...)when restoring global settings. If this fails, it can pollute subsequent tests in the same binary.
ovms::Config::instance().parse(&originalServerSettings, &originalModelsSettings);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
293
to
297
| Status finalStatus = StatusCode::OK; | ||
| RETURN_IF_ERR(validateNumberOfTensors()); | ||
| if (choice == ValidationChoice::INPUT && !ovms::Config::instance().disableInputCountValidation()) { | ||
| RETURN_IF_ERR(validateNumberOfTensors()); | ||
| } | ||
| RETURN_IF_ERR(validateRequestCoherency()); |
Collaborator
Author
There was a problem hiding this comment.
I cannot agree with this comment, error "INVALID_MISSING_INPUT" is better for described scenario
dtrawins
reviewed
Sep 1, 2026
Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
dtrawins
approved these changes
Sep 2, 2026
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
CVS-187884
Adding flag
--disable_input_count_validationto match TFS behavior with number of sent input entries grater then model input count🧪 Checklist
``