[test] Add OpenAI and Anthropic compatibility regression suite
Goal
Add regression coverage for Free-Way's OpenAI-compatible and Anthropic-compatible behavior.
Background
Free-Way bridges local clients to multiple providers, so compatibility regressions are easy to introduce. The current usage regression script is useful, but it does not cover enough protocol behavior.
Suggested scope
Use fixtures or mock provider responses to cover important protocol cases:
- OpenAI non-stream chat completions
- OpenAI streaming SSE chunks, including [DONE]
- Anthropic /v1/messages non-stream response conversion
- Anthropic streaming event conversion
- basic tool call / tool use shapes where practical
- provider error responses such as 401, 429, 500, and non-JSON bodies
- usage normalization expectations
Acceptance criteria
- Add a repeatable test command or extend an existing one.
- Tests do not call real providers.
- Fixtures are small and readable.
- At least one OpenAI path and one Anthropic path are covered.
pm run build and the relevant test command pass.
Hi @GoDiao, this issue looks really interesting and I’d love to work on it.
I’m interested in improving the regression coverage for the OpenAI-compatible and Anthropic-compatible behavior, especially using small mock responses/fixtures so the tests don’t call real providers.
Could you assign this to me if it’s still available? :))
Thanks for picking this up @Flames4fun! Assigned to you. Looking forward to your PR.