Skip to content

test(perplexity): add cassette coverage - #2049

Merged
gold-silver-copper merged 2 commits into
mainfrom
add-perplexity-cassettes
Jul 8, 2026
Merged

test(perplexity): add cassette coverage#2049
gold-silver-copper merged 2 commits into
mainfrom
add-perplexity-cassettes

Conversation

@gold-silver-copper

Copy link
Copy Markdown
Contributor

Summary

  • add Perplexity provider cassette replay/record support
  • add recorded cassettes for completion, Perplexity-specific options, streaming, context, and chat history
  • register Perplexity fixtures in cassette safety checks

Verification

  • cargo fmt
  • RIG_PROVIDER_TEST_MODE=record cargo test -p rig --all-features --test perplexity perplexity::cassette -- --nocapture --test-threads=1
  • RIG_PROVIDER_TEST_MODE=replay cargo test -p rig --all-features --test perplexity perplexity::cassette -- --nocapture --test-threads=1
  • cargo test -p rig --all-features --test perplexity cassette_safety -- --nocapture
  • cargo test -p rig --all-features --test perplexity -- --nocapture --test-threads=1

@gold-silver-copper

Copy link
Copy Markdown
Contributor Author

Added a follow-up commit covering Perplexity-specific #2040 migration pain points with live cassettes:

  • text-only content-part arrays flatten to plain string content
  • tool-exchange history is stripped/remerged for Perplexity's strict alternation
  • unsupported tools + multi-name ToolChoice::Specific are dropped before validation
  • output_schema is dropped instead of sent as response_format

Verification rerun:

  • RIG_PROVIDER_TEST_MODE=record cargo test -p rig --all-features --test perplexity perplexity::cassette::migration_pain_points -- --nocapture --test-threads=1
  • RIG_PROVIDER_TEST_MODE=replay cargo test -p rig --all-features --test perplexity perplexity::cassette -- --nocapture --test-threads=1
  • cargo test -p rig --all-features --test perplexity cassette_safety -- --nocapture
  • cargo test -p rig --all-features --test perplexity -- --nocapture --test-threads=1

@gold-silver-copper
gold-silver-copper added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit ec20bee Jul 8, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
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