CLI Troubleshooting
This guide provides solutions for common issues encountered when using the PaiTIENT Secure Model CLI.
Common Issues and Solutions
Authentication Issues
Issue: API Key Not Recognized
Error: Invalid API key provided. Please check your API key and try again.Solutions:
- Verify that your API key is correct and active in the PaiTIENT dashboard
- Check that you're using the correct environment variables:bash
echo $PAITIENT_API_KEY - Try logging in again:bash
secure-model login
Issue: Client ID Not Found
Error: Client ID not found. Please check your client ID and try again.Solutions:
- Verify your client ID in the PaiTIENT dashboard
- Ensure the environment variable is set correctly:bash
echo $PAITIENT_CLIENT_ID
Connection Issues
Issue: Cannot Connect to API
Error: Could not connect to PaiTIENT API. Connection timed out.Solutions:
- Check your internet connection
- Verify that the API endpoint is correct:bash
echo $PAITIENT_ENDPOINT - If you're behind a corporate firewall, configure proxy settings:bash
export HTTP_PROXY="http://proxy.example.com:8080" export HTTPS_PROXY="http://proxy.example.com:8080"
Issue: SSL Certificate Errors
Error: SSL certificate verification failed.Solutions:
- Update your CA certificates:bash
# Debian/Ubuntu sudo apt-get update && sudo apt-get install ca-certificates # macOS brew upgrade openssl - As a temporary workaround (not recommended for production), disable SSL verification:bash
export PAITIENT_VERIFY_SSL=false
Deployment Issues
Issue: Deployment Stuck in Pending State
Status: pending - Initializing secure model deploymentSolutions:
- Check deployment status for detailed information:bash
secure-model status --deployment-id dep_12345abcde --verbose - Look for errors in the logs:bash
secure-model logs --deployment-id dep_12345abcde - If the deployment has been pending for more than 15 minutes, try canceling and redeploying:bash
secure-model cancel deployment --deployment-id dep_12345abcde secure-model deploy model --name ZimaBlueAI/HuatuoGPT-o1-8B
Issue: Deployment Failed
Status: failed - Error downloading modelSolutions:
- Check detailed logs for the specific error:bash
secure-model logs --deployment-id dep_12345abcde - Verify that the model name is correct:bash
secure-model list models | grep HuatuoGPT - Check account quotas in the PaiTIENT dashboard to ensure you have capacity for the deployment
Generation Issues
Issue: Timeout During Text Generation
Error: Request timed out after 30 seconds.Solutions:
- Increase the timeout for the request:bash
secure-model generate --deployment-id dep_12345abcde --prompt "..." --timeout 60 - For long-running generations, use streaming mode:bash
secure-model generate --deployment-id dep_12345abcde --prompt "..." --stream - Reduce the
max_tokensparameter:bashsecure-model generate --deployment-id dep_12345abcde --prompt "..." --max-tokens 300
Issue: Rate Limit Exceeded
Error: Rate limit exceeded. Please try again later.Solutions:
- Implement exponential backoff in your scripts:bash
#!/bin/bash BACKOFF=1 MAX_RETRIES=5 RETRY=0 while [ $RETRY -lt $MAX_RETRIES ]; do secure-model generate --deployment-id dep_12345abcde --prompt "..." if [ $? -eq 0 ]; then # Success break fi # Calculate backoff with jitter JITTER=$(awk -v min=0 -v max=1 'BEGIN{srand(); print min+rand()*(max-min)}') SLEEP_TIME=$(echo "$BACKOFF + $JITTER" | bc) echo "Rate limit exceeded. Retrying in $SLEEP_TIME seconds..." sleep $SLEEP_TIME # Exponential backoff BACKOFF=$(echo "$BACKOFF * 2" | bc) RETRY=$((RETRY+1)) done - Contact support to request a rate limit increase
CLI Installation Issues
Issue: CLI Not Found After Installation
command not found: secure-modelSolutions:
- Verify the installation:bash
which secure-model - Ensure the installation directory is in your PATH:bash
echo $PATH - If installed via npm, verify global installation:bash
npm list -g paitient-secure-model
Issue: Permission Denied
Error: EACCES: permission deniedSolutions:
- For npm installations, use proper permissions:bash
sudo npm install -g paitient-secure-model - For manual installations, check file permissions:bash
chmod +x /path/to/secure-model
Version and Update Issues
Issue: CLI Version Mismatch
Warning: Your CLI version (1.0.0) is outdated. Latest version is 1.2.0.Solutions:
- Update the CLI:bash
npm update -g paitient-secure-model - Force update when prompted:bash
secure-model update
Issue: Incompatible API Version
Error: This CLI version is not compatible with the current API version.Solutions:
- Update to the latest CLI version:bash
npm install -g paitient-secure-model@latest - If you need to use a specific API version:bash
secure-model configure --api-version 2023-11-01
Debugging Tools
CLI Verbose Mode
Enable verbose output for detailed debugging information:
bash
secure-model deploy model --name ZimaBlueAI/HuatuoGPT-o1-8B --verboseCollecting Diagnostic Information
Generate a diagnostic report for support:
bash
secure-model diagnostics > diagnostics.logThis collects system information, CLI configuration, and recent logs while redacting sensitive information.
HTTP Logging
Enable HTTP logging to see API requests and responses:
bash
export PAITIENT_HTTP_LOGGING=true
secure-model list deploymentsNetwork Diagnostics
Test connectivity to the PaiTIENT API:
bash
secure-model diagnostics networkGetting Help
CLI Help Command
View help for specific commands:
bash
secure-model help deploySupport Channels
- Documentation: Visit docs.paitient.ai
- Support Portal: Submit a ticket at support.paitient.ai
- Community Forum: Join discussions at community.paitient.ai
Feature Requests and Bug Reports
Submit feature requests and bug reports on our GitHub repository: github.com/paitient-ai/secure-model-cli
Next Steps
- Learn about CLI Commands
- Explore CLI Examples
- Understand CLI Configuration
- Review Authentication