{"record":{"id":"35e7103eae75da2b","repo":"BerriAI/litellm","slug":"invalid-test-value","errorCode":null,"errorMessage":"Invalid test value","messagePattern":"Invalid test value","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/proxy_cli.py","lineNumber":208,"sourceCode":"        response: Final = httpx.get(url=f\"http://{host}:{port}/health\")\n        print(json.dumps(response.json(), indent=4))\n\n    @staticmethod\n    def _run_test_chat_completion(\n        host: str,\n        port: int,\n        model: str,\n        test: bool | str,\n    ):\n        request_model: Final = model or \"gpt-3.5-turbo\"\n        click.echo(f\"\\nLiteLLM: Making a test ChatCompletions request to your proxy. Model={request_model}\")\n        import openai\n\n        api_base = f\"http://{host}:{port}\"\n        if isinstance(test, str):\n            api_base = test\n        else:\n            raise ValueError(\"Invalid test value\")\n        client: Final = openai.OpenAI(api_key=\"My API Key\", base_url=api_base)\n\n        response: Final = client.chat.completions.create(\n            model=request_model,\n            messages=[\n                {\n                    \"role\": \"user\",\n                    \"content\": \"this is a test request, write a short poem\",\n                }\n            ],\n            max_tokens=256,\n        )\n        click.echo(f\"\\nLiteLLM: response from proxy {response}\")\n\n        print(f\"\\n LiteLLM: Making a test ChatCompletions + streaming r equest to proxy. Model={request_model}\")\n\n        stream_response: Final = client.chat.completions.create(\n            model=request_model,","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/proxy_cli.py#L190-L226","documentation":"CLI guard in _run_test_chat_completion: the --test flag was given a value that is neither a boolean nor a usable string URL (neither True/False nor a string override for api_base), so the test client cannot determine where to send the request; raised as ValueError.","triggerScenarios":"Thrown at litellm/proxy/proxy_cli.py:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid value for the CLI test flag; check --help for accepted values."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}