Skip to content

fix(BA-5986): make ModelMountConfigInput.definition_path nullable#11537

Merged
jopemachine merged 2 commits into
mainfrom
fix/BA-5986
May 11, 2026
Merged

fix(BA-5986): make ModelMountConfigInput.definition_path nullable#11537
jopemachine merged 2 commits into
mainfrom
fix/BA-5986

Conversation

@seedspirit
Copy link
Copy Markdown
Contributor

@seedspirit seedspirit commented May 11, 2026

Summary

  • ModelMountConfigInput.definition_path is now nullable in the GQL input, v2 DTO, and legacy DTO. When omitted, the server falls back to the existing model-definition.yaml / model-definition.yml auto-detect in DeploymentRepository.fetch_model_definition().
  • Previously the non-null boundary forced frontends to send a placeholder; if the actual file used the .yml extension, the server tried the placeholder verbatim and failed with DefinitionFileNotFound, never reaching the fallback.
  • Input-only change. Response DTO ModelMountConfigInfoDTO.definition_path stays str (service-layer or "" coercion preserved) so existing clients keep compiling.

Test plan

  • pants check clean on the changed DTO / GQL files
  • pants test --changed-since=HEAD --changed-dependents=transitive green (incl. tests/component/deployment/*, tests/unit/client_v2/test_deployment.py)
  • Manual: addModelRevision without model_mount_config.definition_path against a vfolder that contains only model-definition.yml
  • Manual: existing call with explicit definition_path still works

Resolves BA-5986


📚 Documentation preview 📚: https://sorna--11537.org.readthedocs.build/en/11537/


📚 Documentation preview 📚: https://sorna-ko--11537.org.readthedocs.build/ko/11537/

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>
@github-actions github-actions Bot added size:S 10~30 LoC area:docs Documentations comp:manager Related to Manager component comp:common Related to Common component labels May 11, 2026
@seedspirit seedspirit marked this pull request as ready for review May 11, 2026 01:33
@seedspirit seedspirit requested review from a team and Copilot May 11, 2026 01:33
@seedspirit seedspirit requested a review from ironAiken2 May 11, 2026 01:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 of null.
  • Updated v2 and legacy Manager request DTOs so definition_path can 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 jopemachine merged commit 3243034 into main May 11, 2026
40 checks passed
@jopemachine jopemachine deleted the fix/BA-5986 branch May 11, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants