health

Test Model Connection

Test a direct connection to a specific model.

This endpoint allows you to verify if your proxy can successfully connect to a specific model. It's useful for troubleshooting model connectivity issues without going through the full proxy routing.

Example:

# If model is configured in proxy_config.yaml, you only need to specify the model name:
curl -X POST 'http://localhost:4000/health/test_connection' \
  -H 'Authorization: Bearer sk-1234' \
  -H 'Content-Type: application/json' \
  -d '{
    "litellm_params": {
        "model": "gpt-4o"
    },
    "mode": "chat"
  }'

# The endpoint will automatically use api_key, api_base, etc. from proxy_config.yaml

# You can also override specific params or test with custom credentials:
curl -X POST 'http://localhost:4000/health/test_connection' \
  -H 'Authorization: Bearer sk-1234' \
  -H 'Content-Type: application/json' \
  -d '{
    "litellm_params": {
        "model": "azure/gpt-4o",
        "api_key": "os.environ/AZURE_OPENAI_API_KEY",
        "api_base": "os.environ/AZURE_OPENAI_ENDPOINT",
        "api_version": "2024-10-21"
    },
    "mode": "chat"
  }'

Note:

  • If the model is configured in proxy_config.yaml, credentials (api_key, api_base, etc.) will be automatically loaded from the config (with resolved environment variables).
  • You can override specific params by including them in the request.
  • You can use os.environ/VARIABLE_NAME syntax to reference environment variables, which will be resolved automatically (same as in proxy_config.yaml).

Returns: dict: A dictionary containing the health check result with either success information or error details.

post/health/test_connection

Request

  • Base URL: https://api.vibebrowser.app (the document declares no server; this is the origin it was published from)
  • URL: https://api.vibebrowser.app/health/test_connection
  • Auth: one of:
    • API key in header x-litellm-api-key
    • API key in header x-litellm-api-key
    • API key in header x-litellm-api-key
    • API key in header x-litellm-api-key
    • API key in header x-litellm-api-key
    • API key in header x-litellm-api-key

Request body

mode'chat' | 'completion' | 'embedding' | 'audio_speech' | 'audio_transcription' | 'image_generation' | 'video_generation' | 'batch' | 'rerank' | 'realtime' | 'responses' | 'ocr' nullable

The mode to test the model with

litellm_paramsobject

Parameters for litellm.completion, litellm.embedding for the health check

model_infoobject

Model info for the health check

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.