Skip to main content

cyai-client Wheel Release Usage Notes

Version 0.1.3 enables automatic system and environment proxy discovery for provider WebSocket connections by requiring websockets>=15.

Install

python3 -m venv ~/cyai-client-env
. ~/cyai-client-env/bin/activate
python -m pip install -U pip
python -m pip install cyai-client==0.1.3
cyai --help

Configure

Create ~/.cyai/config.json:

mkdir -p ~/.cyai
cat > ~/.cyai/config.json <<EOF
{
  "server_url": "https://api.cysic.xyz/cysicdai",
  "api_key": "<new_production_provider_api_key>",
  "worker_name": "<worker-display-name>",
  "model_name": "<served-model-name-from-vllm>",
  "model_port": 8000,
  "vllm_health_interval_sec": 30,
  "vllm_health_timeout_sec": 5,
  "vllm_health_failure_threshold": 2,
  "debug": false
}
EOF
chmod 600 ~/.cyai/config.json

Use a new production provider API key issued for api.cysic.xyz. Keys from the previous test environment aren't valid on the production endpoint.

The client reads values in this order:

CLI args > environment variables > config file > defaults

WebSocket Proxy

The client requires websockets>=15 and enables automatic proxy discovery. For the secure wss:// provider connection, configure WSS_PROXY or HTTPS_PROXY; NO_PROXY is respected:

WSS_PROXY=http://proxy.example:7890 cyai connect

When cyai runs as a systemd service, set the variable in the service environment or its environment file. Variables exported in an interactive terminal aren't inherited by systemd services.

Check Local vLLM

cyai check sends a tiny OpenAI-compatible chat request to the local model server. It does not inspect GPU utilization or require nvidia-smi.

cyai check

Expected success:

[INFO][2026-07-09 10:00:00] vLLM normal

If it fails, confirm that vLLM is running and that model_name matches the served model name from:

curl -sS http://127.0.0.1:8000/v1/models | python3 -m json.tool

Dry Run

cyai connect --dry-run

Dry run prints the derived WebSocket URL, masked PROVIDER_SIGN header, register payload, and local vLLM check result. It does not connect to the server and does not print the raw API key.

One-Shot Register Test

cyai connect --exit-after-register

This validates WebSocket handshake and register_ok, then exits.

Start Worker

cyai connect

Keep this process running. Logs are printed to the terminal and appended to:

~/.cyai/cyai.log

Output format:

[INFO][2026-07-09 10:00:00] connect attempt 1: wss://...
[INFO][2026-07-09 10:00:00] registered: attempt=1 worker_id=w-... status=available

After registration, the client checks local GET /v1/models every 30 seconds by default. After two consecutive failures, it closes the current gateway connection, keeps the process alive, and reconnects after vLLM recovers. Failures include host, port, URL, request body, response body, status code, response time, and reason in the log.

Migrate From cydeai-client

The old and new distributions share the internal cydeai Python namespace. Remove the old package before installing this release:

python -m pip uninstall cydeai-client
python -m pip install cyai-client==0.1.3
cyai --help

When ~/.cyai/config.json is absent, the client can temporarily read the old ~/.cydeai/config.json and CYDEAI_* environment variables and emits a migration warning.

Debug Server Errors

Normal mode logs only stable error categories such as http_403 or websocket_closed_1008. To include the error description returned by the server, run:

cyai connect --debug

Debug mode can also be enabled with "debug": true in the config file or CYAI_DEBUG=true. Server details are normalized to one line, truncated, and the active provider API key is masked before logging.

Release Notes Checklist

  • package name: cyai-client
  • CLI command: cyai
  • version: 0.1.3
  • install command: python -m pip install cyai-client==0.1.3
  • required Python version: Python 3.11+
  • vLLM must already be running locally
  • config path: ~/.cyai/config.json

Metadata

Release files for cyai-client 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyai-client 0.1.3
File Size Uploaded
cyai_client-0.1.3.tar.gz 46.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cyai-client 0.1.3
File Interpreter ABI Platform
cyai_client-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 79.8 kB

Release files / cyai_client-0.1.3.tar.gz

Download URL cyai_client-0.1.3.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae3f826a86982da91529c403171ce56ad27c73b5f20678e91d801de8d5683812
BLAKE2b-256 checksum
How to use checksums
0ce32d0f4b32f5e31a91db7ced4aa33aa4cf0f456f9c4ccd6f31d7e88a7a82dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / cyai_client-0.1.3-py3-none-any.whl

Download URL cyai_client-0.1.3-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3268855fd29ee62fb725a6a767252ba5b09ee4b6b969472fabdb7f12a6cf0c3c
BLAKE2b-256 checksum
How to use checksums
5f2693e983023a001bf544802ada0ab4e6a658f6d2e7365262bb68b5b26ca3a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page