Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fixture load validation warns about malformed `citations` and `files`, with the same problem description the 500 carries (the 500 message adds an `aimock: invalid fixture` prefix; the warning adds which 500 the requests answer). The fixture still loads.
- `InvalidFixtureOutputError` (the error behind `aimock_invalid_fixture_citation` and `aimock_invalid_fixture_file`) is exported from `@copilotkit/aimock`.
- Opt-in fixture `nonStreamingTimingAllProviders: true` delays non-streaming replies on OpenAI chat, Anthropic, Responses, Gemini/Vertex, Gemini Interactions, Cohere, Bedrock invoke/converse and Ollama; `nonStreamingTiming` is unchanged (OpenAI chat only); error replies are never delayed. On the OpenAI Responses API the wait also counts the stream frames that fixture `citations` and generated `files` add
- Raw passthrough fixtures: a `raw` response (`wire`, `events`, `json`, optional `status`, `headers`, and `done` on `openai-chat`) sends provider events or JSON exactly as written, with only the named wire's framing, on the HTTP LLM wires (OpenAI Responses and Chat Completions, Anthropic, Gemini/Vertex, Gemini Interactions, Cohere, Ollama `/api/chat` as `ollama` and `/api/generate` as `ollama-generate`, Bedrock invoke and converse). A raw fixture matches only its own wire. A request whose mode has no body answers that wire's 500 with `aimock_raw_mode_unavailable`; an invalid raw fixture added in code answers a 500 with `aimock_raw_fixture_invalid`, and `--validate-on-load` reports it at load. Streaming timing, truncation, disconnects and chaos apply; misbehavior faults skip raw fixtures. A non-streaming raw reply follows `nonStreamingTiming` like a typed fixture: `nonStreamingTiming: true` delays it on OpenAI Chat Completions only, `nonStreamingTimingAllProviders: true` on every provider; a raw reply with status 400 or above is never delayed, and with a `json` it answers JSON even to a streaming request. WebSocket Responses answers a raw fixture with an error event with the code `aimock_raw_mode_unavailable`. New exported types `RawResponse`, `RawWireId` and `WireId` ([#549](https://github.com/CopilotKit/aimock/issues/549))

### Fixed

Expand Down
5 changes: 5 additions & 0 deletions docs/aws-bedrock/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ <h1>AWS Bedrock</h1>
against the Bedrock-format requests, returning responses in the authentic Bedrock format
including AWS Event Stream binary framing for streaming.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "bedrock-invoke"</code> or <code>wire: "bedrock-converse"</code>.
</p>

<h2>How It Works</h2>
<p>
Expand Down
5 changes: 5 additions & 0 deletions docs/chat-completions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ <h1>OpenAI Chat Completions</h1>
non-streaming JSON responses, including text content and tool calls. This is the most
commonly used endpoint.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "openai-chat"</code>.
</p>

<h2>Endpoint</h2>
<table class="endpoint-table">
Expand Down
5 changes: 5 additions & 0 deletions docs/claude-messages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ <h1>Anthropic Claude Messages API</h1>
streaming SSE using <code>event:</code> + <code>data:</code> format, including content
blocks for text and tool use.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "anthropic"</code>.
</p>

<h2>Endpoint</h2>
<table class="endpoint-table">
Expand Down
4 changes: 4 additions & 0 deletions docs/cohere/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ <h1>Cohere v2 Chat API</h1>
streaming events and dual usage tracking (<code>billed_units</code> and
<code>tokens</code>).
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with <code>wire: "cohere"</code>.
</p>

<h2>Endpoint</h2>
<table class="endpoint-table">
Expand Down
8 changes: 8 additions & 0 deletions docs/fixtures/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@ <h2>Response Types</h2>
usage envelopes
</td>
</tr>
<tr>
<td>Raw</td>
<td>raw.wire, raw.events?, raw.json?, raw.status?, raw.headers?, raw.done?</td>
<td>
Provider events or JSON sent as written, framed for one wire. See
<a href="/raw-passthrough">Raw Passthrough Fixtures</a>.
</td>
</tr>
</tbody>
</table>

Expand Down
5 changes: 5 additions & 0 deletions docs/gemini-interactions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ <h1>Gemini Interactions API</h1>
<code>outputs[]</code> instead of nested <code>candidates[].content.parts[]</code>, and
typed SSE events with an <code>event_type</code> field inside each JSON payload.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "gemini-interactions"</code>.
</p>

<h2>Endpoint</h2>
<table class="endpoint-table">
Expand Down
4 changes: 4 additions & 0 deletions docs/gemini/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ <h1>Google Gemini</h1>
<code>streamGenerateContent</code> (SSE) endpoints, plus Gemini Live over WebSocket. The
same fixtures drive all three transports.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with <code>wire: "gemini"</code>.
</p>

<h2>Endpoints</h2>
<table class="endpoint-table">
Expand Down
6 changes: 6 additions & 0 deletions docs/ollama/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ <h1>Ollama</h1>
<code>/api/tags</code> endpoints with NDJSON streaming, matching Ollama's wire format
including its key differences from OpenAI.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "ollama"</code> for <code>/api/chat</code> or
<code>wire: "ollama-generate"</code> for <code>/api/generate</code>.
</p>

<h2>Endpoints</h2>
<table class="endpoint-table">
Expand Down
5 changes: 5 additions & 0 deletions docs/openrouter-chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ <h1>OpenRouter Chat &amp; Router</h1>
<code>cost</code>. Callers on the plain OpenAI base (<code>/v1/&hellip;</code>) are left
byte-for-byte unchanged.
</p>
<p>
To send events or fields aimock does not model yet, use a
<a href="/raw-passthrough">raw passthrough fixture</a> with
<code>wire: "openai-chat"</code>.
</p>

<div class="info-box">
<p>
Expand Down
Loading
Loading