Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/together/cli/api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ def delete(client: Together, endpoint_id: str) -> None:
@click.option(
"--mine",
type=click.BOOL,
default=None,
help="true (only mine), default=all",
default=True,
help="Show only endpoints owned by the caller (default: true)",
)
@click.option(
"--usage-type",
Expand All @@ -363,11 +363,13 @@ def list(
json: bool,
type: Literal["dedicated", "serverless"] | None,
usage_type: Literal["on-demand", "reserved"] | None,
mine: bool | None,
mine: bool,
) -> None:
"""List all inference endpoints (includes both dedicated and serverless endpoints)."""
# Convert False to None for API call (False means show all, not just mine)
mine_param = True if mine else None
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't passing --mine false mean list models that are !mine, meaning this breaks that behavior

endpoints: List[ListEndpoint] = client.endpoints.list(
type=type, usage_type=usage_type, mine=mine
type=type, usage_type=usage_type, mine=mine_param
)

if not endpoints:
Expand Down