In this article
Verify native multimodal fields reach the custom hook and images survive the return path; text fallback and streaming retain separate capability limits.
LiteLLM v1.111.0-dev.4, published as a prerelease on November 15, adds native generateContent hooks for custom providers. A custom leg can receive native contents, configuration and tools and return image parts rather than losing them through a completion adapter. Providers without the hook retain a text adapter with explicit unsupported-option behavior. Native non-streaming support should not be mistaken for identical streaming capability.
Use distinguishable native configuration fields
Send a harmless synthetic native request with imageConfig, responseModalities, seed and an inert tool declaration to an owned custom handler. Record exactly what reaches the hook before returning a known fixture. The old completion path could discard fields while producing plausible text. Compare native contents and configuration independently so a successful handler invocation cannot conceal loss of one important option during gateway conversion or optional-parameter filtering.
Image responses must survive normalization
Return an inert inlineData image fixture and native usageMetadata. Exercise the return shapes the application uses: dictionary, validated model or supported SDK response. Inspect final camelCase JSON and the gateway response headers. The release normalizes these forms while dropping SDK-only fields. A response object that prints correctly inside the handler can still lose its image part at serialization, so client parsing is part of the acceptance boundary.
Text fallback must explain unsupported requests
Use a second custom provider implementing only completion and send both a simple text request and an unsupported image configuration. The documented adapter accepts compatible text settings and rejects unsupported keys unless drop_params is chosen. Keep that opt-in choice visible in the application’s configuration review. Silently dropping image settings can yield HTTP success while failing the user’s task, so acceptance should compare intended capability with the served response rather than the status code alone.
Streaming and cost need independent evidence
Test streaming against a handler with the required streaming implementation and against one without it, preserving the documented retryable failure behavior. Separately reconcile fixed native usage with per-request prices and saved spend. This feature adds protocol integration, not image quality or price accuracy for arbitrary commercial accounts. A useful adoption record names the selected leg, native field preservation, image round-trip, text fallback policy and independently verified streaming and accounting outcomes.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.