Skip to content

feat(cli): support shadowing to an existing deployment (DX-831) - #524

Draft
blainekasten wants to merge 2 commits into
mainfrom
cursor/shadow-existing-deployment-b392
Draft

feat(cli): support shadowing to an existing deployment (DX-831)#524
blainekasten wants to merge 2 commits into
mainfrom
cursor/shadow-existing-deployment-b392

Conversation

@blainekasten

@blainekasten blainekasten commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • tg beta endpoints shadow can attach an existing deployment as a shadow target by passing a dep_... (or deployment name) as the first positional ENDPOINT arg — parent endpoint is inferred.
  • No new flag: dropped --target-deployment-id per review feedback.
  • Create-new-deployment path unchanged: ENDPOINT + MODEL.

Usage

# Attach an existing deployment
tg beta endpoints shadow dep_xxxxxxxxxxxx --rate 0.1

# Create a new shadow deployment (unchanged)
tg beta endpoints shadow my-endpoint Qwen/Qwen2.5-7B --rate 0.1

Test plan

  • uv run pytest tests/cli/test_beta_endpoints_shadow.py -v (34 passed)
  • Unit coverage for dep_ vs ep_ / MODEL create-path detection
  • CLI coverage for attach existing deployment, custom target name, experiment reuse, not-found, MODEL+dep_ rejection
  • Existing create-new-deployment shadow path still green
  • Help epilogue shows tg beta endpoints shadow dep_... --rate 0.1

Fixes DX-831

Linear Issue: DX-831

Open in Web Open in Cursor 

Add --target-deployment-id to `tg beta endpoints shadow` so users can
attach a pre-existing deployment as a shadow experiment target (matching
the API's targetDeploymentId) instead of always creating a new one.

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
@broly-code-security-scanner

Copy link
Copy Markdown

Broly Security Scan

Note

Clean scan
No vulnerabilities detected in this PR.

Note

Re-scan this PR anytime with /broly scan — useful after /broly undismiss, or to refresh findings without a new push.

Broly — SAST (zai-org/GLM-5.2) · Secrets · SCA · IaC · GH Actions · Base Images · Supply Chain Threats · Exploit Chains · Adversarial Verification

We're continuously improving Broly's accuracy and finding quality — your feedback is valuable. False positives, missed findings, bugs, and feature requests all welcome.

Ask in #security-engineering   Powered by Together AI

@blainekasten

Copy link
Copy Markdown
Collaborator Author

@cursoragent I don't want to add a new flag for this. Drop --target-deployment-id and let it come in on the first positional arg

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Dropped --target-deployment-id. Existing deployments go on the first positional:

tg beta endpoints shadow dep_xxxxxxxxxxxx --rate 0.1

Endpoint is inferred from the deployment. Create path unchanged (endpoint + MODEL). 34 tests green; PR updated.

Open in Web Open in Cursor 

Drop --target-deployment-id. Pass a dep_... (or deployment name) as the
first positional to attach an existing deployment; endpoint is inferred.
Create-new-deployment still uses endpoint + MODEL.

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
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.

2 participants