mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Add reasoning_effort parameter support for reasoning models (#3651)

Open Priyanshjain10 opened this issue 2 months ago • 1 comments

**## DescriptionThis PR adds support for the reasoning_effort parameter for reasoning models in LLMBase. The change makes it possible for advanced models (including future GPT-5 and similar) to receive and handle a reasoning_effort config parameter properly.

Updated the constructor to inject a default value for reasoning_effort if not present.

Modified _get_supported_params to include reasoning_effort for reasoning models only.

No new dependencies introduced.

Fixes #3651

**## Typef change

New feature (non-breaking change which adds functionality)

**## How Has This Beenested?

Tested using Google Colab by modifying mem0/llms/base.py, committing and pushing the update.

Confirmed that reasoning_effort support works as intended and code is recognized by git.

Test Script (please provide if your project requires scripts)

**## Checklist

My code follows the style guidelines of this project

I have performed a self-review of my own code

I have commented my code, particularly in hard-to-understand areas

I have made corresponding changes to the documentation (N/A - implementation only)

My changes generate no new warnings

I have added tests that prove my fix is effective or that my feature works (N/A - small feature)

New and existing unit tests pass locally with my changes (basic testing in Colab)

Any dependent changes have been merged and published in downstream modules (N/A)

I have checked my code and corrected any misspellings

For Hacktoberfest: This PR is submitted as part of Hacktoberfest.

**## Maintainer Checklist [ ] closes #3651

Made sure Checks passed

This pull request is submitted for Hacktoberfest 2025.

Priyanshjain10 avatar Oct 29 '25 13:10 Priyanshjain10

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 29 '25 13:10 CLAassistant

@mem0ai Maintainers: Change is fully implemented as requested in #3651 and self-tested in Colab, can you re-run the status checks if needed and merge when ready?

Priyanshjain10 avatar Nov 19 '25 11:11 Priyanshjain10