Class GeminiCodec

java.lang.Object
org.mockserver.llm.codec.GeminiCodec
All Implemented Interfaces:
ProviderCodec

public class GeminiCodec extends Object implements ProviderCodec
Codec for Google Gemini generateContent API (version v1beta-2025). Encodes MockServer Completion objects into Gemini-format HTTP responses for both non-streaming and streaming (SSE) paths.

Gemini uses candidates with content.parts instead of the OpenAI choices structure. Streaming sends SSE data: chunks each containing a partial candidates array.