Replace SUPPORT_REASONING_EFFORT_MODELS with litellm's model metadata plus the config override
Author: IsmaelMartinezCreated Sep 18, 2026Updated Sep 18, 2026
Labelshelp wantedRefactoringMedium Effort Issue
Summary
pr_agent/algo/__init__.py:465 keeps a hand-maintained list of 14 model ids that may receive reasoning_effort, read only by litellm_ai_handler.py:2173. Every new reasoning model needs a PR to extend it (#3413, #3309, #3459 are the last three), and a model missing from it has its configured effort dropped silently.
Proposal
Decide from litellm's own metadata (litellm.supports_reasoning(model), in the bundled cost map pinned by #3475) and keep config.additional_reasoning_effort_models from #3460 as the operator escape hatch for endpoints litellm does not know. Delete the list once both paths cover today's entries.
Cases the replacement must keep passing
- The six bare Grok ids resolve only with the
xai/prefix in litellm (measured:supports_reasoningis true for 8 of the 14 entries, false for all six Grok ids as listed), so the lookup needs the provider-prefixed form, includingopenrouter/xai/...and:nitro-style suffixes. - Gemini 2.5 keeps its thinking-budget mapping; Gemini 3.x follows #2998 and #3434.
gpt-5.xclamping from #3273 is unaffected.test_litellm_reasoning_effort.pyis the regression suite; the 26-model matrix from the #3460 review is the acceptance check (identical kwargs before and after).
Depends on #3460 landing first.
Source: The-PR-Agent/pr-agent