From c041da76f7d1745973881c10ddc89b2233019097 Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Tue, 4 Nov 2025 21:17:12 -0500 Subject: [PATCH 1/2] wip --- src/together/cli/api/endpoints.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/together/cli/api/endpoints.py b/src/together/cli/api/endpoints.py index 271f864..3f5a86f 100644 --- a/src/together/cli/api/endpoints.py +++ b/src/together/cli/api/endpoints.py @@ -347,9 +347,9 @@ def delete(client: Together, endpoint_id: str) -> None: ) @click.option( "--mine", - type=click.BOOL, - default=None, - help="true (only mine), default=all", + is_flag=True, + default=False, + help="Only show endpoints owned by the caller", ) @click.option( "--usage-type", @@ -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 (flag not provided) to None for API call + mine_param = True if mine else None 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: From fb7ef3279f90c83af67c34ecea7cfc92cdd42732 Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Tue, 4 Nov 2025 21:35:29 -0500 Subject: [PATCH 2/2] wip --- src/together/cli/api/endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/together/cli/api/endpoints.py b/src/together/cli/api/endpoints.py index 3f5a86f..3475689 100644 --- a/src/together/cli/api/endpoints.py +++ b/src/together/cli/api/endpoints.py @@ -347,9 +347,9 @@ def delete(client: Together, endpoint_id: str) -> None: ) @click.option( "--mine", - is_flag=True, - default=False, - help="Only show endpoints owned by the caller", + type=click.BOOL, + default=True, + help="Show only endpoints owned by the caller (default: true)", ) @click.option( "--usage-type", @@ -366,7 +366,7 @@ def list( mine: bool, ) -> None: """List all inference endpoints (includes both dedicated and serverless endpoints).""" - # Convert False (flag not provided) to None for API call + # Convert False to None for API call (False means show all, not just mine) mine_param = True if mine else None endpoints: List[ListEndpoint] = client.endpoints.list( type=type, usage_type=usage_type, mine=mine_param