Skip to content

Add deployment and promotion settings flags to model push - #180

Open
mingminglang-baseten wants to merge 32 commits into
mainfrom
mingming/push-time-settings
Open

mingminglang-baseten wants to merge 32 commits into
mainfrom
mingming/push-time-settings

Conversation

@mingminglang-baseten

@mingminglang-baseten mingminglang-baseten commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What

baseten model push can 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-json and 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 main and this branch for plain, --environment, --preserve-env-instance-type, --create-environment-if-missing, --deployment-name/--region/--labels, --dry-run, --develop and --deploy-timeout/--no-build-cache pushes. No existing flag is renamed or removed.

💻 How

  • Maps the flags onto the new PushModelOptions fields from Add deployment and promotion settings to PushModelOptions baseten-go#74, sending each group only when one of its flags is passed.
  • The --override-* flags move into a shared PromotionSettingsOverrideFlags used by both promote and push, which also share the schedule JSON parsing and backpressure mapping.
  • --instance-type with --preserve-env-instance-type is a usage error, as on promote.

Before merging: go.mod pins basetenlabs/baseten-go#74's branch commit; repin to its main commit once it merges.

🔬 Testing

New push tests for settings with and without --environment, --instance-type with --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 vet and the model tests pass.

🤖 Generated with Claude Code

youngzheng-oss and others added 28 commits October 15, 2026 09:42
…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
mingminglang-baseten marked this pull request as ready for review October 22, 2026 05:15

@cretz cretz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pedantic, but maybe deploymentSettingsGroupOrNil?

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear

linear Bot commented Oct 23, 2026

Copy link
Copy Markdown

DI-2912

Base automatically changed from mingming/promotion-time-settings to main October 23, 2026 19:06
mingminglang-baseten and others added 2 commits October 23, 2026 19:27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants