feat(llm): forward configured reasoning_effort to native LLM calls - #26
Merged
Conversation
Add an optional reasoning_effort field to LLMConfig (e.g. low/medium/high/max) and forward it to litellm.acompletion in both chat() and chat_stream() when set. Unset by default so non-OpenAI providers are unaffected. Callers can still override per-call via kwargs.
cgycorey
force-pushed
the
feat/llm-reasoning-effort
branch
from
August 1, 2026 10:57
e57c7e4 to
02290b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional
reasoning_effortfield toLLMConfig(e.g.low/medium/high/max) and forwards it tolitellm.acompletionin bothchat()andchat_stream()when set.Why
Native (OpenOPC Native agent) LLM calls had no way to control model reasoning effort. The field is opt-in: unset by default, so non-OpenAI providers and existing configs are unaffected. Callers can still override per-call via kwargs (the injection skips when
reasoning_effortis already present).Scope
LLMProvidercalls only (both streaming and non-streaming paths — these are the only twolitellm.acompletioncall sites in the codebase).config.model_copy(deep=True).LLMProvider.Tests
tests/test_llm_provider_reasoning_effort.py— 4 tests covering config retention, chat forwarding, chat_stream forwarding, and the unset default (no param added). All pass locally.