{"record":{"id":"1136162adf7d98bb","repo":"BerriAI/litellm","slug":"advisor-tool-definition-sets-api-base-api-base","errorCode":null,"errorMessage":"advisor tool definition sets 'api_base'={api_base!r}, which must use the https scheme.","messagePattern":"advisor tool definition sets 'api_base'=(.+?), which must use the https scheme\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/experimental_pass_through/messages/interceptors/advisor.py","lineNumber":221,"sourceCode":"    and relies on certificate validation to block DNS rebinding, so this\n    closes the same gap without threading the pinned URL through the whole\n    ``anthropic_messages()`` call chain.\n    \"\"\"\n    if not _allow_client_side_advisor_credentials():\n        return None, None\n    api_key: Final[str | None] = advisor_tool.get(\"api_key\")\n    api_base: Final[str | None] = advisor_tool.get(\"api_base\")\n    if api_base is None:\n        return api_key, None\n    if not api_key:\n        raise ValueError(\n            \"advisor tool definition sets 'api_base' without 'api_key'. A \"\n            \"caller-supplied api_base is only honored alongside a \"\n            \"caller-supplied api_key, so the proxy's own credentials are \"\n            \"never sent to a caller-chosen destination.\"\n        )\n    if not api_base.startswith(\"https://\"):\n        raise ValueError(f\"advisor tool definition sets 'api_base'={api_base!r}, which must use the https scheme.\")\n    if getattr(litellm, \"ssl_verify\", True) is False:\n        raise ValueError(\n            \"advisor tool definition sets 'api_base' but the proxy has TLS verification \"\n            \"disabled (litellm.ssl_verify=False), so a caller-supplied api_base can't be \"\n            \"safely validated against DNS rebinding.\"\n        )\n    if getattr(litellm, \"user_url_validation\", True):\n        validate_url(api_base)\n    return api_key, api_base\n\n\ndef _make_synthetic_advisor_tool() -> dict:\n    \"\"\"Build a regular tool definition the executor provider can understand.\"\"\"\n    return {\n        \"name\": \"advisor\",\n        \"description\": ADVISOR_TOOL_DESCRIPTION,\n        \"input_schema\": {\n            \"type\": \"object\",","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/experimental_pass_through/messages/interceptors/advisor.py#L203-L239","documentation":"Error \"advisor tool definition sets 'api_base'={api_base!r}, which must use the https scheme.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/experimental_pass_through/messages/interceptors/advisor.py:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the advisor tool 'api_base' to an https:// URL."],"exampleFix":null,"handlingStrategy":null,"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-23T08:17:48.524Z"}