Mocking Model HTTP Calls with the Mock Model API

The Mock Model API extension starts a local HTTP server as a Dev Service and points every model the application uses at it. Your tests (or you, in dev mode) script the replies, and can inspect the requests the application sent, without a real API key, model download, or paid model call. Unlike model evaluation, these tests do not measure the quality of a real model’s answers.

The extension is strictly opt-in: adding the dependency changes nothing until you enable it.

The Mock Model API sample is a complete application whose tests script replies, tool calls, structured output and errors against the mock, and which runs in dev mode without an API key.

Dependency

Add the extension in test scope. The same artifact carries the test API, the ready-made MockModelApiTestProfile and the automatic reset of the mock before each @QuarkusTest method, which is active whenever quarkus-junit is on the classpath:

<dependency>
    <groupId>io.quarkiverse.langchain4j</groupId>
    <artifactId>quarkus-langchain4j-mock-api</artifactId>
    <version>2.0.0.CR1</version>
    <scope>test</scope>
</dependency>

To have the mock available in dev mode as well, use provided scope instead, so the extension is on the classpath in dev mode and in tests but not in the packaged application.

The server, the provider dialects and the test API (MockModelServer and the reply types) live in quarkus-langchain4j-mock-api-core, which has no Quarkus dependency and is pulled in transitively.

Enable it

The dev service only starts when quarkus.langchain4j.mock-api.enabled=true in the active profile. There are three ways to set it:

  • In a test class, with the supplied test profile:

    @QuarkusTest
    @TestProfile(MockModelApiTestProfile.class)
    class MyTest {
    }
  • For all tests, in application.properties:

    %test.quarkus.langchain4j.mock-api.enabled=true
  • For dev mode, in application.properties:

    %dev.quarkus.langchain4j.mock-api.enabled=true
The flag is a build-time key. A test profile that sets it makes Quarkus build the application again for the test classes that use that profile.

With the mock enabled, every model the application uses is pointed at it, named models included: the set of models is the one Quarkus LangChain4j itself determines at build time from the injection points and AI services, so there is nothing to declare. If two or more providers are on the classpath, Quarkus LangChain4j still requires you to choose one, for example quarkus.langchain4j.chat-model.provider=openai (and the per-kind equivalents), as it always does.

Script replies

Inject MockModelServer and queue replies per operation: chat(), decision(), embeddings(), moderation() and scoring(). Queued replies are consumed in order. When the queue is empty, the default reply answers. The examples call an application endpoint, /chat?q=…​, that forwards the question to an AI service:

@RegisterAiService
public interface Assistant {

    String chat(String msg);
}

@Path("/chat")
public class ChatResource {

    private final Assistant assistant;

    public ChatResource(Assistant assistant) {
        this.assistant = assistant;
    }

    @GET
    public String chat(@QueryParam("q") String q) {
        return assistant.chat(q);
    }
}

The following @QuarkusTest scripts a reply and then checks the request that reached the mock:

@QuarkusTest
@TestProfile(MockModelApiTestProfile.class)
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
class ProfileEnabledTest {

    @Inject
    MockModelServer mock;

    @Test
    @Order(1)
    void scriptedReplyReachesTheEndpoint() {
        mock.chat().reply("scripted");
        given().queryParam("q", "hi").get("/chat").then().statusCode(200).body(is("scripted"));
        assertThat(mock.chat().singleRequest().asChat().messages())
                .anySatisfy(m -> assertThat(m.text()).isEqualTo("hi"));
    }

    @Test
    @Order(2)
    void journalWasResetBetweenTests() {
        // the previous test made a request; the reset callback cleared it before this method
        assertThat(mock.requests()).isEmpty();
    }
}

Tool calls

Queue a tool call followed by the final answer to script a tool-calling conversation:

mock.chat().replies(List.of(ChatReply.toolCall("getWeather", Map.of("city", "Paris")), ChatReply.text("Sunny")));

An AI service with a getWeather tool executes the tool after the first reply and sends its result in a second request, which receives Sunny. In that second request, asChat().messages() contains the tool result as a message with the tool role.

Usage

mock.chat().reply(ChatReply.text("x").usage(14, 47));

Scoring

For scoring models (rerankers), a ScoringReply gives one score per scored segment, in the order of the segments:

mock.scoring().reply(ScoringReply.of(0.2, 0.9));

The provider’s response orders them the way its API does; Cohere, for example, lists the most relevant document first.

Errors

fail(status, message) queues an error response, rendered in the provider’s documented error format. Whether the client retries depends on the provider, the API and the status: the OpenAI Chat Completions client retries a 429 once by default, and that retry consumes the next queued reply, while the OpenAI Responses client makes a single attempt. mock.chat().requests() shows how many attempts reached the mock. Queue the failure once per attempt (or configure quarkus.langchain4j.openai.max-retries) to see the exception in your test; over Chat Completions:

mock.chat().fail(429, "rate limited");
mock.chat().fail(429, "rate limited");

assertThatThrownBy(() -> chatModel.chat("hi")).hasMessageContaining("rate limited");

Default replies

When nothing is queued:

  • chat answers with quarkus.langchain4j.mock-api.default-chat-reply;

  • embeddings are deterministic vectors derived from the input, with quarkus.langchain4j.mock-api.default-embedding-dimension dimensions;

  • moderation answers "not flagged";

  • scoring gives every segment the same score;

  • decisions have no default and answer 404.

Streaming, chunks and delays

Streaming needs no special reply: the same queued reply is streamed when the client asks for a streaming response, in the provider’s own stream format (server-sent events, newline-delimited JSON for Ollama, the AWS event stream for Bedrock). Use ChatReply.chunks(…​) to fix where the text is split into chunks, and delay(Duration) to hold the response back, for example to test timeouts:

mock.chat().reply(ChatReply.text("Hello world").chunks(List.of("Hello", " world")));
mock.chat().reply(ChatReply.text("slow").delay(Duration.ofSeconds(5)));

Raw stubs

For anything without a neutral reply type, script the HTTP response directly:

mock.raw().on("POST", "/v1/chat/completions").reply(404, "{\"error\":\"nope\"}");

Raw stubs are checked before the provider formats, in the order they were registered, and stay until the next reset. The path is a glob: matches within one path segment, * across segments. Each provider’s requests arrive under a path prefix of their own, listed in Covered providers: a raw stub for Mistral chat is /mistralai/v1/chat/completions, while OpenAI and Azure OpenAI have no prefix. Requests answered by a raw stub have no operation, so find them in mock.requests() rather than in an operation’s requests().

replies(…​) sends the responses in order, one per matching request, and then repeats the last one. whenBody(jsonPointer, expected) limits the route to requests whose JSON body has the text expected at that pointer, and delay(Duration) holds back every response of the route.

For example, watsonx text extraction is not modelled. It submits a job, polls it until it is done and then reads the result from Cloud Object Storage, whose URL the mock does not override, so point it at the mock yourself:

quarkus.langchain4j.watsonx.text-extraction.cos-url=${quarkus.langchain4j.mock-api.url}/cos
mock.raw().on("POST", "/watsonx/ml/v1/text/extractions").reply(201, job("submitted"));
mock.raw().on("GET", "/watsonx/ml/v1/text/extractions/*")
        .replies(RawResponse.json(200, job("running")), RawResponse.json(200, job("completed")));
mock.raw().on("GET", "/cos/results/document.md")
        .replies(RawResponse.of(200, Map.of("Content-Type", "text/plain"), "# Extracted text"));

Here job(status) returns a TextExtractionResponse body, as in the watsonx.ai API reference, with that status.

Assert on requests

Every request is captured. mock.chat().singleRequest() returns the only captured chat request (and fails if there are none or several), mock.chat().requests() returns all of them. A CapturedRequest gives raw access (path(), header(name), bodyAsJson()) and typed views: A body that is not textual, such as a multipart upload, is kept with one character per byte (ISO-8859-1), so its text parts can be asserted on and the bytes recovered with body().getBytes(StandardCharsets.ISO_8859_1).

  • asChat() exposes the messages, tool definitions, tool results, model name, sampling parameters and response format;

  • asDecision() is the equivalent for decision requests.

operation() and dialect() tell which operation and which provider format the mock recognized.

CapturedRequest r = mock.chat().singleRequest();
assertThat(r.path()).endsWith("/v1/chat/completions");
assertThat(r.header("Authorization")).isEqualTo("Bearer mock-api-key");
assertThat(r.asChat().messages()).singleElement().satisfies(msg -> {
    assertThat(msg.role()).isEqualTo("user");
    assertThat(msg.text()).isEqualTo("hi");
});

Resetting between tests

Before each @QuarkusTest method the mock is reset automatically by a JUnit callback, as the second test above shows. With QuarkusExtensionTest, call mock.reset() in a @BeforeEach method:

@BeforeEach
void reset() {
    mock.reset();
}

Integration tests

In a @QuarkusIntegrationTest the application runs in a separate process, so you cannot inject MockModelServer. Connect to the running mock with the URL that the dev service publishes in DevServicesContext:

@QuarkusIntegrationTest
@TestProfile(MockModelApiTestProfile.class)
class ProfileEnabledIT {

    DevServicesContext ctx;

    @Test
    void scriptedReplyAcrossProcesses() {
        try (MockModelServer mock = MockModelServer
                .connect(ctx.devServicesProperties().get("quarkus.langchain4j.mock-api.url"))) {
            mock.reset();
            mock.chat().reply("from IT");
            given().queryParam("q", "hi").get("/chat").then().statusCode(200).body(is("from IT"));
            assertThat(mock.chat().singleRequest().path()).endsWith("/v1/chat/completions");
        }
    }
}

The endpoint URLs, and the identity placeholders for keys you did not configure, reach the launched jar as system properties. Because the extension is test-scoped, that jar logs harmless Unrecognized configuration key "quarkus.langchain4j.mock-api.*" warnings. The set of named models is fixed at build time from the injection points and AI services, so a named model the application does not refer to is not covered, whatever its configuration; the unnamed model of every provider on the classpath always is.

Dev mode

Set %dev.quarkus.langchain4j.mock-api.enabled=true and run ./mvnw quarkus:dev. The dev service appears in the Dev UI dev services panel and is reused across live reloads, so its URL stays stable. With nothing scripted, the application receives the default replies, which you can change with quarkus.langchain4j.mock-api.default-chat-reply and quarkus.langchain4j.mock-api.default-embedding-dimension.

You can also drive the mock by hand through its admin API. With URL set to the mock’s base URL (shown in the Dev UI):

# queue a chat reply
curl -X POST $URL/_admin/replies/chat -H 'Content-Type: application/json' -d '[{"kind":"ChatReply","text":"hi"}]'

# list the requests captured so far
curl $URL/_admin/requests

# clear queued replies and captured requests
curl -X POST $URL/_admin/reset

Identity defaults

Some providers refuse to start without identity configuration. When you do not set such a value at all, the mock fills in a placeholder:

Key Placeholder

api-key (OpenAI, Anthropic, Google GenAI, AI Gemini, Mistral, Cohere, Hugging Face)

mock-api-key

api-key (Azure OpenAI), unless an ad-token is configured for the same model

mock-api-key

deployment-name (Azure OpenAI)

mock-deployment

project-id (Vertex AI, Vertex AI Gemini)

mock-project

location (Vertex AI, Vertex AI Gemini)

us-central1

chat-model.model-id (OpenShift AI)

mock-model

api-key (watsonx)

mock-api-key

project-id (watsonx), unless a space-id is configured for the same model

mock-project

aws.region (Bedrock, provider level only)

us-east-1

aws.credentials-provider (Bedrock, provider level only)

mockApiAwsCredentials, a bean with fixed credentials for the mock

Ollama and TypeSafe get no placeholders: Ollama has no credentials, and TypeSafe only requires an API key for its default URL, so no Authorization header is sent.

A value you configure yourself always wins: the mock only fills in keys you did not set at all at build time, at the default level or for the same named model. Setting a key to an empty value counts as setting it, which is how a test keeps a key empty on purpose, for example to make a provider fall back to its ModelAuthProvider instead of an API key. For Azure OpenAI, an ad-token (at the default level or per model kind, for example chat-model.ad-token) counts as configuring api-key, because the client accepts only one of them. For watsonx, a space-id counts as configuring project-id in the same way.

An OpenAI chat model without an explicit chat-model.mode selects its API from its base URL: the Responses API for OpenAI itself, Chat Completions for any other URL. Pointed at the mock, every model would select Chat Completions, so the mock sets chat-model.mode=responses for a model you would run against OpenAI, that is one with no base-url of its own or with OpenAI’s, and leaves a model with another base-url on Chat Completions, as it would be against the compatible endpoint you configured. A chat-model.mode you set yourself always wins, and a test about one of the two APIs is best off setting it.

The Vertex AI providers authenticate with Google credentials instead of a key, so the mock replaces those with beans:

  • Vertex AI Gemini gets a ModelAuthProvider bean per model in use, qualified with the model’s config name, that sends Authorization: Bearer mock-access-token. A model for which you have a ModelAuthProvider bean of your own, qualified with its @ModelName or unqualified, gets no mock bean, so your provider is used exactly as it would be without the mock.

  • Vertex AI gets a default AuthProvider bean with the same token, which replaces Application Default Credentials; an AuthProvider bean of your own still wins.

Covered providers

Every HTTP model provider in Quarkus LangChain4j is covered. The wire formats follow each provider’s public API documentation (for OpenAI, the published OpenAPI specification); for example, a declined decision answer is rendered with the documented refusal type.

The operations column uses the names of the reply scopes; "streaming" and "tools" mean streaming chat and tool calls in chat. Endpoint keys are always overridden, also for named models; identity keys are only filled in when you did not set them (see Identity defaults). The path prefix is where the provider’s requests arrive on the mock, and what a raw stub for that provider starts with.

Provider (config prefix) Path prefix Operations Filled in Notes

OpenAI (openai)

none

chat, streaming, tools, embeddings, moderation, decision

base-url, api-key, chat-model.mode (see Identity defaults)

Chat Completions, the Responses API and the Decisions API. Image generation and transcription are raw stubs only.

Azure OpenAI (azure-openai)

none

chat, streaming, tools, embeddings

endpoint (default and per model kind), api-key, deployment-name

OpenAI bodies under /openai/deployments/mock-deployment.

Anthropic (anthropic)

/anthropic

chat, streaming, tools

base-url, api-key

ChatReply.thinking becomes a thinking content block.

Google GenAI (google.genai)

/google-genai

chat, streaming, tools, embeddings

base-url, api-key

AI Gemini (ai.gemini)

/ai-gemini

chat, streaming, tools, embeddings

base-url, api-key

Vertex AI Gemini (vertexai.gemini)

/vertexai-gemini

chat, streaming, tools, embeddings

base-url, project-id, location, a token per model

Embeddings go through :predict.

Vertex AI (vertexai)

/vertexai

chat

base-url, project-id, location, a default AuthProvider bean

PaLM chat over :predict, which has neither streaming nor tools.

Mistral (mistralai)

/mistralai

chat, streaming, tools, embeddings, moderation

base-url, api-key

A CONTENT_FILTER finish reason is rendered as error, because Mistral has no counterpart. Moderation categories use Mistral’s names, for example violence_and_threats: a ModerationReply only flags when it names one of them.

OpenShift AI (openshift-ai)

/openshift-ai

chat (not streaming)

base-url, chat-model.model-id

Caikit text generation (/api/v1/task/text-generation), text only: a reply with tool calls is answered with a 500 error.

Ollama (ollama)

/ollama

chat, streaming, tools, embeddings

base-url

Streaming is newline-delimited JSON. quarkus.langchain4j.mock-api.enabled=true also disables the LangChain4j Ollama dev services, so no Ollama container or model download is started.

Cohere (cohere)

/cohere

scoring

base-url, api-key

POST /v2/rerank is answered from the ScoringReply. Extra scores are ignored; too few are a 500 error.

Hugging Face (huggingface)

/huggingface

chat, embeddings

chat-model.inference-endpoint-url, embedding-model.inference-endpoint-url, api-key

Chat is the Text Generation Inference compat_generate operation, whose response is an array. No tools and no streaming: a reply with tool calls is answered with a 500 error. Both inference endpoint URLs are replaced as a whole, because the mock tells chat and embeddings apart only by URL and cannot keep your path: every Hugging Face model shares one mock path, and ChatRequestView.modelName() is null.

TypeSafe (typesafe)

/typesafe

decision

base-url

No identity is filled in. The API has no refusal: a declined answer, or an empty DecisionReply, leaves the answer out, and the client throws.

watsonx (watsonx)

/watsonx

chat, streaming, tools, embeddings, moderation, scoring

base-url, iam.base-url, api-key, project-id

Also the deployment and model gateway chat and embedding endpoints. The IAM token endpoint is served by the mock, which answers with the token mock-iam-token; tokens are cached per API key, so one IAM request serves all models. text-extraction.cos-url, text-classification.cos-url, schema.create.cos-url and built-in-tool.base-url are not overridden: set them yourself when you test those features. Text generation, tokenization, text extraction and classification, files, schema services, time series, built-in tools, batches, gateway image generation, model catalogs and Cloud Pak for Data authentication are raw stubs only.

Bedrock (bedrock)

/bedrock

chat, streaming, tools, embeddings

aws.endpoint-override (provider level, chat-model and embedding-model), aws.region, aws.credentials-provider

Chat is the Converse API; streaming uses the AWS event stream format. The SigV4 signature is accepted without verification. Embeddings go through invoke with the Cohere Embed body (answered as embeddings_by_type when the request carries embedding_types, else as embeddings_floats) or the Titan body. Other invoke bodies are raw stubs only.

Out of scope:

  • in-process providers such as jinfer and jitllm, which make no HTTP calls;

  • HTTP calls that are not model calls, such as MCP servers or Tavily; keep using Quarkus WireMock for those.

Client limitations observed

The mock renders the documented responses. Where a provider’s client reads them differently, the result is the same as with the real service:

  • Ollama: streaming responses report no token usage.

  • watsonx: the moderation result’s flaggedText() is null.

  • Bedrock: Cohere embeddings report no token usage.

  • OpenShift AI: only the first message of the conversation is sent.

Wire formats

The examples below show, for each provider, the request its client sends (method, path on the mock including the path prefix, and body) and what the mock answers to a scripted reply: a text reply with usage, a tool call, the same text streamed, embeddings, moderation, scoring, decisions and a 429 error, as far as the provider supports them. Bodies are pretty printed; streams are shown as the server-sent events, newline-delimited JSON objects or AWS event stream messages the mock writes, and timestamps and random ids are replaced by fixed values. They are generated and verified by WireFormatExamplesTest in the quarkus-langchain4j-mock-api-core module, so they always match the mock; after changing a dialect, regenerate them with -Dmockapi.wire.update=true.

OpenAI and Azure OpenAI
=== Chat
--> POST /v1/chat/completions
{
  "model" : "gpt-4o-mini",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 200 [application/json]
{
  "id" : "chatcmpl-mock-1",
  "object" : "chat.completion",
  "created" : 1767225600,
  "model" : "gpt-4o-mini",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : "Hello from the mock"
    },
    "logprobs" : null,
    "finish_reason" : "stop"
  } ],
  "usage" : {
    "prompt_tokens" : 12,
    "completion_tokens" : 7,
    "total_tokens" : 19
  }
}

=== Chat with a tool call
--> POST /v1/chat/completions
{
  "model" : "gpt-4o-mini",
  "messages" : [ {
    "role" : "user",
    "content" : "What is the weather in Athens?"
  } ],
  "tools" : [ {
    "type" : "function",
    "function" : {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "object",
        "properties" : {
          "city" : {
            "type" : "string"
          }
        },
        "required" : [ "city" ]
      }
    }
  } ]
}
<-- 200 [application/json]
{
  "id" : "chatcmpl-mock-1",
  "object" : "chat.completion",
  "created" : 1767225600,
  "model" : "gpt-4o-mini",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : null,
      "tool_calls" : [ {
        "id" : "call_mock_0",
        "type" : "function",
        "function" : {
          "name" : "get_weather",
          "arguments" : "{\"city\":\"Athens\"}"
        }
      } ]
    },
    "logprobs" : null,
    "finish_reason" : "tool_calls"
  } ],
  "usage" : {
    "prompt_tokens" : 0,
    "completion_tokens" : 0,
    "total_tokens" : 0
  }
}

=== Streaming chat
--> POST /v1/chat/completions
{
  "model" : "gpt-4o-mini",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : true,
  "stream_options" : {
    "include_usage" : true
  }
}
<-- 200 [text/event-stream]
data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[{"index":0,"delta":{"content":" mock"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null}

data: {"id":"chatcmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"gpt-4o-mini","choices":[],"usage":{"prompt_tokens":12,"completion_tokens":7,"total_tokens":19}}

data: [DONE]

=== Chat (Responses API)
--> POST /v1/responses
{
  "model" : "gpt-4o-mini",
  "input" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 200 [application/json]
{
  "id" : "resp_mock_1",
  "object" : "response",
  "created_at" : 1767225600,
  "status" : "completed",
  "access_programs" : null,
  "error" : null,
  "incomplete_details" : null,
  "instructions" : null,
  "model" : "gpt-4o-mini",
  "tools" : [ ],
  "output" : [ {
    "type" : "message",
    "id" : "msg_mock_1",
    "role" : "assistant",
    "content" : [ {
      "type" : "output_text",
      "text" : "Hello from the mock",
      "annotations" : [ ],
      "logprobs" : [ ]
    } ],
    "status" : "completed"
  } ],
  "parallel_tool_calls" : true,
  "metadata" : { },
  "tool_choice" : "auto",
  "temperature" : 1.0,
  "top_p" : 1.0,
  "usage" : {
    "input_tokens" : 12,
    "input_tokens_details" : {
      "cached_tokens" : 0,
      "cache_write_tokens" : 0
    },
    "output_tokens" : 7,
    "output_tokens_details" : {
      "reasoning_tokens" : 0
    },
    "total_tokens" : 19
  }
}

=== Streaming chat (Responses API)
--> POST /v1/responses
{
  "model" : "gpt-4o-mini",
  "input" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : true
}
<-- 200 [text/event-stream]
event: response.created
data: {"type":"response.created","response":{"id":"resp_mock_1","object":"response","created_at":1767225600,"status":"in_progress","access_programs":null,"error":null,"incomplete_details":null,"instructions":null,"model":"gpt-4o-mini","tools":[],"output":[],"parallel_tool_calls":true,"metadata":{},"tool_choice":"auto","temperature":1.0,"top_p":1.0},"sequence_number":0}

event: response.in_progress
data: {"type":"response.in_progress","response":{"id":"resp_mock_1","object":"response","created_at":1767225600,"status":"in_progress","access_programs":null,"error":null,"incomplete_details":null,"instructions":null,"model":"gpt-4o-mini","tools":[],"output":[],"parallel_tool_calls":true,"metadata":{},"tool_choice":"auto","temperature":1.0,"top_p":1.0},"sequence_number":1}

event: response.output_item.added
data: {"type":"response.output_item.added","output_index":0,"item":{"type":"message","id":"msg_mock_1","role":"assistant","content":[],"status":"in_progress"},"sequence_number":2}

event: response.content_part.added
data: {"type":"response.content_part.added","item_id":"msg_mock_1","output_index":0,"content_index":0,"part":{"type":"output_text","text":"","annotations":[],"logprobs":[]},"sequence_number":3}

event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_mock_1","output_index":0,"content_index":0,"delta":"Hello","logprobs":[],"sequence_number":4}

event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_mock_1","output_index":0,"content_index":0,"delta":" from","logprobs":[],"sequence_number":5}

event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_mock_1","output_index":0,"content_index":0,"delta":" the","logprobs":[],"sequence_number":6}

event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_mock_1","output_index":0,"content_index":0,"delta":" mock","logprobs":[],"sequence_number":7}

event: response.output_text.done
data: {"type":"response.output_text.done","item_id":"msg_mock_1","output_index":0,"content_index":0,"text":"Hello from the mock","logprobs":[],"sequence_number":8}

event: response.content_part.done
data: {"type":"response.content_part.done","item_id":"msg_mock_1","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Hello from the mock","annotations":[],"logprobs":[]},"sequence_number":9}

event: response.output_item.done
data: {"type":"response.output_item.done","output_index":0,"item":{"type":"message","id":"msg_mock_1","role":"assistant","content":[{"type":"output_text","text":"Hello from the mock","annotations":[],"logprobs":[]}],"status":"completed"},"sequence_number":10}

event: response.completed
data: {"type":"response.completed","response":{"id":"resp_mock_1","object":"response","created_at":1767225600,"status":"completed","access_programs":null,"error":null,"incomplete_details":null,"instructions":null,"model":"gpt-4o-mini","tools":[],"output":[{"type":"message","id":"msg_mock_1","role":"assistant","content":[{"type":"output_text","text":"Hello from the mock","annotations":[],"logprobs":[]}],"status":"completed"}],"parallel_tool_calls":true,"metadata":{},"tool_choice":"auto","temperature":1.0,"top_p":1.0,"usage":{"input_tokens":12,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":7,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":19}},"sequence_number":11}

=== Chat (Azure OpenAI)
--> POST /openai/deployments/mock-deployment/chat/completions?api-version=2024-10-21
{
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 200 [application/json]
{
  "id" : "chatcmpl-mock-1",
  "object" : "chat.completion",
  "created" : 1767225600,
  "model" : "mock-model",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : "Hello from the mock"
    },
    "logprobs" : null,
    "finish_reason" : "stop"
  } ],
  "usage" : {
    "prompt_tokens" : 12,
    "completion_tokens" : 7,
    "total_tokens" : 19
  }
}

=== Embeddings
--> POST /v1/embeddings
{
  "model" : "text-embedding-3-small",
  "input" : [ "Hello" ]
}
<-- 200 [application/json]
{
  "object" : "list",
  "data" : [ {
    "object" : "embedding",
    "index" : 0,
    "embedding" : [ 0.1, 0.2, 0.3 ]
  } ],
  "model" : "text-embedding-3-small",
  "usage" : {
    "prompt_tokens" : 1,
    "total_tokens" : 1
  }
}

=== Moderation
--> POST /v1/moderations
{
  "model" : "omni-moderation-latest",
  "input" : [ "I am going to hit you." ]
}
<-- 200 [application/json]
{
  "id" : "modr-mock-1",
  "model" : "omni-moderation-latest",
  "results" : [ {
    "flagged" : true,
    "categories" : {
      "hate" : false,
      "hate/threatening" : false,
      "harassment" : false,
      "harassment/threatening" : false,
      "illicit" : false,
      "illicit/violent" : false,
      "self-harm" : false,
      "self-harm/intent" : false,
      "self-harm/instructions" : false,
      "sexual" : false,
      "sexual/minors" : false,
      "violence" : true,
      "violence/graphic" : false
    },
    "category_scores" : {
      "hate" : 0.0,
      "hate/threatening" : 0.0,
      "harassment" : 0.0,
      "harassment/threatening" : 0.0,
      "illicit" : 0.0,
      "illicit/violent" : 0.0,
      "self-harm" : 0.0,
      "self-harm/intent" : 0.0,
      "self-harm/instructions" : 0.0,
      "sexual" : 0.0,
      "sexual/minors" : 0.0,
      "violence" : 1.0,
      "violence/graphic" : 0.0
    },
    "category_applied_input_types" : {
      "hate" : [ "text" ],
      "hate/threatening" : [ "text" ],
      "harassment" : [ "text" ],
      "harassment/threatening" : [ "text" ],
      "illicit" : [ "text" ],
      "illicit/violent" : [ "text" ],
      "self-harm" : [ "text" ],
      "self-harm/intent" : [ "text" ],
      "self-harm/instructions" : [ "text" ],
      "sexual" : [ "text" ],
      "sexual/minors" : [ "text" ],
      "violence" : [ "text" ],
      "violence/graphic" : [ "text" ]
    }
  } ]
}

=== Decision
--> POST /v1/decisions
{
  "model" : "gpt-6-luna",
  "input" : "Help! My payouts have been failing for 3 days.",
  "questions" : [ {
    "type" : "choice",
    "name" : "team",
    "instructions" : "Which team should handle this?",
    "choices" : [ {
      "value" : "billing",
      "description" : "Payments"
    }, {
      "value" : "support",
      "description" : "Bugs"
    } ]
  }, {
    "type" : "predicate",
    "name" : "urgent",
    "instructions" : "Does this need attention today?"
  } ]
}
<-- 200 [application/json]
{
  "model" : "gpt-6-luna",
  "answers" : [ {
    "type" : "choice",
    "name" : "team",
    "choice" : "billing",
    "probabilities" : [ {
      "value" : "billing",
      "probability" : 0.88
    }, {
      "value" : "support",
      "probability" : 0.12
    } ],
    "confidence" : 0.81
  }, {
    "type" : "predicate",
    "name" : "urgent",
    "probability" : 0.95
  } ],
  "usage" : {
    "input_tokens" : 318,
    "input_tokens_details" : {
      "cached_tokens" : 0,
      "cache_write_tokens" : 0
    },
    "output_tokens" : 34,
    "output_tokens_details" : {
      "reasoning_tokens" : 0
    },
    "total_tokens" : 352
  }
}

=== Error
--> POST /v1/chat/completions
{
  "model" : "gpt-4o-mini",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 429 [application/json]
{
  "error" : {
    "message" : "slow down",
    "type" : "mock_error",
    "param" : null,
    "code" : null
  }
}
Anthropic
=== Chat
--> POST /anthropic/v1/messages
{
  "model" : "claude-sonnet-4-5",
  "max_tokens" : 1024,
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "id" : "msg_mock_1",
  "type" : "message",
  "role" : "assistant",
  "model" : "claude-sonnet-4-5",
  "content" : [ {
    "type" : "text",
    "citations" : null,
    "text" : "Hello from the mock"
  } ],
  "stop_reason" : "end_turn",
  "stop_sequence" : null,
  "usage" : {
    "input_tokens" : 12,
    "output_tokens" : 7,
    "cache_creation_input_tokens" : null,
    "cache_read_input_tokens" : null
  }
}

=== Chat with a tool call
--> POST /anthropic/v1/messages
{
  "model" : "claude-sonnet-4-5",
  "max_tokens" : 1024,
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "tools" : [ {
    "name" : "get_weather",
    "description" : "Returns the weather in a city",
    "input_schema" : {
      "type" : "object",
      "properties" : {
        "city" : {
          "type" : "string"
        }
      },
      "required" : [ "city" ]
    }
  } ]
}
<-- 200 [application/json]
{
  "id" : "msg_mock_1",
  "type" : "message",
  "role" : "assistant",
  "model" : "claude-sonnet-4-5",
  "content" : [ {
    "type" : "tool_use",
    "id" : "toolu_mock_0",
    "name" : "get_weather",
    "input" : {
      "city" : "Athens"
    }
  } ],
  "stop_reason" : "tool_use",
  "stop_sequence" : null,
  "usage" : {
    "input_tokens" : 0,
    "output_tokens" : 0,
    "cache_creation_input_tokens" : null,
    "cache_read_input_tokens" : null
  }
}

=== Streaming chat
--> POST /anthropic/v1/messages
{
  "model" : "claude-sonnet-4-5",
  "max_tokens" : 1024,
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ],
  "stream" : true
}
<-- 200 [text/event-stream]
event: message_start
data: {"type":"message_start","message":{"id":"msg_mock_1","type":"message","role":"assistant","model":"claude-sonnet-4-5","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":12,"output_tokens":0,"cache_creation_input_tokens":null,"cache_read_input_tokens":null}}}

event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" from"}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the"}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" mock"}}

event: content_block_stop
data: {"type":"content_block_stop","index":0}

event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":7}}

event: message_stop
data: {"type":"message_stop"}

=== Error
--> POST /anthropic/v1/messages
{
  "model" : "claude-sonnet-4-5",
  "max_tokens" : 1024,
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
{
  "type" : "error",
  "error" : {
    "type" : "rate_limit_error",
    "message" : "slow down"
  },
  "request_id" : "req_mock"
}
Google GenAI
=== Chat
--> POST /google-genai/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "text" : "Hello from the mock"
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 12,
    "candidatesTokenCount" : 7,
    "totalTokenCount" : 19
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Chat with a tool call
--> POST /google-genai/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "tools" : [ {
    "functionDeclarations" : [ {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "OBJECT",
        "properties" : {
          "city" : {
            "type" : "STRING"
          }
        },
        "required" : [ "city" ]
      }
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "functionCall" : {
          "name" : "get_weather",
          "args" : {
            "city" : "Athens"
          }
        }
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 0,
    "candidatesTokenCount" : 0,
    "totalTokenCount" : 0
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Streaming chat
--> POST /google-genai/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [text/event-stream]
data: {"candidates":[{"content":{"parts":[{"text":"Hello"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" from"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" the"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" mock"}],"role":"model"},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":12,"candidatesTokenCount":7,"totalTokenCount":19},"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

=== Embeddings
--> POST /google-genai/v1beta/models/text-embedding-004:batchEmbedContents
{
  "requests" : [ {
    "model" : "models/text-embedding-004",
    "content" : {
      "parts" : [ {
        "text" : "Hello"
      } ]
    }
  } ]
}
<-- 200 [application/json]
{
  "embeddings" : [ {
    "values" : [ 0.1, 0.2, 0.3 ]
  } ]
}

=== Error
--> POST /google-genai/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
{
  "error" : {
    "code" : 429,
    "message" : "slow down",
    "status" : "RESOURCE_EXHAUSTED"
  }
}
AI Gemini
=== Chat
--> POST /ai-gemini/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "text" : "Hello from the mock"
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 12,
    "candidatesTokenCount" : 7,
    "totalTokenCount" : 19
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Chat with a tool call
--> POST /ai-gemini/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "tools" : [ {
    "functionDeclarations" : [ {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "OBJECT",
        "properties" : {
          "city" : {
            "type" : "STRING"
          }
        },
        "required" : [ "city" ]
      }
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "functionCall" : {
          "name" : "get_weather",
          "args" : {
            "city" : "Athens"
          }
        }
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 0,
    "candidatesTokenCount" : 0,
    "totalTokenCount" : 0
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Streaming chat
--> POST /ai-gemini/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [text/event-stream]
data: {"candidates":[{"content":{"parts":[{"text":"Hello"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" from"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" the"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" mock"}],"role":"model"},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":12,"candidatesTokenCount":7,"totalTokenCount":19},"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

=== Embeddings
--> POST /ai-gemini/v1beta/models/text-embedding-004:embedContent
{
  "model" : "models/text-embedding-004",
  "content" : {
    "parts" : [ {
      "text" : "Hello"
    } ]
  }
}
<-- 200 [application/json]
{
  "embedding" : {
    "values" : [ 0.1, 0.2, 0.3 ]
  }
}

=== Error
--> POST /ai-gemini/v1beta/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
{
  "error" : {
    "code" : 429,
    "message" : "slow down",
    "status" : "RESOURCE_EXHAUSTED"
  }
}
Vertex AI Gemini
=== Chat
--> POST /vertexai-gemini/v1/projects/mock-project/locations/us-central1/publishers/google/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "text" : "Hello from the mock"
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 12,
    "candidatesTokenCount" : 7,
    "totalTokenCount" : 19
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Chat with a tool call
--> POST /vertexai-gemini/v1/projects/mock-project/locations/us-central1/publishers/google/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "tools" : [ {
    "functionDeclarations" : [ {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "OBJECT",
        "properties" : {
          "city" : {
            "type" : "STRING"
          }
        },
        "required" : [ "city" ]
      }
    } ]
  } ]
}
<-- 200 [application/json]
{
  "candidates" : [ {
    "content" : {
      "parts" : [ {
        "functionCall" : {
          "name" : "get_weather",
          "args" : {
            "city" : "Athens"
          }
        }
      } ],
      "role" : "model"
    },
    "finishReason" : "STOP",
    "index" : 0
  } ],
  "usageMetadata" : {
    "promptTokenCount" : 0,
    "candidatesTokenCount" : 0,
    "totalTokenCount" : 0
  },
  "modelVersion" : "gemini-2.5-flash",
  "responseId" : "mock-response-1"
}

=== Streaming chat
--> POST /vertexai-gemini/v1/projects/mock-project/locations/us-central1/publishers/google/models/gemini-2.5-flash:streamGenerateContent?alt=sse
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [text/event-stream]
data: {"candidates":[{"content":{"parts":[{"text":"Hello"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" from"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" the"}],"role":"model"},"index":0}],"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

data: {"candidates":[{"content":{"parts":[{"text":" mock"}],"role":"model"},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":12,"candidatesTokenCount":7,"totalTokenCount":19},"modelVersion":"gemini-2.5-flash","responseId":"mock-response-1"}

=== Embeddings
--> POST /vertexai-gemini/v1/projects/mock-project/locations/us-central1/publishers/google/models/text-embedding-004:predict
{
  "instances" : [ {
    "content" : "Hello"
  } ]
}
<-- 200 [application/json]
{
  "predictions" : [ {
    "embeddings" : {
      "statistics" : {
        "truncated" : false,
        "token_count" : 1
      },
      "values" : [ 0.1, 0.2, 0.3 ]
    }
  } ]
}

=== Error
--> POST /vertexai-gemini/v1/projects/mock-project/locations/us-central1/publishers/google/models/gemini-2.5-flash:generateContent
{
  "contents" : [ {
    "role" : "user",
    "parts" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
{
  "error" : {
    "code" : 429,
    "message" : "slow down",
    "status" : "RESOURCE_EXHAUSTED"
  }
}
Vertex AI
=== Chat
--> POST /vertexai/v1/projects/mock-project/locations/us-central1/publishers/google/models/chat-bison:predict
{
  "instances" : [ {
    "context" : "",
    "messages" : [ {
      "author" : "USER",
      "content" : "Hi"
    } ]
  } ],
  "parameters" : {
    "temperature" : 0.2,
    "maxOutputTokens" : 50,
    "topK" : 40,
    "topP" : 0.9
  }
}
<-- 200 [application/json]
{
  "predictions" : [ {
    "candidates" : [ {
      "author" : "1",
      "content" : "Hello from the mock"
    } ]
  } ],
  "metadata" : {
    "tokenMetadata" : {
      "inputTokenCount" : {
        "totalTokens" : 12
      },
      "outputTokenCount" : {
        "totalTokens" : 7
      }
    }
  }
}

=== Error
--> POST /vertexai/v1/projects/mock-project/locations/us-central1/publishers/google/models/chat-bison:predict
{
  "instances" : [ {
    "context" : "",
    "messages" : [ {
      "author" : "USER",
      "content" : "Hi"
    } ]
  } ],
  "parameters" : {
    "temperature" : 0.2,
    "maxOutputTokens" : 50,
    "topK" : 40,
    "topP" : 0.9
  }
}
<-- 429 [application/json]
{
  "error" : {
    "code" : 429,
    "message" : "slow down",
    "status" : "RESOURCE_EXHAUSTED"
  }
}
Mistral
=== Chat
--> POST /mistralai/v1/chat/completions
{
  "model" : "mistral-small-latest",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 200 [application/json]
{
  "id" : "cmpl-mock-1",
  "object" : "chat.completion",
  "created" : 1767225600,
  "model" : "mistral-small-latest",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : "Hello from the mock",
      "tool_calls" : null,
      "prefix" : false
    },
    "finish_reason" : "stop"
  } ],
  "usage" : {
    "prompt_tokens" : 12,
    "completion_tokens" : 7,
    "total_tokens" : 19
  }
}

=== Chat with a tool call
--> POST /mistralai/v1/chat/completions
{
  "model" : "mistral-small-latest",
  "messages" : [ {
    "role" : "user",
    "content" : "What is the weather in Athens?"
  } ],
  "tools" : [ {
    "type" : "function",
    "function" : {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "object",
        "properties" : {
          "city" : {
            "type" : "string"
          }
        },
        "required" : [ "city" ]
      }
    }
  } ]
}
<-- 200 [application/json]
{
  "id" : "cmpl-mock-1",
  "object" : "chat.completion",
  "created" : 1767225600,
  "model" : "mistral-small-latest",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : null,
      "tool_calls" : [ {
        "index" : 0,
        "id" : "call_mock_0",
        "type" : "function",
        "function" : {
          "name" : "get_weather",
          "arguments" : "{\"city\":\"Athens\"}"
        }
      } ],
      "prefix" : false
    },
    "finish_reason" : "tool_calls"
  } ],
  "usage" : {
    "prompt_tokens" : 0,
    "completion_tokens" : 0,
    "total_tokens" : 0
  }
}

=== Streaming chat
--> POST /mistralai/v1/chat/completions
{
  "model" : "mistral-small-latest",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : true
}
<-- 200 [text/event-stream]
data: {"id":"cmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"mistral-small-latest","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}

data: {"id":"cmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"mistral-small-latest","choices":[{"index":0,"delta":{"content":" from"},"finish_reason":null}]}

data: {"id":"cmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"mistral-small-latest","choices":[{"index":0,"delta":{"content":" the"},"finish_reason":null}]}

data: {"id":"cmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"mistral-small-latest","choices":[{"index":0,"delta":{"content":" mock"},"finish_reason":null}]}

data: {"id":"cmpl-mock-1","object":"chat.completion.chunk","created":1767225600,"model":"mistral-small-latest","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":7,"total_tokens":19}}

data: [DONE]

=== Embeddings
--> POST /mistralai/v1/embeddings
{
  "model" : "mistral-embed",
  "input" : [ "Hello" ],
  "encoding_format" : "float"
}
<-- 200 [application/json]
{
  "id" : "embd-mock-1",
  "object" : "list",
  "model" : "mistral-embed",
  "data" : [ {
    "object" : "embedding",
    "embedding" : [ 0.1, 0.2, 0.3 ],
    "index" : 0
  } ],
  "usage" : {
    "prompt_tokens" : 1,
    "completion_tokens" : 0,
    "total_tokens" : 1
  }
}

=== Moderation
--> POST /mistralai/v1/moderations
{
  "model" : "mistral-moderation-latest",
  "input" : [ "I am going to hit you." ]
}
<-- 200 [application/json]
{
  "id" : "mod-mock-1",
  "model" : "mistral-moderation-latest",
  "results" : [ {
    "categories" : {
      "sexual" : false,
      "hate_and_discrimination" : false,
      "violence_and_threats" : true,
      "dangerous_and_criminal_content" : false,
      "selfharm" : false,
      "health" : false,
      "financial" : false,
      "law" : false,
      "pii" : false
    },
    "category_scores" : {
      "sexual" : 0.0,
      "hate_and_discrimination" : 0.0,
      "violence_and_threats" : 1.0,
      "dangerous_and_criminal_content" : 0.0,
      "selfharm" : 0.0,
      "health" : 0.0,
      "financial" : 0.0,
      "law" : 0.0,
      "pii" : 0.0
    }
  } ]
}

=== Error
--> POST /mistralai/v1/chat/completions
{
  "model" : "mistral-small-latest",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ]
}
<-- 429 [application/json]
{
  "detail" : [ {
    "loc" : [ "body" ],
    "msg" : "slow down",
    "type" : "mock_error"
  } ]
}
OpenShift AI
=== Chat
--> POST /openshift-ai/api/v1/task/text-generation
{
  "model_id" : "mock-model",
  "inputs" : "Hi"
}
<-- 200 [application/json]
{
  "generated_text" : "Hello from the mock",
  "generated_tokens" : 7,
  "finish_reason" : "EOS_TOKEN",
  "producer_id" : {
    "name" : "Text Generation",
    "version" : "0.1.0"
  },
  "input_token_count" : 12,
  "seed" : null
}

=== Error
--> POST /openshift-ai/api/v1/task/text-generation
{
  "model_id" : "mock-model",
  "inputs" : "Hi"
}
<-- 429 [application/json]
{
  "details" : "slow down",
  "code" : 429,
  "id" : "mock-error"
}
Ollama
=== Chat
--> POST /ollama/api/chat
{
  "model" : "llama3.2",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : false
}
<-- 200 [application/json]
{
  "model" : "llama3.2",
  "created_at" : "2026-01-01T00:00:00Z",
  "message" : {
    "role" : "assistant",
    "content" : "Hello from the mock"
  },
  "done" : true,
  "done_reason" : "stop",
  "total_duration" : 0,
  "load_duration" : 0,
  "prompt_eval_count" : 12,
  "prompt_eval_duration" : 0,
  "eval_count" : 7,
  "eval_duration" : 0
}

=== Chat with a tool call
--> POST /ollama/api/chat
{
  "model" : "llama3.2",
  "messages" : [ {
    "role" : "user",
    "content" : "What is the weather in Athens?"
  } ],
  "stream" : false,
  "tools" : [ {
    "type" : "function",
    "function" : {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "object",
        "properties" : {
          "city" : {
            "type" : "string"
          }
        },
        "required" : [ "city" ]
      }
    }
  } ]
}
<-- 200 [application/json]
{
  "model" : "llama3.2",
  "created_at" : "2026-01-01T00:00:00Z",
  "message" : {
    "role" : "assistant",
    "content" : "",
    "tool_calls" : [ {
      "function" : {
        "name" : "get_weather",
        "arguments" : {
          "city" : "Athens"
        }
      }
    } ]
  },
  "done" : true,
  "done_reason" : "stop",
  "total_duration" : 0,
  "load_duration" : 0,
  "prompt_eval_count" : 0,
  "prompt_eval_duration" : 0,
  "eval_count" : 0,
  "eval_duration" : 0
}

=== Streaming chat
--> POST /ollama/api/chat
{
  "model" : "llama3.2",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : true
}
<-- 200 [application/x-ndjson]
{"model":"llama3.2","created_at":"2026-01-01T00:00:00Z","message":{"role":"assistant","content":"Hello"},"done":false}
{"model":"llama3.2","created_at":"2026-01-01T00:00:00Z","message":{"role":"assistant","content":" from"},"done":false}
{"model":"llama3.2","created_at":"2026-01-01T00:00:00Z","message":{"role":"assistant","content":" the"},"done":false}
{"model":"llama3.2","created_at":"2026-01-01T00:00:00Z","message":{"role":"assistant","content":" mock"},"done":false}
{"model":"llama3.2","created_at":"2026-01-01T00:00:00Z","message":{"role":"assistant","content":""},"done":true,"done_reason":"stop","total_duration":0,"load_duration":0,"prompt_eval_count":12,"prompt_eval_duration":0,"eval_count":7,"eval_duration":0}

=== Embeddings
--> POST /ollama/api/embed
{
  "model" : "nomic-embed-text",
  "input" : [ "Hello" ]
}
<-- 200 [application/json]
{
  "model" : "nomic-embed-text",
  "embeddings" : [ [ 0.1, 0.2, 0.3 ] ],
  "total_duration" : 0,
  "load_duration" : 0,
  "prompt_eval_count" : 1
}

=== Error
--> POST /ollama/api/chat
{
  "model" : "llama3.2",
  "messages" : [ {
    "role" : "user",
    "content" : "Hi"
  } ],
  "stream" : false
}
<-- 429 [application/json]
{
  "error" : "slow down"
}
Cohere
=== Scoring
--> POST /cohere/v2/rerank
{
  "model" : "rerank-v3.5",
  "query" : "What is the capital of Greece?",
  "documents" : [ "Paris is the capital of France.", "Athens is the capital of Greece." ]
}
<-- 200 [application/json]
{
  "id" : "00000000-0000-0000-0000-000000000000",
  "results" : [ {
    "index" : 1,
    "relevance_score" : 0.9
  }, {
    "index" : 0,
    "relevance_score" : 0.2
  } ],
  "meta" : {
    "api_version" : {
      "version" : "2"
    },
    "billed_units" : {
      "search_units" : 1
    }
  }
}

=== Error
--> POST /cohere/v2/rerank
{
  "model" : "rerank-v3.5",
  "query" : "What is the capital of Greece?",
  "documents" : [ "Paris is the capital of France.", "Athens is the capital of Greece." ]
}
<-- 429 [application/json]
{
  "message" : "slow down"
}
Hugging Face
=== Chat
--> POST /huggingface/chat
{
  "inputs" : "Hi",
  "parameters" : {
    "return_full_text" : false
  },
  "options" : {
    "wait_for_model" : true
  }
}
<-- 200 [application/json]
[ {
  "generated_text" : "Hello from the mock"
} ]

=== Embeddings
--> POST /huggingface/embeddings
{
  "inputs" : [ "Hello" ],
  "options" : {
    "wait_for_model" : true
  }
}
<-- 200 [application/json]
[ [ 0.1, 0.2, 0.3 ] ]

=== Error
--> POST /huggingface/chat
{
  "inputs" : "Hi",
  "parameters" : {
    "return_full_text" : false
  },
  "options" : {
    "wait_for_model" : true
  }
}
<-- 429 [application/json]
{
  "error" : "slow down",
  "error_type" : "overloaded"
}
TypeSafe
=== Decision
--> POST /typesafe/v1/systemone
{
  "model" : "jev-latest",
  "state" : {
    "ticket" : "Help! My payouts have been failing for 3 days."
  },
  "questions" : {
    "team" : {
      "type" : "choice",
      "instructions" : "Which team should handle this?",
      "criteria" : {
        "billing" : "Payments, invoicing, refunds",
        "support" : "Bugs and outages"
      }
    },
    "urgent" : {
      "type" : "noul",
      "instructions" : "Does this need attention today?",
      "criteria" : {
        "true" : "Money is not reaching the customer",
        "false" : "It can wait"
      }
    }
  }
}
<-- 200 [application/json]
{
  "model" : "jev-latest",
  "answers" : {
    "team" : {
      "type" : "choice",
      "choice" : "billing",
      "probabilities" : {
        "billing" : 0.88,
        "support" : 0.12
      },
      "confidence" : 0.81
    },
    "urgent" : {
      "type" : "noul",
      "noul" : 0.95
    }
  },
  "usage" : {
    "input_tokens" : 318,
    "output_tokens" : 34
  }
}

=== Error
--> POST /typesafe/v1/systemone
{
  "model" : "jev-latest",
  "state" : {
    "ticket" : "Help! My payouts have been failing for 3 days."
  },
  "questions" : {
    "team" : {
      "type" : "choice",
      "instructions" : "Which team should handle this?",
      "criteria" : {
        "billing" : "Payments, invoicing, refunds",
        "support" : "Bugs and outages"
      }
    },
    "urgent" : {
      "type" : "noul",
      "instructions" : "Does this need attention today?",
      "criteria" : {
        "true" : "Money is not reaching the customer",
        "false" : "It can wait"
      }
    }
  }
}
<-- 429 [application/json]
{
  "error" : "slow down"
}
watsonx
=== Chat
--> POST /watsonx/ml/v1/text/chat?version=2025-04-23
{
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "project_id" : "mock-project",
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "id" : "chat-mock-1",
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "model" : "ibm/granite-3-3-8b-instruct",
  "created" : 1767225600,
  "created_at" : "2026-01-01T00:00:00Z",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "content" : "Hello from the mock"
    },
    "finish_reason" : "stop"
  } ],
  "usage" : {
    "prompt_tokens" : 12,
    "completion_tokens" : 7,
    "total_tokens" : 19
  }
}

=== Chat with a tool call
--> POST /watsonx/ml/v1/text/chat?version=2025-04-23
{
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "project_id" : "mock-project",
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "tools" : [ {
    "type" : "function",
    "function" : {
      "name" : "get_weather",
      "description" : "Returns the weather in a city",
      "parameters" : {
        "type" : "object",
        "properties" : {
          "city" : {
            "type" : "string"
          }
        },
        "required" : [ "city" ]
      }
    }
  } ]
}
<-- 200 [application/json]
{
  "id" : "chat-mock-1",
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "model" : "ibm/granite-3-3-8b-instruct",
  "created" : 1767225600,
  "created_at" : "2026-01-01T00:00:00Z",
  "choices" : [ {
    "index" : 0,
    "message" : {
      "role" : "assistant",
      "tool_calls" : [ {
        "id" : "call_mock_0",
        "type" : "function",
        "function" : {
          "name" : "get_weather",
          "arguments" : "{\"city\":\"Athens\"}"
        }
      } ]
    },
    "finish_reason" : "tool_calls"
  } ],
  "usage" : {
    "prompt_tokens" : 0,
    "completion_tokens" : 0,
    "total_tokens" : 0
  }
}

=== Streaming chat
--> POST /watsonx/ml/v1/text/chat_stream?version=2025-04-23
{
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "project_id" : "mock-project",
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [text/event-stream]
event: message
data: {"id":"chat-mock-1","model_id":"ibm/granite-3-3-8b-instruct","model":"ibm/granite-3-3-8b-instruct","created":1767225600,"created_at":"2026-01-01T00:00:00Z","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}

event: message
data: {"id":"chat-mock-1","model_id":"ibm/granite-3-3-8b-instruct","model":"ibm/granite-3-3-8b-instruct","created":1767225600,"created_at":"2026-01-01T00:00:00Z","choices":[{"index":0,"delta":{"role":"assistant","content":" from"},"finish_reason":null}]}

event: message
data: {"id":"chat-mock-1","model_id":"ibm/granite-3-3-8b-instruct","model":"ibm/granite-3-3-8b-instruct","created":1767225600,"created_at":"2026-01-01T00:00:00Z","choices":[{"index":0,"delta":{"role":"assistant","content":" the"},"finish_reason":null}]}

event: message
data: {"id":"chat-mock-1","model_id":"ibm/granite-3-3-8b-instruct","model":"ibm/granite-3-3-8b-instruct","created":1767225600,"created_at":"2026-01-01T00:00:00Z","choices":[{"index":0,"delta":{"role":"assistant","content":" mock"},"finish_reason":null}]}

event: message
data: {"id":"chat-mock-1","model_id":"ibm/granite-3-3-8b-instruct","model":"ibm/granite-3-3-8b-instruct","created":1767225600,"created_at":"2026-01-01T00:00:00Z","choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":7,"total_tokens":19}}

=== Embeddings
--> POST /watsonx/ml/v1/text/embeddings?version=2025-04-23
{
  "model_id" : "ibm/granite-embedding-278m-multilingual",
  "project_id" : "mock-project",
  "inputs" : [ "Hello" ]
}
<-- 200 [application/json]
{
  "model_id" : "ibm/granite-embedding-278m-multilingual",
  "results" : [ {
    "embedding" : [ 0.1, 0.2, 0.3 ]
  } ],
  "created_at" : "2026-01-01T00:00:00Z",
  "input_token_count" : 1
}

=== Moderation
--> POST /watsonx/ml/v1/text/detection?version=2025-04-23
{
  "input" : "I am going to hit you.",
  "detectors" : {
    "hap" : { }
  },
  "project_id" : "mock-project"
}
<-- 200 [application/json]
{
  "detections" : [ {
    "start" : 0,
    "end" : 22,
    "detection_type" : "hap",
    "detection" : "I am going to hit you.",
    "score" : 1.0
  } ]
}

=== Scoring
--> POST /watsonx/ml/v1/text/rerank?version=2025-04-23
{
  "model_id" : "cross-encoder/ms-marco-minilm-l-12-v2",
  "project_id" : "mock-project",
  "query" : "What is the capital of Greece?",
  "inputs" : [ {
    "text" : "Paris is the capital of France."
  }, {
    "text" : "Athens is the capital of Greece."
  } ]
}
<-- 200 [application/json]
{
  "model_id" : "cross-encoder/ms-marco-minilm-l-12-v2",
  "results" : [ {
    "index" : 0,
    "score" : 0.2
  }, {
    "index" : 1,
    "score" : 0.9
  } ],
  "created_at" : "2026-01-01T00:00:00Z",
  "input_token_count" : 2
}

=== Error
--> POST /watsonx/ml/v1/text/chat?version=2025-04-23
{
  "model_id" : "ibm/granite-3-3-8b-instruct",
  "project_id" : "mock-project",
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "type" : "text",
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
{
  "trace" : "00000000-0000-0000-0000-000000000000",
  "status_code" : 429,
  "errors" : [ {
    "code" : "token_quota_reached",
    "message" : "slow down"
  } ]
}
Bedrock
=== Chat
--> POST /bedrock/model/us.amazon.nova-lite-v1%3A0/converse
{
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/json]
{
  "output" : {
    "message" : {
      "role" : "assistant",
      "content" : [ {
        "text" : "Hello from the mock"
      } ]
    }
  },
  "stopReason" : "end_turn",
  "usage" : {
    "inputTokens" : 12,
    "outputTokens" : 7,
    "totalTokens" : 19
  },
  "metrics" : {
    "latencyMs" : 0
  }
}

=== Chat with a tool call
--> POST /bedrock/model/us.amazon.nova-lite-v1%3A0/converse
{
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "text" : "What is the weather in Athens?"
    } ]
  } ],
  "toolConfig" : {
    "tools" : [ {
      "toolSpec" : {
        "name" : "get_weather",
        "description" : "Returns the weather in a city",
        "inputSchema" : {
          "json" : {
            "type" : "object",
            "properties" : {
              "city" : {
                "type" : "string"
              }
            },
            "required" : [ "city" ]
          }
        }
      }
    } ]
  }
}
<-- 200 [application/json]
{
  "output" : {
    "message" : {
      "role" : "assistant",
      "content" : [ {
        "toolUse" : {
          "toolUseId" : "tooluse_mock_0",
          "name" : "get_weather",
          "input" : {
            "city" : "Athens"
          }
        }
      } ]
    }
  },
  "stopReason" : "tool_use",
  "usage" : {
    "inputTokens" : 0,
    "outputTokens" : 0,
    "totalTokens" : 0
  },
  "metrics" : {
    "latencyMs" : 0
  }
}

=== Streaming chat
--> POST /bedrock/model/us.amazon.nova-lite-v1%3A0/converse-stream
{
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 200 [application/vnd.amazon.eventstream]
event-type: messageStart {"role":"assistant"}
event-type: contentBlockDelta {"delta":{"text":"Hello"},"contentBlockIndex":0}
event-type: contentBlockDelta {"delta":{"text":" from"},"contentBlockIndex":0}
event-type: contentBlockDelta {"delta":{"text":" the"},"contentBlockIndex":0}
event-type: contentBlockDelta {"delta":{"text":" mock"},"contentBlockIndex":0}
event-type: contentBlockStop {"contentBlockIndex":0}
event-type: messageStop {"stopReason":"end_turn"}
event-type: metadata {"usage":{"inputTokens":12,"outputTokens":7,"totalTokens":19},"metrics":{"latencyMs":0}}

=== Embeddings (Titan)
--> POST /bedrock/model/amazon.titan-embed-text-v2%3A0/invoke
{
  "inputText" : "Hello"
}
<-- 200 [application/json]
{
  "embedding" : [ 0.1, 0.2, 0.3 ],
  "inputTextTokenCount" : 1,
  "embeddingsByType" : {
    "float" : [ 0.1, 0.2, 0.3 ]
  }
}

=== Embeddings (Cohere)
--> POST /bedrock/model/cohere.embed-english-v3/invoke
{
  "texts" : [ "Hello" ],
  "input_type" : "search_document"
}
<-- 200 [application/json]
{
  "id" : "mock-embed-1",
  "response_type" : "embeddings_floats",
  "embeddings" : [ [ 0.1, 0.2, 0.3 ] ],
  "texts" : [ "Hello" ]
}

=== Error
--> POST /bedrock/model/us.amazon.nova-lite-v1%3A0/converse
{
  "messages" : [ {
    "role" : "user",
    "content" : [ {
      "text" : "Hi"
    } ]
  } ]
}
<-- 429 [application/json]
x-amzn-ErrorType: ThrottlingException
{
  "message" : "slow down"
}

Precedence

The mock sets the provider URL with higher priority than application.properties, environment variables and system properties. A test’s overrideRuntimeConfigKey or a test profile override beats the mock. In @QuarkusIntegrationTest the provider URLs reach the jar as system properties, so there they also beat application.properties. Identity placeholders are not published for keys you configured, so your own API key still wins there.

Disabling

The mock runs as a Dev Service. If quarkus.langchain4j.mock-api.enabled is true while Dev Services are disabled globally (quarkus.devservices.enabled=false), the build fails, so the application never calls the real provider by mistake. Set quarkus.langchain4j.mock-api.enabled=false to turn the mock off.

Port

By default the mock listens on a free port chosen at start. A fixed quarkus.langchain4j.mock-api.port conflicts with parallel test JVMs, such as Surefire with forkCount greater than 1, because each one starts its own mock; the start then fails with a message naming the port.

Configuration reference

The options live in the core configuration under quarkus.langchain4j.mock-api, so they are listed in the core configuration reference.

Property Default Description

quarkus.langchain4j.mock-api.enabled

false

Whether the mock model API is enabled. Requires this extension; when enabled, the LangChain4j dev services are not started.

quarkus.langchain4j.mock-api.port

random free port

The port the mock server listens on.

quarkus.langchain4j.mock-api.default-chat-reply

a fixed sentence

The reply returned for chat requests when no stub matches.

quarkus.langchain4j.mock-api.default-embedding-dimension

4

The dimension of the embeddings returned when no stub matches.

The keys below are published by the dev service for the application and are not meant to be set by hand.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

The URL of the running mock.

Environment variable: QUARKUS_LANGCHAIN4J_MOCK_API_URL

string

The endpoint config keys of every model in use, each as key=url, that the mock points at itself.

Environment variable: QUARKUS_LANGCHAIN4J_MOCK_API_OVERRIDES

list of string