Repository navigation
v0.1.1
ai-protocol-mock v0.1.1
Unified mock server for AI-Protocol runtimes. This release adds provider contract support, manifest auto-sync validation, and expanded test coverage.
What's Changed
New Features
-
Provider Contract Endpoint (
GET /providers)- Returns provider contracts from manifests:
provider_id,api_style,chat_path,name - Enables runtimes to discover mock capabilities dynamically
- Returns provider contracts from manifests:
-
Manifest Sync Enhancements
--tag REFoption to pin to specific ai-protocol release (e.g.v0.7.1,main)- GitHub API discovery for
v1/modelsin addition tov1/providers - Daily GitHub Action to validate sync script
-
GitHub Actions CI
- Test job: pytest, manifest sync
- Lint job: ruff format & check
- Sync workflow: daily manifest validation
Fixes & Improvements
-
HTTP Provider
- Support ai-protocol v1 manifest format (
endpoints.chat.pathandendpoint.chat) - Fix Anthropic response: use
input_tokens/output_tokensinstead of OpenAI-style usage - Register both bare and
/v1-prefixed chat paths for client compatibility
- Support ai-protocol v1 manifest format (
-
Tests
- Fix httpx compatibility: use
ASGITransportfor ASGI app testing - Add tests: status, providers, streaming, MCP tools/call, initialize
- 9 tests total, all passing
- Fix httpx compatibility: use
Documentation
- README: new endpoints, sync options, development & runtime testing
- README_CN: aligned with English version
Compatibility
- ai-lib-python:
MOCK_HTTP_URL=http://localhost:4010 MOCK_MCP_URL=http://localhost:4010/mcp pytest tests/ -v - ai-lib-rust:
MOCK_HTTP_URL=http://localhost:4010 cargo test -- --ignored --nocapture - Python >= 3.10
- Docker:
docker-compose up -d