Skip to content

Commit 5b718b1

Browse files
seedspiritclaude
andcommitted
fix(BA-5986): make ModelMountConfigInput.definition_path nullable
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>
1 parent 16f4bc6 commit 5b718b1

5 files changed

Lines changed: 19 additions & 5 deletions

File tree

docs/manager/graphql-reference/supergraph.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9558,7 +9558,7 @@ input ModelMountConfigInput
95589558
{
95599559
vfolderId: ID!
95609560
mountDestination: String!
9561-
definitionPath: String!
9561+
definitionPath: String = null
95629562
}
95639563

95649564
"""

docs/manager/graphql-reference/v2-schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6337,7 +6337,7 @@ type ModelMountConfig {
63376337
input ModelMountConfigInput {
63386338
vfolderId: ID!
63396339
mountDestination: String!
6340-
definitionPath: String!
6340+
definitionPath: String = null
63416341
}
63426342

63436343
"""

src/ai/backend/common/dto/manager/deployment/request.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,14 @@ class ModelMountConfigInput(BaseRequestModel):
238238

239239
vfolder_id: VFolderUUID = Field(description="Model vfolder ID")
240240
mount_destination: str = Field(default="/models", description="Mount destination path")
241-
definition_path: str = Field(description="Model definition file path within vfolder")
241+
definition_path: str | None = Field(
242+
default=None,
243+
description=(
244+
"Optional model definition file path within vfolder. "
245+
"When omitted, the server auto-detects `model-definition.yaml` or "
246+
"`model-definition.yml`."
247+
),
248+
)
242249

243250

244251
class ModelRuntimeConfigInput(BaseRequestModel):

src/ai/backend/common/dto/manager/v2/deployment/request.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,14 @@ class ModelMountConfigInput(BaseRequestModel):
202202

203203
vfolder_id: VFolderUUID = Field(description="VFolder ID for the model")
204204
mount_destination: str = Field(description="Mount destination path inside container")
205-
definition_path: str = Field(description="Path to model definition file")
205+
definition_path: str | None = Field(
206+
default=None,
207+
description=(
208+
"Optional path to the model definition file within the model vfolder. "
209+
"When omitted, the server auto-detects `model-definition.yaml` or "
210+
"`model-definition.yml`."
211+
),
212+
)
206213

207214

208215
class ExtraVFolderMountInput(BaseRequestModel):

src/ai/backend/manager/api/gql/deployment/types/revision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ class ModelRuntimeConfigInput(PydanticInputMixin[ModelRuntimeConfigInputDTO]):
776776
class ModelMountConfigInput(PydanticInputMixin[ModelMountConfigInputDTO]):
777777
vfolder_id: ID
778778
mount_destination: str
779-
definition_path: str
779+
definition_path: str | None = None
780780

781781

782782
@gql_pydantic_input(

0 commit comments

Comments
 (0)