fix(BA-5986): make ModelMountConfigInput.definition_path nullable#11537
Merged
Conversation
Server already falls back to `model-definition.yaml`/`.yml` when `model_definition_path` is unset, but the GQL/DTO boundary forced a non-null value — so frontends sent a placeholder and the fallback never ran when the actual file used the `.yml` extension. Relax the v2 DTO, legacy DTO, and GQL input so omitting the field triggers auto-detection. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes ModelMountConfigInput.definition_path optional/nullable across the Manager GraphQL input surface and both v2 + legacy Manager request DTOs, allowing clients to omit the field and let the server fall back to auto-detecting model-definition.yaml / model-definition.yml (via DeploymentRepository.fetch_model_definition()).
Changes:
- Updated GraphQL input (
ModelMountConfigInput.definitionPath) to be nullable with a default ofnull. - Updated v2 and legacy Manager request DTOs so
definition_pathcan be omitted (None) and documented the auto-detection behavior. - Added a towncrier news fragment describing the behavior change.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ai/backend/manager/api/gql/deployment/types/revision.py | Makes ModelMountConfigInput.definition_path optional in the Strawberry/Pydantic GraphQL input. |
| src/ai/backend/common/dto/manager/v2/deployment/request.py | Makes v2 request DTO definition_path optional with updated description documenting server auto-detect. |
| src/ai/backend/common/dto/manager/deployment/request.py | Makes legacy request DTO definition_path optional with updated description documenting server auto-detect. |
| docs/manager/graphql-reference/v2-schema.graphql | Updates the documented v2 GraphQL schema input field to be optional (String = null). |
| docs/manager/graphql-reference/supergraph.graphql | Updates the documented supergraph schema input field to be optional (String = null). |
| changes/11537.fix.md | Adds changelog entry for omitting definition_path to enable server auto-detection fallback. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jopemachine
approved these changes
May 11, 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
ModelMountConfigInput.definition_pathis now nullable in the GQL input, v2 DTO, and legacy DTO. When omitted, the server falls back to the existingmodel-definition.yaml/model-definition.ymlauto-detect inDeploymentRepository.fetch_model_definition()..ymlextension, the server tried the placeholder verbatim and failed withDefinitionFileNotFound, never reaching the fallback.ModelMountConfigInfoDTO.definition_pathstaysstr(service-layeror ""coercion preserved) so existing clients keep compiling.Test plan
pants checkclean on the changed DTO / GQL filespants test --changed-since=HEAD --changed-dependents=transitivegreen (incl.tests/component/deployment/*,tests/unit/client_v2/test_deployment.py)addModelRevisionwithoutmodel_mount_config.definition_pathagainst a vfolder that contains onlymodel-definition.ymldefinition_pathstill worksResolves BA-5986
📚 Documentation preview 📚: https://sorna--11537.org.readthedocs.build/en/11537/
📚 Documentation preview 📚: https://sorna-ko--11537.org.readthedocs.build/ko/11537/