ProxAICheck Health

Check Health

There is easy way of checking the health of your ProxAI connections.

import proxai as px
 
px.check_health()

You can also run the command from the command line:

$ python3 -c 'import proxai as px; px.check_health()'

This command tries to make queries to all the providers and models in parallel and checks if there are any issues with the connections. After running the command, you check the results from:

  • Console output:
From cache;
  0 models are working.
  0 models are failed.
Running test for 70 models.
Testing (mistral, open-mixtral-8x7b)...
Testing (openai, chatgpt-4o-latest)...
Testing (openai, gpt-4.1-mini)...
...
After test;
  66 models are working.
  4 models are failed.
Test duration: 36.304316 seconds.
> Finished testing.
   Registered Providers: 9
   Succeeded Models: 66
   Failed Models: 4
> claude:
   [ WORKING |   0.65s ]: 3-haiku
   [ WORKING |   1.34s ]: 3-sonnet
   [ WORKING |   0.98s ]: 3.5-sonnet
   ...
> cohere:
   [ WORKING |  23.35s ]: command
   [ WORKING |   0.37s ]: command-a
   [ WORKING |   0.43s ]: command-light
   ...
...

Parameters

OptionTypeDefault ValueDescription
experiment_pathOptional[str]NonePath to the experiment directory. If not provided, check health creates default directory in connection_health/YYYY-MM-DD_HH-MM-SS format with current date and time.
verboseboolTrueIf True, the command will print the details of the health check to the console.
allow_multiprocessingboolTrueIf True, the command will use multiprocessing to check the health of the connections.
model_test_timeoutint25Timeout for the model test in seconds. If the model test takes longer than this, it will be killed and marked as failed.
extensive_returnboolFalseIf True, the command will return detailed px.types.ModelStatus object with the check_health results.