cyai-client 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cyai_client-0.1.0/MANIFEST.in +8 -0
- cyai_client-0.1.0/PKG-INFO +170 -0
- cyai_client-0.1.0/pyproject.toml +189 -0
- cyai_client-0.1.0/setup.cfg +4 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/PKG-INFO +170 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/SOURCES.txt +38 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/dependency_links.txt +1 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/entry_points.txt +2 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/requires.txt +6 -0
- cyai_client-0.1.0/src/cyai_client.egg-info/top_level.txt +1 -0
- cyai_client-0.1.0/src/cydeai/__init__.py +3 -0
- cyai_client-0.1.0/src/cydeai/checks.py +113 -0
- cyai_client-0.1.0/src/cydeai/cli.py +543 -0
- cyai_client-0.1.0/src/cydeai/config.py +251 -0
- cyai_client-0.1.0/src/cydeai/hardware.py +256 -0
- cyai_client-0.1.0/src/cydeai/logging.py +56 -0
- cyai_client-0.1.0/src/cydeai/models.py +99 -0
- cyai_client-0.1.0/src/cydeai/processes.py +63 -0
- cyai_client-0.1.0/src/cydeai/protocol.py +152 -0
- cyai_client-0.1.0/src/cydeai/streams.py +280 -0
- cyai_client-0.1.0/src/cydeai/tunnel.py +766 -0
- cyai_client-0.1.0/src/cydeai/validation.py +69 -0
- cyai_client-0.1.0/src/cydeai/vllm_health.py +264 -0
- cyai_client-0.1.0/src/cydeai/vllm_proxy.py +74 -0
- cyai_client-0.1.0/src/cydeai/worker_identity.py +35 -0
- cyai_client-0.1.0/tests/test_checks.py +140 -0
- cyai_client-0.1.0/tests/test_cli.py +856 -0
- cyai_client-0.1.0/tests/test_config.py +305 -0
- cyai_client-0.1.0/tests/test_hardware.py +109 -0
- cyai_client-0.1.0/tests/test_hardware_checks.py +178 -0
- cyai_client-0.1.0/tests/test_logging.py +25 -0
- cyai_client-0.1.0/tests/test_packaging.py +41 -0
- cyai_client-0.1.0/tests/test_protocol.py +75 -0
- cyai_client-0.1.0/tests/test_readiness.py +34 -0
- cyai_client-0.1.0/tests/test_streams.py +186 -0
- cyai_client-0.1.0/tests/test_tunnel.py +844 -0
- cyai_client-0.1.0/tests/test_validation.py +74 -0
- cyai_client-0.1.0/tests/test_vllm_health.py +162 -0
- cyai_client-0.1.0/tests/test_vllm_proxy.py +103 -0
- cyai_client-0.1.0/tests/test_worker_identity.py +25 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cyai-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI client for Cysic decentralized AI providers
|
|
5
|
+
Author: Cysic-Curry
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Keywords: cysic,cyai,vllm,gpu,cli
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: System :: Hardware
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: websockets>=12
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
22
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
23
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
24
|
+
|
|
25
|
+
# cyai-client Wheel Release Usage Notes
|
|
26
|
+
|
|
27
|
+
Version `0.1.0` starts the `cyai-client` distribution.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python3 -m venv ~/cyai-client-env
|
|
33
|
+
. ~/cyai-client-env/bin/activate
|
|
34
|
+
python -m pip install -U pip
|
|
35
|
+
python -m pip install cyai-client==0.1.0
|
|
36
|
+
cyai --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configure
|
|
40
|
+
|
|
41
|
+
Create `~/.cyai/config.json`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
mkdir -p ~/.cyai
|
|
45
|
+
cat > ~/.cyai/config.json <<EOF
|
|
46
|
+
{
|
|
47
|
+
"server_url": "https://<server-host>/<base-path>",
|
|
48
|
+
"api_key": "<provider_api_key>",
|
|
49
|
+
"worker_name": "<worker-display-name>",
|
|
50
|
+
"model_name": "<served-model-name-from-vllm>",
|
|
51
|
+
"model_port": 8000,
|
|
52
|
+
"vllm_health_interval_sec": 30,
|
|
53
|
+
"vllm_health_timeout_sec": 5,
|
|
54
|
+
"vllm_health_failure_threshold": 2,
|
|
55
|
+
"debug": false
|
|
56
|
+
}
|
|
57
|
+
EOF
|
|
58
|
+
chmod 600 ~/.cyai/config.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The client reads values in this order:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
CLI args > environment variables > config file > defaults
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Check Local vLLM
|
|
68
|
+
|
|
69
|
+
`cyai check` sends a tiny OpenAI-compatible chat request to the local model
|
|
70
|
+
server. It does not inspect GPU utilization or require `nvidia-smi`.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cyai check
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expected success:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
[INFO][2026-07-09 10:00:00] vLLM normal
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If it fails, confirm that vLLM is running and that `model_name` matches the
|
|
83
|
+
served model name from:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
curl -sS http://127.0.0.1:8000/v1/models | python3 -m json.tool
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Dry Run
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
cyai connect --dry-run
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Dry run prints the derived WebSocket URL, masked `PROVIDER_SIGN` header,
|
|
96
|
+
register payload, and local vLLM check result. It does not connect to the
|
|
97
|
+
server and does not print the raw API key.
|
|
98
|
+
|
|
99
|
+
## One-Shot Register Test
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cyai connect --exit-after-register
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This validates WebSocket handshake and `register_ok`, then exits.
|
|
106
|
+
|
|
107
|
+
## Start Worker
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cyai connect
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Keep this process running. Logs are printed to the terminal and appended to:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
~/.cyai/cyai.log
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Output format:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
[INFO][2026-07-09 10:00:00] connect attempt 1: wss://...
|
|
123
|
+
[INFO][2026-07-09 10:00:00] registered: attempt=1 worker_id=w-... status=available
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
After registration, the client checks local `GET /v1/models` every 30 seconds
|
|
127
|
+
by default. After two consecutive failures, it closes the current gateway
|
|
128
|
+
connection, keeps the process alive, and reconnects after vLLM recovers.
|
|
129
|
+
Failures include host, port, URL, request body, response body, status code,
|
|
130
|
+
response time, and reason in the log.
|
|
131
|
+
|
|
132
|
+
## Migrate From cydeai-client
|
|
133
|
+
|
|
134
|
+
The old and new distributions share the internal `cydeai` Python namespace.
|
|
135
|
+
Remove the old package before installing this release:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
python -m pip uninstall cydeai-client
|
|
139
|
+
python -m pip install cyai-client==0.1.0
|
|
140
|
+
cyai --help
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
When `~/.cyai/config.json` is absent, the client can temporarily read the old
|
|
144
|
+
`~/.cydeai/config.json` and `CYDEAI_*` environment variables and emits a
|
|
145
|
+
migration warning.
|
|
146
|
+
|
|
147
|
+
## Debug Server Errors
|
|
148
|
+
|
|
149
|
+
Normal mode logs only stable error categories such as `http_403` or
|
|
150
|
+
`websocket_closed_1008`. To include the error description returned by the
|
|
151
|
+
server, run:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
cyai connect --debug
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Debug mode can also be enabled with `"debug": true` in the config file or
|
|
158
|
+
`CYAI_DEBUG=true`. Server details are normalized to one line, truncated, and
|
|
159
|
+
the active provider API key is masked before logging.
|
|
160
|
+
|
|
161
|
+
## Release Notes Checklist
|
|
162
|
+
|
|
163
|
+
- package name: `cyai-client`
|
|
164
|
+
- CLI command: `cyai`
|
|
165
|
+
- version: `0.1.0`
|
|
166
|
+
- install command: `python -m pip install cyai-client==0.1.0`
|
|
167
|
+
- required Python version: Python 3.11+
|
|
168
|
+
- vLLM must already be running locally
|
|
169
|
+
- config path: `~/.cyai/config.json`
|
|
170
|
+
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cyai-client"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "CLI client for Cysic decentralized AI providers"
|
|
9
|
+
readme = { text = '''
|
|
10
|
+
# cyai-client Wheel Release Usage Notes
|
|
11
|
+
|
|
12
|
+
Version `0.1.0` starts the `cyai-client` distribution.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
python3 -m venv ~/cyai-client-env
|
|
18
|
+
. ~/cyai-client-env/bin/activate
|
|
19
|
+
python -m pip install -U pip
|
|
20
|
+
python -m pip install cyai-client==0.1.0
|
|
21
|
+
cyai --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Configure
|
|
25
|
+
|
|
26
|
+
Create `~/.cyai/config.json`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
mkdir -p ~/.cyai
|
|
30
|
+
cat > ~/.cyai/config.json <<EOF
|
|
31
|
+
{
|
|
32
|
+
"server_url": "https://<server-host>/<base-path>",
|
|
33
|
+
"api_key": "<provider_api_key>",
|
|
34
|
+
"worker_name": "<worker-display-name>",
|
|
35
|
+
"model_name": "<served-model-name-from-vllm>",
|
|
36
|
+
"model_port": 8000,
|
|
37
|
+
"vllm_health_interval_sec": 30,
|
|
38
|
+
"vllm_health_timeout_sec": 5,
|
|
39
|
+
"vllm_health_failure_threshold": 2,
|
|
40
|
+
"debug": false
|
|
41
|
+
}
|
|
42
|
+
EOF
|
|
43
|
+
chmod 600 ~/.cyai/config.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The client reads values in this order:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
CLI args > environment variables > config file > defaults
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Check Local vLLM
|
|
53
|
+
|
|
54
|
+
`cyai check` sends a tiny OpenAI-compatible chat request to the local model
|
|
55
|
+
server. It does not inspect GPU utilization or require `nvidia-smi`.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cyai check
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Expected success:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
[INFO][2026-07-09 10:00:00] vLLM normal
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If it fails, confirm that vLLM is running and that `model_name` matches the
|
|
68
|
+
served model name from:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
curl -sS http://127.0.0.1:8000/v1/models | python3 -m json.tool
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Dry Run
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cyai connect --dry-run
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Dry run prints the derived WebSocket URL, masked `PROVIDER_SIGN` header,
|
|
81
|
+
register payload, and local vLLM check result. It does not connect to the
|
|
82
|
+
server and does not print the raw API key.
|
|
83
|
+
|
|
84
|
+
## One-Shot Register Test
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
cyai connect --exit-after-register
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This validates WebSocket handshake and `register_ok`, then exits.
|
|
91
|
+
|
|
92
|
+
## Start Worker
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
cyai connect
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Keep this process running. Logs are printed to the terminal and appended to:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
~/.cyai/cyai.log
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Output format:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
[INFO][2026-07-09 10:00:00] connect attempt 1: wss://...
|
|
108
|
+
[INFO][2026-07-09 10:00:00] registered: attempt=1 worker_id=w-... status=available
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
After registration, the client checks local `GET /v1/models` every 30 seconds
|
|
112
|
+
by default. After two consecutive failures, it closes the current gateway
|
|
113
|
+
connection, keeps the process alive, and reconnects after vLLM recovers.
|
|
114
|
+
Failures include host, port, URL, request body, response body, status code,
|
|
115
|
+
response time, and reason in the log.
|
|
116
|
+
|
|
117
|
+
## Migrate From cydeai-client
|
|
118
|
+
|
|
119
|
+
The old and new distributions share the internal `cydeai` Python namespace.
|
|
120
|
+
Remove the old package before installing this release:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
python -m pip uninstall cydeai-client
|
|
124
|
+
python -m pip install cyai-client==0.1.0
|
|
125
|
+
cyai --help
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
When `~/.cyai/config.json` is absent, the client can temporarily read the old
|
|
129
|
+
`~/.cydeai/config.json` and `CYDEAI_*` environment variables and emits a
|
|
130
|
+
migration warning.
|
|
131
|
+
|
|
132
|
+
## Debug Server Errors
|
|
133
|
+
|
|
134
|
+
Normal mode logs only stable error categories such as `http_403` or
|
|
135
|
+
`websocket_closed_1008`. To include the error description returned by the
|
|
136
|
+
server, run:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cyai connect --debug
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Debug mode can also be enabled with `"debug": true` in the config file or
|
|
143
|
+
`CYAI_DEBUG=true`. Server details are normalized to one line, truncated, and
|
|
144
|
+
the active provider API key is masked before logging.
|
|
145
|
+
|
|
146
|
+
## Release Notes Checklist
|
|
147
|
+
|
|
148
|
+
- package name: `cyai-client`
|
|
149
|
+
- CLI command: `cyai`
|
|
150
|
+
- version: `0.1.0`
|
|
151
|
+
- install command: `python -m pip install cyai-client==0.1.0`
|
|
152
|
+
- required Python version: Python 3.11+
|
|
153
|
+
- vLLM must already be running locally
|
|
154
|
+
- config path: `~/.cyai/config.json`
|
|
155
|
+
|
|
156
|
+
''', content-type = "text/markdown" }
|
|
157
|
+
requires-python = ">=3.11"
|
|
158
|
+
authors = [
|
|
159
|
+
{ name = "Cysic-Curry" },
|
|
160
|
+
]
|
|
161
|
+
license = "LicenseRef-Proprietary"
|
|
162
|
+
keywords = ["cysic", "cyai", "vllm", "gpu", "cli"]
|
|
163
|
+
classifiers = [
|
|
164
|
+
"Development Status :: 3 - Alpha",
|
|
165
|
+
"Environment :: Console",
|
|
166
|
+
"Intended Audience :: Developers",
|
|
167
|
+
"Programming Language :: Python :: 3",
|
|
168
|
+
"Programming Language :: Python :: 3.11",
|
|
169
|
+
"Programming Language :: Python :: 3.12",
|
|
170
|
+
"Programming Language :: Python :: 3.13",
|
|
171
|
+
"Topic :: System :: Hardware",
|
|
172
|
+
"Topic :: Utilities",
|
|
173
|
+
]
|
|
174
|
+
dependencies = [
|
|
175
|
+
"websockets>=12",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[project.optional-dependencies]
|
|
179
|
+
dev = [
|
|
180
|
+
"build>=1.2",
|
|
181
|
+
"pytest>=8",
|
|
182
|
+
"twine>=5",
|
|
183
|
+
]
|
|
184
|
+
|
|
185
|
+
[project.scripts]
|
|
186
|
+
cyai = "cydeai.cli:main"
|
|
187
|
+
|
|
188
|
+
[tool.setuptools.packages.find]
|
|
189
|
+
where = ["src"]
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cyai-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI client for Cysic decentralized AI providers
|
|
5
|
+
Author: Cysic-Curry
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Keywords: cysic,cyai,vllm,gpu,cli
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: System :: Hardware
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: websockets>=12
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
22
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
23
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
24
|
+
|
|
25
|
+
# cyai-client Wheel Release Usage Notes
|
|
26
|
+
|
|
27
|
+
Version `0.1.0` starts the `cyai-client` distribution.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python3 -m venv ~/cyai-client-env
|
|
33
|
+
. ~/cyai-client-env/bin/activate
|
|
34
|
+
python -m pip install -U pip
|
|
35
|
+
python -m pip install cyai-client==0.1.0
|
|
36
|
+
cyai --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configure
|
|
40
|
+
|
|
41
|
+
Create `~/.cyai/config.json`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
mkdir -p ~/.cyai
|
|
45
|
+
cat > ~/.cyai/config.json <<EOF
|
|
46
|
+
{
|
|
47
|
+
"server_url": "https://<server-host>/<base-path>",
|
|
48
|
+
"api_key": "<provider_api_key>",
|
|
49
|
+
"worker_name": "<worker-display-name>",
|
|
50
|
+
"model_name": "<served-model-name-from-vllm>",
|
|
51
|
+
"model_port": 8000,
|
|
52
|
+
"vllm_health_interval_sec": 30,
|
|
53
|
+
"vllm_health_timeout_sec": 5,
|
|
54
|
+
"vllm_health_failure_threshold": 2,
|
|
55
|
+
"debug": false
|
|
56
|
+
}
|
|
57
|
+
EOF
|
|
58
|
+
chmod 600 ~/.cyai/config.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The client reads values in this order:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
CLI args > environment variables > config file > defaults
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Check Local vLLM
|
|
68
|
+
|
|
69
|
+
`cyai check` sends a tiny OpenAI-compatible chat request to the local model
|
|
70
|
+
server. It does not inspect GPU utilization or require `nvidia-smi`.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cyai check
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expected success:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
[INFO][2026-07-09 10:00:00] vLLM normal
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If it fails, confirm that vLLM is running and that `model_name` matches the
|
|
83
|
+
served model name from:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
curl -sS http://127.0.0.1:8000/v1/models | python3 -m json.tool
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Dry Run
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
cyai connect --dry-run
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Dry run prints the derived WebSocket URL, masked `PROVIDER_SIGN` header,
|
|
96
|
+
register payload, and local vLLM check result. It does not connect to the
|
|
97
|
+
server and does not print the raw API key.
|
|
98
|
+
|
|
99
|
+
## One-Shot Register Test
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cyai connect --exit-after-register
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This validates WebSocket handshake and `register_ok`, then exits.
|
|
106
|
+
|
|
107
|
+
## Start Worker
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cyai connect
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Keep this process running. Logs are printed to the terminal and appended to:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
~/.cyai/cyai.log
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Output format:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
[INFO][2026-07-09 10:00:00] connect attempt 1: wss://...
|
|
123
|
+
[INFO][2026-07-09 10:00:00] registered: attempt=1 worker_id=w-... status=available
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
After registration, the client checks local `GET /v1/models` every 30 seconds
|
|
127
|
+
by default. After two consecutive failures, it closes the current gateway
|
|
128
|
+
connection, keeps the process alive, and reconnects after vLLM recovers.
|
|
129
|
+
Failures include host, port, URL, request body, response body, status code,
|
|
130
|
+
response time, and reason in the log.
|
|
131
|
+
|
|
132
|
+
## Migrate From cydeai-client
|
|
133
|
+
|
|
134
|
+
The old and new distributions share the internal `cydeai` Python namespace.
|
|
135
|
+
Remove the old package before installing this release:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
python -m pip uninstall cydeai-client
|
|
139
|
+
python -m pip install cyai-client==0.1.0
|
|
140
|
+
cyai --help
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
When `~/.cyai/config.json` is absent, the client can temporarily read the old
|
|
144
|
+
`~/.cydeai/config.json` and `CYDEAI_*` environment variables and emits a
|
|
145
|
+
migration warning.
|
|
146
|
+
|
|
147
|
+
## Debug Server Errors
|
|
148
|
+
|
|
149
|
+
Normal mode logs only stable error categories such as `http_403` or
|
|
150
|
+
`websocket_closed_1008`. To include the error description returned by the
|
|
151
|
+
server, run:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
cyai connect --debug
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Debug mode can also be enabled with `"debug": true` in the config file or
|
|
158
|
+
`CYAI_DEBUG=true`. Server details are normalized to one line, truncated, and
|
|
159
|
+
the active provider API key is masked before logging.
|
|
160
|
+
|
|
161
|
+
## Release Notes Checklist
|
|
162
|
+
|
|
163
|
+
- package name: `cyai-client`
|
|
164
|
+
- CLI command: `cyai`
|
|
165
|
+
- version: `0.1.0`
|
|
166
|
+
- install command: `python -m pip install cyai-client==0.1.0`
|
|
167
|
+
- required Python version: Python 3.11+
|
|
168
|
+
- vLLM must already be running locally
|
|
169
|
+
- config path: `~/.cyai/config.json`
|
|
170
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/cyai_client.egg-info/PKG-INFO
|
|
4
|
+
src/cyai_client.egg-info/SOURCES.txt
|
|
5
|
+
src/cyai_client.egg-info/dependency_links.txt
|
|
6
|
+
src/cyai_client.egg-info/entry_points.txt
|
|
7
|
+
src/cyai_client.egg-info/requires.txt
|
|
8
|
+
src/cyai_client.egg-info/top_level.txt
|
|
9
|
+
src/cydeai/__init__.py
|
|
10
|
+
src/cydeai/checks.py
|
|
11
|
+
src/cydeai/cli.py
|
|
12
|
+
src/cydeai/config.py
|
|
13
|
+
src/cydeai/hardware.py
|
|
14
|
+
src/cydeai/logging.py
|
|
15
|
+
src/cydeai/models.py
|
|
16
|
+
src/cydeai/processes.py
|
|
17
|
+
src/cydeai/protocol.py
|
|
18
|
+
src/cydeai/streams.py
|
|
19
|
+
src/cydeai/tunnel.py
|
|
20
|
+
src/cydeai/validation.py
|
|
21
|
+
src/cydeai/vllm_health.py
|
|
22
|
+
src/cydeai/vllm_proxy.py
|
|
23
|
+
src/cydeai/worker_identity.py
|
|
24
|
+
tests/test_checks.py
|
|
25
|
+
tests/test_cli.py
|
|
26
|
+
tests/test_config.py
|
|
27
|
+
tests/test_hardware.py
|
|
28
|
+
tests/test_hardware_checks.py
|
|
29
|
+
tests/test_logging.py
|
|
30
|
+
tests/test_packaging.py
|
|
31
|
+
tests/test_protocol.py
|
|
32
|
+
tests/test_readiness.py
|
|
33
|
+
tests/test_streams.py
|
|
34
|
+
tests/test_tunnel.py
|
|
35
|
+
tests/test_validation.py
|
|
36
|
+
tests/test_vllm_health.py
|
|
37
|
+
tests/test_vllm_proxy.py
|
|
38
|
+
tests/test_worker_identity.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cydeai
|