BerriAI/litellm · error · ValueError

prompt_integration is required

Error message

prompt_integration is required

What it means

Prompt registration guard: the prompt's litellm_params contain no prompt_integration value, so the registry cannot determine which custom prompt integration (e.g. dotprompt) to initialize for this prompt; raised as ValueError during in-memory registration.

Source

Thrown at litellm/proxy/prompts/prompt_registry.py:132

        import litellm

        prompt_id: Final = prompt.prompt_id
        if prompt_id in self.IN_MEMORY_PROMPTS:
            verbose_proxy_logger.debug("prompt_id already exists in IN_MEMORY_PROMPTS")
            return self.IN_MEMORY_PROMPTS[prompt_id]

        custom_prompt_callback: CustomPromptManagement | None = None
        litellm_params_data: Final = prompt.litellm_params
        verbose_proxy_logger.debug("litellm_params= %s", litellm_params_data)

        if isinstance(litellm_params_data, dict):
            litellm_params = PromptLiteLLMParams(**litellm_params_data)
        else:
            litellm_params = litellm_params_data

        prompt_integration: Final = litellm_params.prompt_integration
        if prompt_integration is None:
            raise ValueError("prompt_integration is required")

        initializer: Final = prompt_initializer_registry.get(prompt_integration)

        if initializer:
            custom_prompt_callback = initializer(litellm_params, prompt)
            if not isinstance(custom_prompt_callback, CustomPromptManagement):
                raise ValueError(f"CustomPromptManagement is required, got {type(custom_prompt_callback)}")
            litellm.logging_callback_manager.add_litellm_callback(custom_prompt_callback)
        else:
            raise ValueError(f"Unsupported prompt: {prompt_integration}")

        parsed_prompt: Final = PromptSpec(
            prompt_id=prompt_id,
            litellm_params=litellm_params,
            prompt_info=prompt.prompt_info or PromptInfo(prompt_type="config"),
            created_at=prompt.created_at,
            updated_at=prompt.updated_at,
        )

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Specify prompt_integration (e.g. 'dotprompt' or a custom integration) in the prompt configuration.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/prompts/prompt_registry.py:132 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/c90c1cc17a18b8b4. Report an issue: GitHub.