Repository navigation
Add deployment and promotion settings flags to model push - #180
Open
mingminglang-baseten wants to merge 32 commits into
Open
mingminglang-baseten wants to merge 32 commits into
mingminglang-baseten wants to merge 32 commits into
Conversation
…listing
The usage command listed your teams and your Code settings in each with
GET /v1/routes/settings/users/me/teams, which is being removed. Use
GET /v1/teams for your teams and GET /v1/routes/settings/teams/{team}/users/me
for your settings in each, which say the same things. Org admins are
members of every team, so they still see every team.
Claude-Session: https://claude.ai/code/session_01UkWMh7GwDgbmR88spBWMEm
Pins baseten-go to the client regenerated for the renamed Grid API, so every call site moves to the GetGrid*/PostGrid*/PatchGrid*/DeleteGrid* methods. grid usage now reads your settings from GET /v1/grid/team_settings/users/me and passes --team straight through as team_id: the server uses your only team, or asks for --team when you belong to several. The client-side team listing and name matching are gone, along with the "No usage this month" branch they fed. Claude-Session: https://claude.ai/code/session_01UkWMh7GwDgbmR88spBWMEm
Preserve the source PR's all-team usage and team name/ID filtering while using the current Grid API and Grid-named files. Resolve the usage implementation and test conflicts without restoring legacy command files.
* adding functionality to cli * Update go.sum * adding functionality to cli
`grid usage` listed your teams and fetched your settings in each to draw your spend against your limit, the one place the CLI still stitched teams together client-side. Per the review on this PR, usage is one command: `grid route usage [--team] [--user-id]`, whose arguments behave as the API does. Without --team, usage spans the teams you can see; without --user-id, members see their own usage and admins see everyone's. Your spend against your limit in a team is `grid user-settings describe`. Claude-Session: https://claude.ai/code/session_01UkWMh7GwDgbmR88spBWMEm
The list spans every team you can see unless --team narrows it, so two rows can share a name. A TEAM column, as the connection list already has, tells them apart. Claude-Session: https://claude.ai/code/session_01UkWMh7GwDgbmR88spBWMEm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nges in the prompt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mingminglang-baseten
marked this pull request as ready for review
October 22, 2026 05:15
cretz
approved these changes
Oct 22, 2026
cretz
left a comment
Collaborator
There was a problem hiding this comment.
Nothing blocking (I assume there are 0 changes/incompatibilities with people using push today)
| func promotionSettingsGroupOrNil[T comparable](group T) *T { | ||
| // settingsGroupOrNil returns nil for a settings group with no fields set, so an | ||
| // untouched group is omitted from the promote or push request. | ||
| func settingsGroupOrNil[T comparable](group T) *T { |
Collaborator
There was a problem hiding this comment.
Pedantic, but maybe deploymentSettingsGroupOrNil?
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Upstream SDK PR #74 remains unmerged, so its merge and the documented dependency repin require final verification.
No open issues 🎉
What changed in this PR
Extends baseten model push with deployment configuration and promotion settings, reusing the existing promotion flag handling.
Changes:
- Adds instance type, autoscaling, backpressure, schedule-update, and promotion-override flags.
- Shares settings mapping between push and promote, omitting settings groups when unused.
- Updates the SDK dependency and adds tests for settings payloads, default omission, and validation.
| File | Description |
|---|---|
internal/cmd/command.model_push.go |
Maps new settings into push options and rejects conflicting instance-type flags. |
internal/cmd/command.model_push_test.go |
Tests settings payloads, omitted defaults, and invalid inputs. |
internal/cmd/command.model_deployment.go |
Reuses settings helpers across promote and push. |
go.sum |
Updates SDK dependency checksums. |
go.mod |
Pins the SDK commit providing the new push options. |
cmd/command.model.go |
Defines shared override flags and documents new push options. |
cmd/command.model_deployment.go |
Embeds the shared promotion override flags. |
Review effort: Balanced
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
baseten model pushcan set the new deployment's instance type (--instance-type), autoscaling (--min-replica,--max-replica, …) and request backpressure (--request-backpressure-policy). With--environment, the environment also keeps them once the promotion completes.--autoscaling-schedule-update-jsonand the--override-*promotion flags apply only to the promotion into--environment, so they require it; the server enforces which settings need it.Existing pushes are unchanged: a push without the new flags sends the same requests as before, checked by diffing the request bodies of
mainand this branch for plain,--environment,--preserve-env-instance-type,--create-environment-if-missing,--deployment-name/--region/--labels,--dry-run,--developand--deploy-timeout/--no-build-cachepushes. No existing flag is renamed or removed.💻 How
PushModelOptionsfields from Add deployment and promotion settings to PushModelOptions baseten-go#74, sending each group only when one of its flags is passed.--override-*flags move into a sharedPromotionSettingsOverrideFlagsused by bothpromoteandpush, which also share the schedule JSON parsing and backpressure mapping.--instance-typewith--preserve-env-instance-typeis a usage error, as onpromote.Before merging:
go.modpins basetenlabs/baseten-go#74's branch commit; repin to itsmaincommit once it merges.🔬 Testing
New push tests for settings with and without
--environment,--instance-typewith--preserve-env-instance-type, and an empty schedule update; the default push test also checks that none of the new fields are sent.go mod tidy,go fmt,go vetand themodeltests pass.🤖 Generated with Claude Code