Skip to content

test(mimo): add completePrompt and advanced streaming tests for Mimo provider#18

Open
proyectoauraorg wants to merge 1 commit into
mainfrom
test/mimo-completePrompt-tests
Open

test(mimo): add completePrompt and advanced streaming tests for Mimo provider#18
proyectoauraorg wants to merge 1 commit into
mainfrom
test/mimo-completePrompt-tests

Conversation

@proyectoauraorg
Copy link
Copy Markdown
Owner

Summary

This PR adds 12 new test cases for the Mimo provider, increasing test coverage from 33 to 45 tests.

New Tests Added

completePrompt tests (8)

  1. Successful response with proper message content
  2. Empty prompt handling
  3. maxTokens parameter passed to API
  4. Thinking/reasoning content in response
  5. reasoningEffort options (low/medium/high)
  6. API error handling with graceful fallback
  7. Empty choices response handling
  8. Special characters and Unicode in prompts

Advanced streaming tests (4)

  1. Malformed JSON chunk resilience
  2. Error events mid-stream handling
  3. Abort signal cancellation
  4. Prompt caching support (cache_control)

Testing

All 45 tests pass with zero warnings:

  • Pre-existing tests: 33
  • New tests: 12
  • Total: 45/45 passing

Motivation

These tests cover critical untested paths in the Mimo provider:

  • Error handling: API errors, malformed responses, empty choices
  • Edge cases: empty prompts, special characters, Unicode
  • Streaming resilience: malformed chunks, error events, cancellation
  • Advanced features: prompt caching, reasoning effort options

This improves reliability and makes future refactoring safer.

Rebased onto main. The completePrompt coverage from the original PR is now
provided by the merged Zoo-Code-Org#210, so this focuses on its net-new contribution:
4 advanced streaming resilience tests (multi-chunk text concatenation,
interleaved reasoning + tool calls, missing usage in final chunk, and
zero-valued cache tokens). 49 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@proyectoauraorg proyectoauraorg force-pushed the test/mimo-completePrompt-tests branch from c30b488 to f5060db Compare May 21, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant