[PR #279] [CLOSED] feat: dual model support and sorting by release date #9573

Closed
opened 2026-02-16 18:13:47 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/279
Author: @aryasaatvik
Created: 6/20/2025
Status: Closed

Base: devHead: feat/lightweight-model-configuration


📝 Commits (10+)

  • a1d2302 feat(provider): add lightweight model configuration and retrieval logic
  • 02a75e6 tui: generate api client
  • e2a43a7 feat(provider): enhance model selection with lightweight model support and UI updates
  • 53d3873 fix(tui): update inactive selection styling to use accent color
  • 053ba20 refactor(tui): improve model initialization and rendering logic for better provider handling
  • 581a36e refactor(tui): rename lightweight model to turbo model and update related logic
  • 6be8dbd feat: add configurable turbo model cost threshold
  • f264cad feat(tui): enhance model display with capability indicators and emoji legend
  • 32d11d0 refactor(provider): comment out model cost initialization in anthropic method
  • ac7c6e8 refactor(tui): streamline turbo model selection logic with new findTurboModel function

📊 Changes

12 files changed (+887 additions, -137 deletions)

View changed files

📝 packages/opencode/src/config/config.ts (+10 -1)
📝 packages/opencode/src/provider/models.ts (+12 -0)
📝 packages/opencode/src/provider/provider.ts (+51 -7)
📝 packages/tui/internal/app/app.go (+83 -27)
📝 packages/tui/internal/components/chat/editor.go (+11 -2)
📝 packages/tui/internal/components/dialog/models.go (+652 -88)
📝 packages/tui/internal/components/status/status.go (+1 -1)
📝 packages/tui/internal/config/config.go (+5 -3)
📝 packages/tui/internal/tui/tui.go (+10 -4)
📝 packages/tui/internal/util/util.go (+13 -0)
📝 packages/tui/pkg/client/gen/openapi.json (+25 -0)
📝 packages/tui/pkg/client/generated-client.go (+14 -4)

📄 Description

Summary

This PR implements dual model support (main + turbo) for cost-optimized operations and adds model sorting functionality.

Key Changes

Dual Model Support

  • Added turbo_model and turbo_cost_threshold config options
  • New dual-pane model selector (Tab to switch panes)
  • Visual indicators: (turbo), 🧠 (reasoning), 🔧 (tools)
  • Smart turbo model selection with fallback logic
  • Fixed Anthropic auth showing incorrect turbo status

Model Sorting

  • Added release_date and last_updated fields to model schema
  • Press 'S' to cycle through sort modes: Name, Last Updated, Release Date
  • Stable multi-level sorting with consistent ordering
  • Helps discover newest models and track updates

Impact

Enables cost optimization for PRs #269 (status verbs) and #275 (window titles) to use configured turbo models instead of hardcoded ones.

Demo

https://github.com/user-attachments/assets/d076e840-d790-4e23-8cf7-a179282d1f0b


🔄 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/anomalyco/opencode/pull/279 **Author:** [@aryasaatvik](https://github.com/aryasaatvik) **Created:** 6/20/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/lightweight-model-configuration` --- ### 📝 Commits (10+) - [`a1d2302`](https://github.com/anomalyco/opencode/commit/a1d23022210de344ecb900e33632e3b360c18f1c) feat(provider): add lightweight model configuration and retrieval logic - [`02a75e6`](https://github.com/anomalyco/opencode/commit/02a75e61e380f9317c972a489f781fe55eccc517) tui: generate api client - [`e2a43a7`](https://github.com/anomalyco/opencode/commit/e2a43a77d6d28959c7a1542f9c0490648df87552) feat(provider): enhance model selection with lightweight model support and UI updates - [`53d3873`](https://github.com/anomalyco/opencode/commit/53d3873682b1b6e8b0dfa5108292d4debe7b97a9) fix(tui): update inactive selection styling to use accent color - [`053ba20`](https://github.com/anomalyco/opencode/commit/053ba202e271ba88532dd9a8873768b91951371e) refactor(tui): improve model initialization and rendering logic for better provider handling - [`581a36e`](https://github.com/anomalyco/opencode/commit/581a36e110881e1b411d757c3a9ba91f93502d14) refactor(tui): rename lightweight model to turbo model and update related logic - [`6be8dbd`](https://github.com/anomalyco/opencode/commit/6be8dbd1a26754f7354cd6235e655229ecd5b7f9) feat: add configurable turbo model cost threshold - [`f264cad`](https://github.com/anomalyco/opencode/commit/f264cad760905b5b1df0ed82c87ece9aaa6adb82) feat(tui): enhance model display with capability indicators and emoji legend - [`32d11d0`](https://github.com/anomalyco/opencode/commit/32d11d01b353f826defd7e5a92b40721851fe6ff) refactor(provider): comment out model cost initialization in anthropic method - [`ac7c6e8`](https://github.com/anomalyco/opencode/commit/ac7c6e819d18419ee0b766f4e2e0732eeebf9656) refactor(tui): streamline turbo model selection logic with new findTurboModel function ### 📊 Changes **12 files changed** (+887 additions, -137 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/config/config.ts` (+10 -1) 📝 `packages/opencode/src/provider/models.ts` (+12 -0) 📝 `packages/opencode/src/provider/provider.ts` (+51 -7) 📝 `packages/tui/internal/app/app.go` (+83 -27) 📝 `packages/tui/internal/components/chat/editor.go` (+11 -2) 📝 `packages/tui/internal/components/dialog/models.go` (+652 -88) 📝 `packages/tui/internal/components/status/status.go` (+1 -1) 📝 `packages/tui/internal/config/config.go` (+5 -3) 📝 `packages/tui/internal/tui/tui.go` (+10 -4) 📝 `packages/tui/internal/util/util.go` (+13 -0) 📝 `packages/tui/pkg/client/gen/openapi.json` (+25 -0) 📝 `packages/tui/pkg/client/generated-client.go` (+14 -4) </details> ### 📄 Description ## Summary This PR implements dual model support (main + turbo) for cost-optimized operations and adds model sorting functionality. ### Key Changes #### Dual Model Support - Added `turbo_model` and `turbo_cost_threshold` config options - New dual-pane model selector (Tab to switch panes) - Visual indicators: ⚡ (turbo), 🧠 (reasoning), 🔧 (tools) - Smart turbo model selection with fallback logic - Fixed Anthropic auth showing incorrect turbo status #### Model Sorting - Added `release_date` and `last_updated` fields to model schema - Press 'S' to cycle through sort modes: Name, Last Updated, Release Date - Stable multi-level sorting with consistent ordering - Helps discover newest models and track updates ### Impact Enables cost optimization for PRs #269 (status verbs) and #275 (window titles) to use configured turbo models instead of hardcoded ones. ### Demo https://github.com/user-attachments/assets/d076e840-d790-4e23-8cf7-a179282d1f0b --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:47 -05:00
yindo closed this issue 2026-02-16 18:13:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9573