fix(cli): address non-interactive and endpoint list failures#470
Conversation
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 Security ScanNote ✅ Clean scan Note Re-scan this PR anytime with
|
| 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 |
There was a problem hiding this comment.
@cursoragent should we consider changing this to use the confirm method from src/together/lib/cli/utils/_prompt.py
Would that work?
There was a problem hiding this comment.
Yes. It works, but alias it because the confirm CLI parameter shadows the helper:
from together.lib.cli.utils._prompt import confirm as prompt_confirmif 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?"):
returnThis 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.
| beta_endpoints_app.command( | ||
| (f"{_CLI}.beta.endpoints.list:list"), | ||
| name="ls", | ||
| name="list", |
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
Implemented:
lsremains the visible canonical command.listis registered separately withshow=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.”
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>


Summary
tg beta endpoints listas the canonical command and retainlsas its aliasContext
The daily CLI failure export contained an
EOF when reading a linefromfine-tuning createin a non-interactive process and an unknown-command failure forendpoints 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