Skip to content

fix(cli): address non-interactive and endpoint list failures#470

Merged
blainekasten merged 7 commits into
mainfrom
cursor/cli-command-failure-analysis-5412
Jul 23, 2026
Merged

fix(cli): address non-interactive and endpoint list failures#470
blainekasten merged 7 commits into
mainfrom
cursor/cli-command-failure-analysis-5412

Conversation

@cursor

@cursor cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • avoid blocking on fine-tuning launch confirmation in non-interactive mode while preserving price and account-balance warnings
  • restore tg beta endpoints list as the canonical command and retain ls as its alias
  • add regression coverage for both telemetry-observed failures

Context

The daily CLI failure export contained an EOF when reading a line from fine-tuning create in a non-interactive process and an unknown-command failure for endpoints list. Both still reproduced on current main, and no existing PR covered them. The preview-rendering and LoRA-download failures in the same export were already covered by PRs #466 and #469.

Tests

  • TOGETHER_TELEMETRY_DISABLED=1 .venv/bin/python -m pytest -n 0 tests/cli/test_fine_tuning.py tests/cli/test_beta_endpoints.py (27 passed)
  • .venv/bin/ruff check src/together/lib/cli/__init__.py src/together/lib/cli/api/fine_tuning/create.py tests/cli/test_fine_tuning.py tests/cli/test_beta_endpoints.py
  • .venv/bin/ruff format --check src/together/lib/cli/__init__.py src/together/lib/cli/api/fine_tuning/create.py tests/cli/test_fine_tuning.py tests/cli/test_beta_endpoints.py
  • .venv/bin/pyright --pythonpath .venv/bin/python src/together/lib/cli/__init__.py
  • .venv/bin/pyright --pythonpath .venv/bin/python src/together/lib/cli/api/fine_tuning/create.py
Open in Web View Automation 

cursoragent and others added 4 commits July 23, 2026 14:13
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
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 · GH Actions (zizmor) · Containers · SBOM · Powered by Together AI

Comment on lines +395 to +398
if not config.non_interactive:
resp = input("Do you want to proceed? [Y/n]").strip().lower()
if resp and resp != "y" and resp != "yes":
return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cursoragent should we consider changing this to use the confirm method from src/together/lib/cli/utils/_prompt.py

Would that work?

@cursor cursor Bot Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. It works, but alias it because the confirm CLI parameter shadows the helper:

from together.lib.cli.utils._prompt import confirm as prompt_confirm
if not confirm:
    console.print(get_confirmation_message(price_line=price_line, warning=warning))
    if not config.non_interactive and not await prompt_confirm("Do you want to proceed?"):
        return

This preserves blank-input-as-yes, avoids prompting in non-interactive mode, and handles EOF/cancellation as “no.” Keep the non_interactive guard; the helper alone would otherwise abort instead of submitting.

Open in Web Open in Cursor 

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cursoragent let's do that

@cursor cursor Bot Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Fine-tuning now uses the shared async confirm helper while retaining the non-interactive guard.

Checks: 19 tests passed; Ruff and Pyright clean.

Open in Web Open in Cursor 

Comment thread src/together/lib/cli/__init__.py Outdated
beta_endpoints_app.command(
(f"{_CLI}.beta.endpoints.list:list"),
name="ls",
name="list",

@blainekasten blainekasten Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cursoragent Can we have the command name stay as ls and have a hidden version that aliases list to this command? I'm ok with it working, but don't want the help output text to show the name list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cursoragent Can we have the command name stay as ls and have a hidden version that aliases list to this command? I'm ok with it working, but don't want the help output text to show the name list

@cursor cursor Bot Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Implemented:

  • ls remains the visible canonical command.
  • list is registered separately with show=False.
  • Added help-output regression coverage.
  • Both commands still work.

Checks: 9 tests passed; Ruff and Pyright clean.

Environment lacked dependencies; consider an environment setup agent at cursor.com/onboard: “Install uv 0.10.2 and run uv sync --all-extras.”

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 23, 2026 14:57
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
@blainekasten
blainekasten marked this pull request as ready for review July 23, 2026 15:11
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
@blainekasten
blainekasten merged commit b43099d into main Jul 23, 2026
11 of 12 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 23, 2026
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