Package org.mockserver.llm.client
Class OpenRouterLlmClient
java.lang.Object
org.mockserver.llm.client.AbstractLlmClient
org.mockserver.llm.client.OpenAiLlmClient
org.mockserver.llm.client.OpenRouterLlmClient
- All Implemented Interfaces:
LlmClient
Runtime client for OpenRouter. OpenAI-chat-compatible, so it inherits request
building and response parsing from
OpenAiLlmClient. The default base URL
includes OpenRouter's /api prefix (https://openrouter.ai/api),
which combines with the inherited /v1/chat/completions path.-
Field Summary
Fields inherited from class org.mockserver.llm.client.AbstractLlmClient
OBJECT_MAPPER -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.mockserver.llm.client.OpenAiLlmClient
buildCompletionRequest, parseCompletionResponseMethods inherited from class org.mockserver.llm.client.AbstractLlmClient
appendRoleContentMessages, postJson, readBody, resolveBaseUrl, resolveModel, writeJson
-
Constructor Details
-
OpenRouterLlmClient
public OpenRouterLlmClient()
-
-
Method Details
-
provider
Description copied from interface:LlmClientThe provider this client handles — the registry key.- Specified by:
providerin interfaceLlmClient- Overrides:
providerin classOpenAiLlmClient
-
defaultBaseUrl
Description copied from class:OpenAiLlmClientThe default base URL used when the backend does not supply one. OpenAI-compatible subclasses (Mistral, xAI, DeepSeek, Groq, OpenRouter) override this to point at their own host while inheriting the identical request/response wire format.- Overrides:
defaultBaseUrlin classOpenAiLlmClient
-