refactor(cli): update API endpoints to v1 versioning and add dynamic port configuration to mock server
- Update mock-cli-server.py to use dynamic port allocation (8020-8050 range) - Add socket-based port availability checking - Generate dynamic config file at cli-dev/cli-staging-config-dynamic.yaml - Remove docstring header and shebang - Update endpoint paths: /v1/marketplace/gpus → /v1/marketplace/gpu/list, /v1/agent/workflows → /v1/agents/workflows - Standardize all CLI command API
This commit is contained in:
@@ -66,7 +66,7 @@ def api(ctx, endpoint, method, data):
|
||||
import httpx
|
||||
|
||||
# Prepare request
|
||||
url = f"{config.coordinator_url.rstrip('/')}/api/v1/{endpoint.lstrip('/')}"
|
||||
url = f"{config.coordinator_url.rstrip('/')}/{endpoint.lstrip('/')}"
|
||||
headers = {}
|
||||
if config.api_key:
|
||||
headers['Authorization'] = f"Bearer {config.api_key}"
|
||||
|
||||
Reference in New Issue
Block a user