diff --git a/EvoScientist/cli.py b/EvoScientist/cli.py index 8765eaf..b78271f 100644 --- a/EvoScientist/cli.py +++ b/EvoScientist/cli.py @@ -463,10 +463,19 @@ def cmd_interactive( def _process_channel_message(msg: ChannelMessage) -> None: """Process a message from a channel with full Live streaming.""" + # Move past the current prompt line to avoid interference with prompt_toolkit + # Then move back up and clear that line + sys.stdout.write("\n\033[A\033[2K\r") + sys.stdout.flush() + # Display prompt with channel source on second line + console.print(f"[bold blue]>[/bold blue] {msg.content}") + console.print(Text.assemble( + ("[", "dim"), + (f"{msg.channel_type}: Received from ", "dim"), + (msg.sender, "cyan"), + ("]", "dim"), + )) _print_separator() - # Display prompt with channel source tag - source_tag = f"[{msg.channel_type}: {msg.sender}]" - console.print(f"[bold blue]>[/bold blue] {msg.content} [dim]{source_tag}[/dim]") console.print() try: @@ -477,6 +486,13 @@ def cmd_interactive( # Set response for channel handler to retrieve _ChannelState.set_response(msg.msg_id, response_text or "") + # Show replied indicator + console.print(Text.assemble( + ("[", "dim"), + (f"{msg.channel_type}: Replied to ", "dim"), + (msg.sender, "cyan"), + ("]", "dim"), + )) except Exception as e: console.print(f"[red]Channel processing error: {e}[/red]") _ChannelState.set_response(msg.msg_id, f"Error: {e}") diff --git a/EvoScientist/llm/models.py b/EvoScientist/llm/models.py index e296394..9b152d8 100644 --- a/EvoScientist/llm/models.py +++ b/EvoScientist/llm/models.py @@ -13,11 +13,11 @@ from langchain.chat_models import init_chat_model # Model registry: short_name -> (model_id, provider) MODELS: dict[str, tuple[str, str]] = { - # Anthropic - "claude-sonnet-4-5": ("claude-sonnet-4-5-20250929", "anthropic"), + # Anthropic (ordered by capability) + "claude-opus-4-6": ("claude-opus-4-6", "anthropic"), "claude-opus-4-5": ("claude-opus-4-5-20251101", "anthropic"), - "claude-3-5-sonnet": ("claude-3-5-sonnet-20241022", "anthropic"), - "claude-3-5-haiku": ("claude-3-5-haiku-20241022", "anthropic"), + "claude-sonnet-4-5": ("claude-sonnet-4-5-20250929", "anthropic"), + "claude-haiku-4-5": ("claude-haiku-4-5-20251001", "anthropic"), # OpenAI "gpt-4o": ("gpt-4o", "openai"), "gpt-4o-mini": ("gpt-4o-mini", "openai"), diff --git a/README.md b/README.md index e1d97ec..ddae366 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,10 @@ | Provider | Short Name | Model ID | |----------|-----------|----------| -| Anthropic | `claude-sonnet-4-5` | `claude-sonnet-4-5-20250929` | +| Anthropic | `claude-opus-4-6` | `claude-opus-4-6` | | Anthropic | `claude-opus-4-5` | `claude-opus-4-5-20251101` | -| Anthropic | `claude-3-5-sonnet` | `claude-3-5-sonnet-20241022` | -| Anthropic | `claude-3-5-haiku` | `claude-3-5-haiku-20241022` | +| Anthropic | `claude-sonnet-4-5` | `claude-sonnet-4-5-20250929` | +| Anthropic | `claude-haiku-4-5` | `claude-haiku-4-5-20251001` | | OpenAI | `gpt-4o` | `gpt-4o` | | OpenAI | `gpt-4o-mini` | `gpt-4o-mini` | | OpenAI | `o1` | `o1` | diff --git a/tests/test_llm.py b/tests/test_llm.py index 93cbfac..8714663 100644 --- a/tests/test_llm.py +++ b/tests/test_llm.py @@ -24,10 +24,10 @@ class TestModelsRegistry: def test_models_has_expected_keys(self): """Test that MODELS contains expected model short names.""" expected_keys = [ - "claude-sonnet-4-5", + "claude-opus-4-6", "claude-opus-4-5", - "claude-3-5-sonnet", - "claude-3-5-haiku", + "claude-sonnet-4-5", + "claude-haiku-4-5", "gpt-4o", "gpt-4o-mini", "o1",