Skip to content
Merged
1 change: 1 addition & 0 deletions log1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"object":"list","data":[{"id":"endpoint-2f8539d4-3266-41d4-9f80-cd772114d123","object":"endpoint","name":"cursor/deepseek-v3-agent-mystery-2-7","display_name":"DeepSeek V3-0324","model":"cursor/deepseek-v3-agent-mystery-2-7","model_type":"chat","hardware":"4x_nvidia_b200_180gb_sxm","type":"dedicated","owner":"anysphere_2893","state":"STARTED","inactive_timeout":0,"autoscaling":{"min_replicas":176,"max_replicas":176,"current_replicas":176},"created_at":"2025-10-04T03:38:57.054Z"}]}
Copy link

Choose a reason for hiding this comment

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

Bug: Sensitive API Data Leaked in Log File

The log1.txt file contains JSON API response data, including sensitive endpoint details like IDs, hardware configurations, and timestamps. This appears to be debugging or test output accidentally committed to the repository.

Fix in Cursor Fix in Web

13 changes: 11 additions & 2 deletions src/together/cli/api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,22 @@ def delete(client: Together, endpoint_id: str) -> None:
type=click.Choice(["dedicated", "serverless"]),
help="Filter by endpoint type",
)
@click.option(
"--mine",
type=click.BOOL,
default=None,
help="true (only mine), false (exclude mine), default=all",
)
@click.pass_obj
@handle_api_errors
def list(
client: Together, json: bool, type: Literal["dedicated", "serverless"] | None
client: Together,
json: bool,
type: Literal["dedicated", "serverless"] | None,
mine: bool | None,
) -> None:
"""List all inference endpoints (includes both dedicated and serverless endpoints)."""
endpoints: List[ListEndpoint] = client.endpoints.list(type=type)
endpoints: List[ListEndpoint] = client.endpoints.list(type=type, mine=mine)

if not endpoints:
click.echo("No dedicated endpoints found", err=True)
Expand Down
20 changes: 15 additions & 5 deletions src/together/resources/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ def __init__(self, client: TogetherClient) -> None:
self._client = client

def list(
self, type: Optional[Literal["dedicated", "serverless"]] = None
self,
type: Optional[Literal["dedicated", "serverless"]] = None,
mine: Optional[bool] = None,
) -> List[ListEndpoint]:
"""
List all endpoints, can be filtered by type.
List all endpoints, can be filtered by endpoint type and ownership.

Args:
type (str, optional): Filter endpoints by type ("dedicated" or "serverless"). Defaults to None.
type (str, optional): Filter endpoints by endpoint type ("dedicated" or "serverless"). Defaults to None.
mine (bool, optional): If True, return only endpoints owned by the caller. If False, return endpoints not owned by the caller. Defaults to None.

Returns:
List[ListEndpoint]: List of endpoint objects
Expand All @@ -31,6 +34,8 @@ def list(
params = {}
if type is not None:
params["type"] = type
if mine is not None:
params["mine"] = mine

response, _, _ = requestor.request(
options=TogetherRequest(
Expand Down Expand Up @@ -263,13 +268,16 @@ def __init__(self, client: TogetherClient) -> None:
self._client = client

async def list(
self, type: Optional[Literal["dedicated", "serverless"]] = None
self,
type: Optional[Literal["dedicated", "serverless"]] = None,
mine: Optional[bool] = None,
) -> List[ListEndpoint]:
"""
List all endpoints, can be filtered by type.
List all endpoints, can be filtered by type and ownership.

Args:
type (str, optional): Filter endpoints by type ("dedicated" or "serverless"). Defaults to None.
mine (bool, optional): If True, return only endpoints owned by the caller. If False, return endpoints not owned by the caller. Defaults to None.

Returns:
List[ListEndpoint]: List of endpoint objects
Expand All @@ -281,6 +289,8 @@ async def list(
params = {}
if type is not None:
params["type"] = type
if mine is not None:
params["mine"] = mine

response, _, _ = await requestor.arequest(
options=TogetherRequest(
Expand Down
Loading