Skip to content

Fix/eager logger interpolation and dead options#662

Merged
crmne merged 2 commits into
crmne:mainfrom
sergiobayona:fix/eager-logger-interpolation-and-dead-options
Mar 9, 2026
Merged

Fix/eager logger interpolation and dead options#662
crmne merged 2 commits into
crmne:mainfrom
sergiobayona:fix/eager-logger-interpolation-and-dead-options

Conversation

@sergiobayona

Copy link
Copy Markdown
Contributor

What this does

Commit 1: Removes response: false from Connection.basic — the same unrecognized Faraday logger option removed from setup_logging in #661. Faraday's logging formatter (v2.14.1) only recognizes :headers, :bodies, :errors, and :log_level (source).

Commit 2: Converts the remaining eager logger.debug call in OpenRouter::Images to lazy block form. This is the same pattern fixed across other providers in 90b8dd1 — the identical call in gemini/images.rb was converted but this one was missed.

Type of change

  • [ X] Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • [ X] I read the Contributing Guide
  • [ X] This aligns with RubyLLM's focus on LLM communication
  • [ X] This isn't application-specific logic that belongs in user code
  • [ X] This benefits most users, not just my specific use case

Required for new features

  • I opened an issue before writing code and received maintainer approval
  • Linked issue: #___

PRs for new features or enhancements without a prior approved issue will be closed.

Quality check

  • [ X] I ran overcommit --install and all hooks pass
  • [ X] I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name]
    • [ X] All tests pass: bundle exec rspec
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

AI-generated code

  • I used AI tools to help write this code
  • I have reviewed and understand all generated code (required if above is checked)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • [ X] No API changes

Same issue fixed in `setup_logging` (merged via crmne#562). Faraday's
logging formatter (v2.14.1) only recognizes `:headers`, `:bodies`,
`:errors`, and `:log_level`.

Ref: https://github.com/lostisland/faraday/blob/v2.14.1/lib/faraday/logging/formatter.rb#L11
Same pattern fixed in 90b8dd1 for other providers (e.g.
gemini/images.rb). This one was missed.
@crmne
crmne merged commit 5a5d806 into crmne:main Mar 9, 2026
23 checks passed
@codecov

codecov Bot commented Mar 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.50%. Comparing base (65729fd) to head (81656b9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #662   +/-   ##
=======================================
  Coverage   81.50%   81.50%           
=======================================
  Files         116      116           
  Lines        5483     5483           
  Branches     1432     1432           
=======================================
  Hits         4469     4469           
  Misses       1014     1014           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants