Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

elthariel
Copy link
Contributor

What this does

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

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

Quality check

  • I ran overcommit --install and all hooks pass
    • No because this is broken
  • I tested my changes thoroughly
  • [] I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

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

Related issues

Fixes #384

Unrelated Notes

Submitting a PR has never been harder on a small/medium Ruby project. Too many stuff to fill. I'm not an AI myself

@crmne
Copy link
Owner

crmne commented Sep 2, 2025

Thanks for catching this bug! The nil check for arguments is definitely needed.

I noticed the tests weren't run with updated VCR cassettes. For provider changes like this, you need to re-record them to ensure the fix works with real API responses:

bundle exec rake vcr:record[openai,openrouter]

This will delete the existing OpenAI and OpenRouter cassettes and re-run all tests to record fresh ones.

Could you also clarify what issue you encountered with the overcommit hooks? If there's a problem with our setup, I'd like to fix it. As an alternative, you can run bundle exec rubocop manually.

I've just updated our PR template to make the VCR requirement clearer for future contributors. Your feedback about the process being difficult is noted - if you have specific suggestions for improvements, I'm open to them.

The fix itself looks good and definitely belongs in the codebase. Once we have passing tests, we can merge this.

@elthariel
Copy link
Contributor Author

elthariel commented Sep 2, 2025

I sadly do not have OpenAI keys, and I assume these will be required to run those tests ?

As for the overcommit thing, I hereby rescind my comment. I was the culprit. I confused this upstream repo with my company's fork and was working from an old version of the codebase.

Using the current version works well. Please accept my sincere apologies πŸ™

@elthariel elthariel force-pushed the fix-empty-arguments-openrouter branch from 99967a4 to 167d667 Compare September 2, 2025 17:44
@crmne
Copy link
Owner

crmne commented Sep 2, 2025

Apology accepted @elthariel!

I'll try the other OpenAI-based providers. Could you simply upload the updated VCRs for OpenRouter?

@elthariel elthariel changed the title Issue #384: Handle missing function.arguments in OpenAI tool_calls Handle missing function.arguments in OpenAI tool_calls Sep 2, 2025
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 84.65%. Comparing base (34e8d75) to head (126d1e0).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #385   +/-   ##
=======================================
  Coverage   84.65%   84.65%           
=======================================
  Files          35       35           
  Lines        1825     1825           
  Branches      492      492           
=======================================
  Hits         1545     1545           
  Misses        280      280           

β˜” 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.

@crmne crmne merged commit cd11b52 into crmne:main Sep 3, 2025
14 checks passed
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.

[BUG] Qwen3 Thinking on OpenRouter + Tool without argument breaks
2 participants