Skip to content

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Sep 4, 2025

Describe Your Changes

This pull request introduces enhanced support for "reasoning" capabilities in models, focusing on both backend and frontend integration. The changes include adding new properties to model configurations, updating capability detection logic, and improving the user interface to allow toggling and configuring reasoning effort for models that support it. Additionally, the capability detection logic is generalized and refactored for better extensibility.

Backend enhancements for reasoning capabilities:

  • Added reasoning_budget and chat_template_kwargs properties to the LlamacppConfig type, and ensured these are passed as command-line arguments when starting the model in llamacpp_extension. This enables dynamic configuration of reasoning features for supported models. [1] [2] [3]
  • Refactored capability detection by replacing the isToolSupported method with a more generic isModelCapabilitySupported, allowing detection of various capabilities (including reasoning and reasoning_effort) for models. This change is reflected across engine, service, and provider layers. [1] [2] [3] [4] [5] [6]

Frontend improvements for reasoning configuration:

  • Updated the UI in ChatInput.tsx to allow users to toggle the reasoning budget and select reasoning effort (low/medium/high) for models with reasoning capability. This includes new popover and icon components, and ensures the model is restarted with new settings when changed. [1] [2]
  • Changed the icon for reasoning capability from IconAtom to IconBrain for better clarity in both capability lists and chat input controls. [1] [2] [3]

Capability and model configuration logic:

  • Enhanced provider and model configuration logic to correctly detect and assign capabilities, including reasoning and reasoning_effort, during provider/model loading. This ensures models are properly annotated and configured for use in the UI and backend. [1] [2] [3] [4]
  • Added REASONING to the ModelCapabilities enum for consistent capability handling throughout the codebase.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Add reasoning capabilities to models, updating backend configurations and frontend UI for enhanced reasoning support.

  • Backend Enhancements:
    • Add reasoning_budget and chat_template_kwargs to LlamacppConfig in index.ts.
    • Pass these as command-line arguments in llamacpp_extension.
    • Replace isToolSupported with isModelCapabilitySupported in AIEngine.ts and index.ts.
  • Frontend Improvements:
    • Update ChatInput.tsx to toggle reasoning budget and select reasoning effort.
    • Change reasoning icon from IconAtom to IconBrain in Capabilities.tsx and ChatInput.tsx.
  • Model Configuration:
    • Enhance logic to detect and assign capabilities, including reasoning, in providers.ts.
    • Add REASONING to ModelCapabilities enum in models.ts.

This description was created by Ellipsis for dce5af4. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.7.0 milestone Sep 4, 2025
@urmauur urmauur self-assigned this Sep 4, 2025
@urmauur urmauur added this to Jan Sep 4, 2025
@urmauur urmauur force-pushed the feat/reasoning-effort branch from dce5af4 to 0d7578a Compare September 4, 2025 01:39
Copy link
Contributor

github-actions bot commented Sep 4, 2025

Barecheck - Code coverage report

Total: 35.68%

Your code coverage diff: -0.13% ▾

Uncovered files and lines
FileLines
web-app/src/containers/Capabilities.tsx21, 23-26, 28-40, 42-50, 52-61, 63, 65-66, 68
web-app/src/containers/ChatInput.tsx97-99, 122-128, 130-132, 148-149, 190-191, 213-215, 222-223, 226-229, 232-242, 245, 247-249, 255, 257, 259-260, 262-266, 269-270, 273, 275-278, 280-284, 286-298, 300-310, 312-321, 323-326, 329-330, 332-335, 338-339, 342-346, 349-350, 352-355, 358-360, 363-365, 368-371, 373-374, 376-380, 382-384, 388-390, 393-396, 398-399, 401-402, 404-409, 412-418, 420-424, 427, 429-433, 436-443, 445-448, 450-452, 454-465, 467-473, 475-481, 484-487, 489, 525-533, 535-540, 542-544, 546-548, 550-551, 609, 649-663, 667-677, 679-680, 683-692, 694-699, 701-718, 720-730, 732-735, 737-749, 751-760, 762-767, 769, 785-787, 792-796, 811-815, 830-844, 854, 872, 889, 891-894
web-app/src/containers/DropdownModelProvider.tsx43-50, 53-61, 90-94, 103, 109-111, 113-120, 123-128, 130-138, 147-150, 152-157, 159-160, 163-171, 173-178, 206-215, 218-219, 224-227, 229-232, 237-238, 248, 250-256, 258, 260-262, 265-266, 268-274, 290, 298-305, 307-311, 322-323, 329-332, 335-336, 338, 346-353, 356-361, 363-364, 367-375, 403-405, 418-424, 456-462, 469-471, 476, 478-482, 485-490, 492-502, 504-517, 519-520, 522-523, 528, 533-535, 537, 539-542, 545-561, 563-568, 571, 573, 575-581, 583-593, 595-598, 600-601, 603-607, 609-610, 612, 614
web-app/src/hooks/useModelProvider.ts33-38, 40-41, 44-54, 56, 58-65, 67-69, 71-108, 110-140, 142-153, 163-165, 167, 169-171, 174-177, 179-180, 182, 184-186, 188-201, 203-206, 208-213, 219, 234-235, 237-245, 248-250, 253-256, 259-266, 268-280, 282-283
web-app/src/services/models.ts137-139, 201, 203-207, 271-279, 283-285, 287-288, 290, 292, 294, 296-302, 305-325, 327-328, 331-340, 426, 428-429, 432-433, 452-456, 458-459, 471-475, 477-478, 481-482, 485-488, 490-491, 494, 496-516, 519-524, 526-535, 537, 539-549, 551-565, 567-573, 582-583, 586-593
web-app/src/services/providers.ts30, 55, 74, 77, 100-110, 192-193

@urmauur urmauur moved this to Blocked in Jan Sep 7, 2025
@urmauur urmauur marked this pull request as draft September 10, 2025 13:16
@urmauur urmauur moved this from Blocked to QA in Jan Sep 12, 2025
@urmauur urmauur modified the milestones: v0.6.10, v0.7.0 Sep 12, 2025
@urmauur urmauur moved this from QA to Blocked in Jan Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Blocked
Development

Successfully merging this pull request may close these issues.

1 participant