[PR #50] [MERGED] Add automatic thinking model selection and update to latest versions #54

Closed
opened 2026-03-02 04:08:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gadievron/raptor/pull/50
Author: @gadievron
Created: 12/23/2025
Status: Merged
Merged: 12/26/2025
Merged by: @danielcuthbert

Base: mainHead: llm-latest-models-autoselect


📝 Commits (9)

  • c3c3320 Add auto thinking model selection and update to latest versions
  • d8c57eb Fix Cursor bot issues on PR #50
  • 2b34b28 Fix inconsistent model name format in fallback
  • 8951ffc Fix API key extraction and explicit null handling
  • 097326f Fix non-list model_list value crashes iteration loop
  • 925805f Fix null api_key handling and cost calculation
  • 26a91c7 Fix invalid provider when matching by model name alias
  • f1a2e57 Fix null model_name and underlying_model causing TypeError
  • bbf4cc6 Fix empty YAML config causing AttributeError

📊 Changes

1 file changed (+277 additions, -18 deletions)

View changed files

📝 packages/llm_analysis/llm/config.py (+277 -18)

📄 Description

Automatically selects best thinking/reasoning model from LiteLLM config and updates all models to latest versions.

Changes:

  • Add _get_litellm_models() to read config
  • Add _get_best_thinking_model() with priority scoring
  • Update to latest models (GPT-5.2, Gemini 3, Claude 4.5)
  • Use LiteLLM aliases (stable naming)

Priority: Opus 4.5 (110) > GPT-5.2-thinking (105) > Gemini 3 deep-think (100)

Testing: Auto-selection verified, fallback tested
Breaking Changes: None (better defaults)


Note

Introduces automatic selection of a reasoning-capable model from LiteLLM and refreshes model defaults to latest versions.

  • Adds _get_litellm_models and _get_best_thinking_model to read LiteLLM YAML and score/select reasoning models (e.g., claude-opus-4.5, gpt-5.2-thinking, gemini-3-deep-think)
  • Updates _get_default_primary_model to prefer the auto-selected model; refreshes provider defaults (gpt-5.2, claude-sonnet-4.5, gemini-3-pro) with new max_tokens and cost_per_1k_tokens
  • Expands _get_default_fallback_models to include multiple cloud options per provider and first 3 Ollama models; standardizes on LiteLLM aliases
  • Adds yaml dependency and improves debug/log messages

Written by Cursor Bugbot for commit bbf4cc6c1f. This will update automatically on new commits. Configure here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gadievron/raptor/pull/50 **Author:** [@gadievron](https://github.com/gadievron) **Created:** 12/23/2025 **Status:** ✅ Merged **Merged:** 12/26/2025 **Merged by:** [@danielcuthbert](https://github.com/danielcuthbert) **Base:** `main` ← **Head:** `llm-latest-models-autoselect` --- ### 📝 Commits (9) - [`c3c3320`](https://github.com/gadievron/raptor/commit/c3c332082f306c7e484ff42fff86ddb01c28b51d) Add auto thinking model selection and update to latest versions - [`d8c57eb`](https://github.com/gadievron/raptor/commit/d8c57ebc53a2ead3884a6d5ca2cd108ad133de5d) Fix Cursor bot issues on PR #50 - [`2b34b28`](https://github.com/gadievron/raptor/commit/2b34b2833ea46943981bddcc1e72a4a566baf787) Fix inconsistent model name format in fallback - [`8951ffc`](https://github.com/gadievron/raptor/commit/8951ffcae8531b8db685c67fa8bef36d1b7a0c82) Fix API key extraction and explicit null handling - [`097326f`](https://github.com/gadievron/raptor/commit/097326f8cf806232ef00408847d3f954632a36c4) Fix non-list model_list value crashes iteration loop - [`925805f`](https://github.com/gadievron/raptor/commit/925805fd8a4624299657a571773394becdc75037) Fix null api_key handling and cost calculation - [`26a91c7`](https://github.com/gadievron/raptor/commit/26a91c78b1f35fd20892f409658a5a7300cd3b12) Fix invalid provider when matching by model name alias - [`f1a2e57`](https://github.com/gadievron/raptor/commit/f1a2e57daf55bf8aefa9b6fcf0a32dd8ad36c936) Fix null model_name and underlying_model causing TypeError - [`bbf4cc6`](https://github.com/gadievron/raptor/commit/bbf4cc6c1fbcb53cb1015bd94d58548912eb300e) Fix empty YAML config causing AttributeError ### 📊 Changes **1 file changed** (+277 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/llm_analysis/llm/config.py` (+277 -18) </details> ### 📄 Description Automatically selects best thinking/reasoning model from LiteLLM config and updates all models to latest versions. **Changes:** - Add _get_litellm_models() to read config - Add _get_best_thinking_model() with priority scoring - Update to latest models (GPT-5.2, Gemini 3, Claude 4.5) - Use LiteLLM aliases (stable naming) **Priority:** Opus 4.5 (110) > GPT-5.2-thinking (105) > Gemini 3 deep-think (100) **Testing:** Auto-selection verified, fallback tested **Breaking Changes:** None (better defaults) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces automatic selection of a reasoning-capable model from LiteLLM and refreshes model defaults to latest versions. > > - Adds `_get_litellm_models` and `_get_best_thinking_model` to read LiteLLM YAML and score/select reasoning models (e.g., `claude-opus-4.5`, `gpt-5.2-thinking`, `gemini-3-deep-think`) > - Updates `_get_default_primary_model` to prefer the auto-selected model; refreshes provider defaults (`gpt-5.2`, `claude-sonnet-4.5`, `gemini-3-pro`) with new `max_tokens` and `cost_per_1k_tokens` > - Expands `_get_default_fallback_models` to include multiple cloud options per provider and first 3 Ollama models; standardizes on LiteLLM aliases > - Adds `yaml` dependency and improves debug/log messages > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bbf4cc6c1fbcb53cb1015bd94d58548912eb300e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:08:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/raptor#54
No description provided.