|
30 | 30 | restore_terminal, |
31 | 31 | ) |
32 | 32 | from chuk_term.ui.theme import set_theme |
33 | | -from mcp_cli.config import process_options, APP_VERSION, DEFAULT_CONFIG_FILENAME |
| 33 | +from mcp_cli.config import process_options, APP_VERSION, DEFAULT_CONFIG_FILENAME, DEFAULT_PROVIDER, DEFAULT_MODEL |
34 | 34 | from mcp_cli.context import initialize_context |
35 | 35 |
|
36 | 36 | # ────────────────────────────────────────────────────────────────────────────── |
@@ -345,11 +345,11 @@ def main_callback( |
345 | 345 | f"Using current provider with specified model: {effective_provider}/{model}" |
346 | 346 | ) |
347 | 347 | else: |
348 | | - # Neither specified, use active configuration |
349 | | - effective_provider = model_manager.get_active_provider() |
350 | | - effective_model = model_manager.get_active_model() |
| 348 | + # Neither specified — use declared project defaults |
| 349 | + effective_provider = DEFAULT_PROVIDER |
| 350 | + effective_model = DEFAULT_MODEL |
351 | 351 | logger.debug( |
352 | | - f"Using active configuration: {effective_provider}/{effective_model}" |
| 352 | + f"Using default configuration: {effective_provider}/{effective_model}" |
353 | 353 | ) |
354 | 354 |
|
355 | 355 | servers, _, server_names = process_options( |
@@ -649,8 +649,9 @@ def _chat_command( |
649 | 649 | effective_provider = model_manager.get_active_provider() |
650 | 650 | effective_model = model |
651 | 651 | else: |
652 | | - effective_provider = model_manager.get_active_provider() |
653 | | - effective_model = model_manager.get_active_model() |
| 652 | + # Neither specified — use declared project defaults |
| 653 | + effective_provider = DEFAULT_PROVIDER |
| 654 | + effective_model = DEFAULT_MODEL |
654 | 655 |
|
655 | 656 | servers, _, server_names = process_options( |
656 | 657 | server, |
@@ -818,11 +819,11 @@ def _interactive_command( |
818 | 819 | f"Using current provider with specified model: {effective_provider}/{model}" |
819 | 820 | ) |
820 | 821 | else: |
821 | | - # Neither specified, use active configuration |
822 | | - effective_provider = model_manager.get_active_provider() |
823 | | - effective_model = model_manager.get_active_model() |
| 822 | + # Neither specified — use declared project defaults |
| 823 | + effective_provider = DEFAULT_PROVIDER |
| 824 | + effective_model = DEFAULT_MODEL |
824 | 825 | logger.debug( |
825 | | - f"Using active configuration: {effective_provider}/{effective_model}" |
| 826 | + f"Using default configuration: {effective_provider}/{effective_model}" |
826 | 827 | ) |
827 | 828 |
|
828 | 829 | servers, _, server_names = process_options( |
|
0 commit comments