Skip to main content

cyai-client Wheel Release Usage Notes

Version 0.1.1 disconnects banned workers when the server sends business code 2002 and stops automatic reconnect for that worker.

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.1
cyai --help

Configure

Create ~/.cyai/config.json:

mkdir -p ~/.cyai
cat > ~/.cyai/config.json <<EOF
{
  "server_url": "https://<server-host>/<base-path>",
  "api_key": "<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

The client reads values in this order:

CLI args > environment variables > config file > defaults

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.1
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.1
  • install command: python -m pip install cyai-client==0.1.1
  • required Python version: Python 3.11+
  • vLLM must already be running locally
  • config path: ~/.cyai/config.json

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyai_client-0.1.1.tar.gz (45.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyai_client-0.1.1-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file cyai_client-0.1.1.tar.gz.

File metadata

  • Download URL: cyai_client-0.1.1.tar.gz
  • Upload date:
  • Size: 45.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for cyai_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0b7884e056b3522f95d4d863cfc37f8039787829bf5378c4955361e1c4eee8d6
MD5 62f4684ad2e2d9749f707fabf9cbbae8
BLAKE2b-256 3440741d8a343540242898ecb228e3f803431774178c7b220af2677de1938fd5

See more details on using hashes here.

File details

Details for the file cyai_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cyai_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for cyai_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05bb13012e61bf68b6bf818ec13393b10a1a26939b88f5e40fbbb6a132794e8e
MD5 feb5bceecfaf82ad568b04f34f24c2ef
BLAKE2b-256 5956f080a00339696e12063cfd7551ba79de8f4f0e3fc2d391a78c505a3e759a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page