Skip to content

v0.1.1

Choose a tag to compare

@hiddenpath hiddenpath released this 18 Feb 14:53
· 0 commits to master since this release

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
  • Manifest Sync Enhancements

    • --tag REF option to pin to specific ai-protocol release (e.g. v0.7.1, main)
    • GitHub API discovery for v1/models in addition to v1/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.path and endpoint.chat)
    • Fix Anthropic response: use input_tokens/output_tokens instead of OpenAI-style usage
    • Register both bare and /v1-prefixed chat paths for client compatibility
  • Tests

    • Fix httpx compatibility: use ASGITransport for ASGI app testing
    • Add tests: status, providers, streaming, MCP tools/call, initialize
    • 9 tests total, all passing

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

Full Changelog

v0.1.0...v0.1.1