Skip to content

Remove 60 MB of the letter 'a' from spec/fixtures/vcr_cassettes #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion spec/ruby_llm/chat_error_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# Configure Psych to allow large input (JRuby's ext provider SnakeYAML has a low limit by default)
Psych::Parser.code_point_limit = 20_000_000 if Psych::Parser.respond_to?(:code_point_limit=)

# Create a huge conversation
# Create a huge conversation (matching <MASSIVE_TEXT> in spec_helper)
massive_text = 'a' * 1_000_000

# Create a few copies in the conversation
Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
config.filter_sensitive_data('<REQUEST_ID>') { |interaction| interaction.response.headers['Request-Id']&.first }
config.filter_sensitive_data('<CF_RAY>') { |interaction| interaction.response.headers['Cf-Ray']&.first }

# Filter large strings used to test "context length exceeded" error handling
config.filter_sensitive_data('<MASSIVE_TEXT>') { 'a' * 1_000_000 }

# Filter cookies
config.before_record do |interaction|
if interaction.response.headers['Set-Cookie']
Expand Down