Skip to content

mokksy/ai-mocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

832 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Mocks

Maven Central Kotlin CI GitHub branch status Codacy Badge Codacy Coverage codecov CodeRabbit Pull Request Reviews

Documentation API Reference Ask DeepWiki

Kotlin API Java

AI-Mocks are mock LLM (Large Language Model) servers built on Mokksy, a mock server inspired by WireMock, with support for response streaming and Server-Side Events (SSE). They are designed to build, test, and mock LLM responses for development purposes.

Buy me a Coffee

Mokksy

Mokksy is a mock HTTP server built with Kotlin and Ktor. It addresses the limitations of WireMock by supporting true SSE and streaming responses, making it extreamly useful for integration testing LLM clients.

AI-Mocks

AI-Mocks is a set of specialized mock server implementations (e.g., mocking OpenAI API) built using Mokksy.

It supports mocking following AI services:

  1. OpenAI - ai-mocks-openai
  2. Anthropic - ai-mocks-anthropic
  3. Google VertexAI Gemini - ai-mocks-gemini
  4. Ollama - ai-mocks-ollama
  5. Agent-to-Agent (A2A) Protocol - ai-mocks-a2a

Feature Support Matrix

Feature OpenAI Anthropic Gemini Ollama A2A
Chat Completions βœ… βœ… βœ… βœ… βœ…
Streaming βœ… βœ… βœ… βœ… βœ…
Embeddings βœ… ❌ ❌ βœ… ❌
Moderation βœ… ❌ ❌ ❌ ❌
Additional APIs Responses - - Generate Full A2A Protocol
(11 endpoints)

How to build

Building project locally:

./gradlew build

or using Make:

make

Contributing

I do welcome contributions! Please see the Contributing Guidelines for details.

About

πŸ€– AI-Mocks is a Kotlin-based toolkit for mocking and testing LLM APIs with real streaming and SSE support. Simulate OpenAI, Anthropic, Gemini, Ollama, and A2A services locally for reliable integration testing.

Topics

Resources

License

Contributing

Stars

50 stars

Watchers

0 watching

Forks

Sponsor this project

  •  

Contributors