Skip to content

llm: mock Anthropic backend (test fixture) #2493

Description

@jfallows

Summary

A mock Anthropic-shaped backend server (streaming + non-streaming /v1/messages) for use in cross-dialect integration tests and (later) examples/llm.proxy, mirroring the mock OpenAI backend from M2.

Scope

  • Streaming responses: realistic named-typed-event sequences (message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop), multi-block content, input_json_delta tool streaming.
  • Non-streaming responses: top-level response object including usage.
  • Deterministic/scriptable enough to drive the round-trip and cross-dialect tests in this milestone.

Acceptance criteria

  • Mock server usable from IT tests and a docker-compose-style example, mirroring the mock OpenAI backend's structure for consistency.
  • Covers both streaming and non-streaming Anthropic response shapes, including multi-block and tool-call content.

Depends on

dialect: anthropic (this milestone, for response shapes to mirror), mock OpenAI backend (M2, as the sibling to mirror).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions