fix(mastra): use portable model aliases#650
Merged
Merged
Conversation
defang-sam
Bot
force-pushed
the
sam/fix-model-configuration-two-a7f4gs
branch
from
July 20, 2026 07:35
8c8531b to
3cd3c98
Compare
Contributor
Author
|
CI note: |
lionello
approved these changes
Jul 20, 2026
The Deploy Changed Samples CI tool (tools/testing) loads each sample's compose.yaml via compose-go purely to enumerate empty-valued env vars (config names) before deploying. It pinned compose-go v2.6.5, whose schema does not recognize the modern service-level `models:` binding (endpoint_var/model_var). This caused mastra-extended to fail at pre-flight config load with: validating .../mastra-extended/compose.yaml: services.app additional properties 'models' not allowed before `defang compose up` ever ran. v2.7.1 is the minimal version that accepts the long-form service `models:` binding (v2.7.0 accepts the short form only). No `go` directive change and no transitive dependency changes (v2.7.1 has an identical go.mod to v2.6.5). Precedent: 64e746e bumped compose-go for the `provider` field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lionello
approved these changes
Jul 20, 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.
What
Use the portable bare aliases in
mastra-extended:chat-defaultembedding-defaultWhy
Stable Defang releases recognize the bare aliases. The
ai/spellings previously passed through to LiteLLM, which interpretedaias an invalid provider and failed only when the application made a model call.Scope
This branch is based on current
mainand changes only the two model values insamples/mastra-extended/compose.yaml. It no longer duplicates the open self-updating Mastra feature from #648.Validation
The CLI from DefangLabs/defang#2175 generates both gateways with the bare aliases and the corrected 0.5 CPU / 2 GiB reservations.
CI tooling fix (added)
The Deploy Changed Samples job was failing at pre-flight config load:
The test tool (
tools/testing) loads each compose file via compose-go only to enumerate empty-valued env vars (config names), and pinned compose-go v2.6.5, whose schema predates the service-levelmodels:binding this sample uses. Bumped it to v2.7.1 — the minimal version that accepts the long-formendpoint_var/model_varbinding (nogodirective change and no transitive dependency changes).defang compose upwas never reached before, so this unblocks the deploy test.Samples Checklist
✅ All good!