44from rich .console import Console
55
66from cli .models import AnalystType
7+ from tradingagents .llm_clients .model_catalog import get_model_options
78
89console = Console ()
910
@@ -136,48 +137,11 @@ def select_research_depth() -> int:
136137def select_shallow_thinking_agent (provider ) -> str :
137138 """Select shallow thinking llm engine using an interactive selection."""
138139
139- # Define shallow thinking llm engine options with their corresponding model names
140- # Ordering: medium → light → heavy (balanced first for quick tasks)
141- # Within same tier, newer models first
142- SHALLOW_AGENT_OPTIONS = {
143- "openai" : [
144- ("GPT-5 Mini - Balanced speed, cost, and capability" , "gpt-5-mini" ),
145- ("GPT-5 Nano - High-throughput, simple tasks" , "gpt-5-nano" ),
146- ("GPT-5.4 - Latest frontier, 1M context" , "gpt-5.4" ),
147- ("GPT-4.1 - Smartest non-reasoning model" , "gpt-4.1" ),
148- ],
149- "anthropic" : [
150- ("Claude Sonnet 4.6 - Best speed and intelligence balance" , "claude-sonnet-4-6" ),
151- ("Claude Haiku 4.5 - Fast, near-instant responses" , "claude-haiku-4-5" ),
152- ("Claude Sonnet 4.5 - Agents and coding" , "claude-sonnet-4-5" ),
153- ],
154- "google" : [
155- ("Gemini 3 Flash - Next-gen fast" , "gemini-3-flash-preview" ),
156- ("Gemini 2.5 Flash - Balanced, stable" , "gemini-2.5-flash" ),
157- ("Gemini 3.1 Flash Lite - Most cost-efficient" , "gemini-3.1-flash-lite-preview" ),
158- ("Gemini 2.5 Flash Lite - Fast, low-cost" , "gemini-2.5-flash-lite" ),
159- ],
160- "xai" : [
161- ("Grok 4.1 Fast (Non-Reasoning) - Speed optimized, 2M ctx" , "grok-4-1-fast-non-reasoning" ),
162- ("Grok 4 Fast (Non-Reasoning) - Speed optimized" , "grok-4-fast-non-reasoning" ),
163- ("Grok 4.1 Fast (Reasoning) - High-performance, 2M ctx" , "grok-4-1-fast-reasoning" ),
164- ],
165- "openrouter" : [
166- ("NVIDIA Nemotron 3 Nano 30B (free)" , "nvidia/nemotron-3-nano-30b-a3b:free" ),
167- ("Z.AI GLM 4.5 Air (free)" , "z-ai/glm-4.5-air:free" ),
168- ],
169- "ollama" : [
170- ("Qwen3:latest (8B, local)" , "qwen3:latest" ),
171- ("GPT-OSS:latest (20B, local)" , "gpt-oss:latest" ),
172- ("GLM-4.7-Flash:latest (30B, local)" , "glm-4.7-flash:latest" ),
173- ],
174- }
175-
176140 choice = questionary .select (
177141 "Select Your [Quick-Thinking LLM Engine]:" ,
178142 choices = [
179143 questionary .Choice (display , value = value )
180- for display , value in SHALLOW_AGENT_OPTIONS [ provider . lower ()]
144+ for display , value in get_model_options ( provider , "quick" )
181145 ],
182146 instruction = "\n - Use arrow keys to navigate\n - Press Enter to select" ,
183147 style = questionary .Style (
@@ -201,50 +165,11 @@ def select_shallow_thinking_agent(provider) -> str:
201165def select_deep_thinking_agent (provider ) -> str :
202166 """Select deep thinking llm engine using an interactive selection."""
203167
204- # Define deep thinking llm engine options with their corresponding model names
205- # Ordering: heavy → medium → light (most capable first for deep tasks)
206- # Within same tier, newer models first
207- DEEP_AGENT_OPTIONS = {
208- "openai" : [
209- ("GPT-5.4 - Latest frontier, 1M context" , "gpt-5.4" ),
210- ("GPT-5.2 - Strong reasoning, cost-effective" , "gpt-5.2" ),
211- ("GPT-5 Mini - Balanced speed, cost, and capability" , "gpt-5-mini" ),
212- ("GPT-5.4 Pro - Most capable, expensive ($30/$180 per 1M tokens)" , "gpt-5.4-pro" ),
213- ],
214- "anthropic" : [
215- ("Claude Opus 4.6 - Most intelligent, agents and coding" , "claude-opus-4-6" ),
216- ("Claude Opus 4.5 - Premium, max intelligence" , "claude-opus-4-5" ),
217- ("Claude Sonnet 4.6 - Best speed and intelligence balance" , "claude-sonnet-4-6" ),
218- ("Claude Sonnet 4.5 - Agents and coding" , "claude-sonnet-4-5" ),
219- ],
220- "google" : [
221- ("Gemini 3.1 Pro - Reasoning-first, complex workflows" , "gemini-3.1-pro-preview" ),
222- ("Gemini 3 Flash - Next-gen fast" , "gemini-3-flash-preview" ),
223- ("Gemini 2.5 Pro - Stable pro model" , "gemini-2.5-pro" ),
224- ("Gemini 2.5 Flash - Balanced, stable" , "gemini-2.5-flash" ),
225- ],
226- "xai" : [
227- ("Grok 4 - Flagship model" , "grok-4-0709" ),
228- ("Grok 4.1 Fast (Reasoning) - High-performance, 2M ctx" , "grok-4-1-fast-reasoning" ),
229- ("Grok 4 Fast (Reasoning) - High-performance" , "grok-4-fast-reasoning" ),
230- ("Grok 4.1 Fast (Non-Reasoning) - Speed optimized, 2M ctx" , "grok-4-1-fast-non-reasoning" ),
231- ],
232- "openrouter" : [
233- ("Z.AI GLM 4.5 Air (free)" , "z-ai/glm-4.5-air:free" ),
234- ("NVIDIA Nemotron 3 Nano 30B (free)" , "nvidia/nemotron-3-nano-30b-a3b:free" ),
235- ],
236- "ollama" : [
237- ("GLM-4.7-Flash:latest (30B, local)" , "glm-4.7-flash:latest" ),
238- ("GPT-OSS:latest (20B, local)" , "gpt-oss:latest" ),
239- ("Qwen3:latest (8B, local)" , "qwen3:latest" ),
240- ],
241- }
242-
243168 choice = questionary .select (
244169 "Select Your [Deep-Thinking LLM Engine]:" ,
245170 choices = [
246171 questionary .Choice (display , value = value )
247- for display , value in DEEP_AGENT_OPTIONS [ provider . lower ()]
172+ for display , value in get_model_options ( provider , "deep" )
248173 ],
249174 instruction = "\n - Use arrow keys to navigate\n - Press Enter to select" ,
250175 style = questionary .Style (
0 commit comments