BerriAI/litellm · error · ValueError
Manus API key is required. Set MANUS_API_KEY environment var
Error message
Manus API key is required. Set MANUS_API_KEY environment variable or pass api_key parameter.
What it means
Error "Manus API key is required. Set MANUS_API_KEY environment variable or pass api_key parameter." thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/manus/responses/transformation.py:88
Returns:
str: The agent profile (e.g., "manus-1.6")
"""
if "/" in model:
return model.split("/", 1)[1]
# If no slash, assume the model name itself is the agent profile
return model
def validate_environment(self, headers: dict, model: str, litellm_params: GenericLiteLLMParams | None) -> dict:
"""
Validate environment and set up headers for Manus API.
Manus uses `API_KEY` header instead of `Authorization: Bearer`.
"""
litellm_params = litellm_params or GenericLiteLLMParams()
api_key: Final = litellm_params.api_key or litellm.api_key or get_secret_str("MANUS_API_KEY")
if not api_key:
raise ValueError(
"Manus API key is required. Set MANUS_API_KEY environment variable or pass api_key parameter."
)
# Manus uses API_KEY header, not Authorization: Bearer
# Content-Type is required for all requests (including GET)
headers.update(
{
"API_KEY": api_key,
"Content-Type": "application/json",
}
)
return headers
def get_complete_url(
self,
api_base: str | None,
litellm_params: dict,
) -> str:View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set MANUS_API_KEY or pass api_key.
When it happens
Trigger: Thrown at litellm/llms/manus/responses/transformation.py:88 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/93494542af16c6e8.
Report an issue: GitHub.