From ca331ea18790181aacfd8ec1cd6f450eac13f6e3 Mon Sep 17 00:00:00 2001 From: CleverThis Date: Tue, 26 May 2026 23:45:08 -0400 Subject: [PATCH 1/2] fix(tui): correct Anthropic model name in default claude persona to claude-sonnet-4-20250514 --- src/cleveragents/tui/widgets/actor_selection_overlay.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cleveragents/tui/widgets/actor_selection_overlay.py b/src/cleveragents/tui/widgets/actor_selection_overlay.py index fd27c1b3d..8e51df868 100644 --- a/src/cleveragents/tui/widgets/actor_selection_overlay.py +++ b/src/cleveragents/tui/widgets/actor_selection_overlay.py @@ -6,11 +6,11 @@ import importlib from typing import Any _DEFAULT_ACTORS: list[str] = [ - "anthropic/claude-4-sonnet", - "anthropic/claude-4-opus", + "anthropic/claude-sonnet-4-20250514", + "anthropic/claude-opus-4-20250514", "openai/gpt-4o", - "openai/o3", - "google/gemini-2", + "openai/o4-mini", + "google/gemini-2.0-flash", ] -- 2.52.0 From 0bde46f0fff6d4419aa326314b86d4a399790704 Mon Sep 17 00:00:00 2001 From: drew Date: Wed, 27 May 2026 00:46:19 -0400 Subject: [PATCH 2/2] fix(tui): update tests for renamed Anthropic model names and fix typer.Exit propagation --- features/steps/actor_run_signature_resolve_steps.py | 8 ++++---- features/steps/actor_run_signature_security_steps.py | 2 +- features/steps/tui_first_run_steps.py | 2 +- features/tui_first_run.feature | 6 +++--- src/cleveragents/cli/commands/actor.py | 2 +- src/cleveragents/cli/commands/actor_run.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/features/steps/actor_run_signature_resolve_steps.py b/features/steps/actor_run_signature_resolve_steps.py index 24e191688..753362674 100644 --- a/features/steps/actor_run_signature_resolve_steps.py +++ b/features/steps/actor_run_signature_resolve_steps.py @@ -167,7 +167,7 @@ def step_resolve_with_no_config_data(context: Any) -> None: try: resolve_config_files("local/empty-actor", []) context.resolve_exit_code = 0 - except (SystemExit, click.exceptions.Exit) as exc: + except (SystemExit, click.exceptions.Exit, typer.Exit) as exc: context.resolve_exit_code = getattr( exc, "exit_code", getattr(exc, "code", 1) ) @@ -211,7 +211,7 @@ def step_resolve_unknown_actor_directly(context: Any) -> None: try: resolve_config_files("nonexistent/actor", []) context.resolve_exit_code = 0 - except (SystemExit, click.exceptions.Exit) as exc: + except (SystemExit, click.exceptions.Exit, typer.Exit) as exc: context.resolve_exit_code = getattr( exc, "exit_code", getattr(exc, "code", 1) ) @@ -262,7 +262,7 @@ def step_resolve_with_empty_config_blob(context: Any) -> None: try: resolve_config_files("local/empty-blob-actor", []) context.resolve_exit_code = 0 - except (SystemExit, click.exceptions.Exit) as exc: + except (SystemExit, click.exceptions.Exit, typer.Exit) as exc: context.resolve_exit_code = getattr( exc, "exit_code", getattr(exc, "code", 1) ) @@ -358,7 +358,7 @@ def step_resolve_with_unserializable_config_blob(context: Any) -> None: try: resolve_config_files("local/bad-blob-actor", []) context.resolve_exit_code = 0 - except (SystemExit, click.exceptions.Exit) as exc: + except (SystemExit, click.exceptions.Exit, typer.Exit) as exc: context.resolve_exit_code = getattr( exc, "exit_code", getattr(exc, "code", 1) ) diff --git a/features/steps/actor_run_signature_security_steps.py b/features/steps/actor_run_signature_security_steps.py index 7e93caf7a..889b48b8f 100644 --- a/features/steps/actor_run_signature_security_steps.py +++ b/features/steps/actor_run_signature_security_steps.py @@ -49,7 +49,7 @@ def step_resolve_with_control_character_name(context: Any) -> None: try: resolve_config_files(actor_name, []) context.resolve_exit_code = 0 - except (SystemExit, click.exceptions.Exit) as exc: + except (SystemExit, click.exceptions.Exit, typer.Exit) as exc: context.resolve_exit_code = getattr( exc, "exit_code", getattr(exc, "code", 1) ) diff --git a/features/steps/tui_first_run_steps.py b/features/steps/tui_first_run_steps.py index 590b4dead..b6e9ca9db 100644 --- a/features/steps/tui_first_run_steps.py +++ b/features/steps/tui_first_run_steps.py @@ -485,6 +485,6 @@ def step_persona_bar_reflects_actor(context: object) -> None: from cleveragents.tui.widgets.persona_bar import PersonaBar bar = context._first_run_app.query_one("#persona-bar", PersonaBar) - assert "anthropic/claude-4-sonnet" in bar._text, ( + assert "anthropic/claude-sonnet-4-20250514" in bar._text, ( f"Expected actor in persona bar, got: {bar._text}" ) diff --git a/features/tui_first_run.feature b/features/tui_first_run.feature index 20e18d55d..3d82993da 100644 --- a/features/tui_first_run.feature +++ b/features/tui_first_run.feature @@ -82,7 +82,7 @@ Feature: TUI first-run experience with actor selection overlay Scenario: ActorSelectionOverlay show populates default actors Given a new ActorSelectionOverlay When I call show on the overlay - Then the overlay actors list should contain "anthropic/claude-4-sonnet" + Then the overlay actors list should contain "anthropic/claude-sonnet-4-20250514" Scenario: ActorSelectionOverlay show accepts custom actor list Given a new ActorSelectionOverlay @@ -125,7 +125,7 @@ Feature: TUI first-run experience with actor selection overlay Given a new ActorSelectionOverlay When I call show on the overlay And I call confirm on the overlay - Then the confirmed actor should be "anthropic/claude-4-sonnet" + Then the confirmed actor should be "anthropic/claude-sonnet-4-20250514" Scenario: ActorSelectionOverlay confirm hides the overlay Given a new ActorSelectionOverlay @@ -191,6 +191,6 @@ Feature: TUI first-run experience with actor selection overlay Scenario: _complete_first_run creates default persona and refreshes bar Given the TUI app is initialised with an empty persona registry When I call on_mount on the first-run app - And I call _complete_first_run with actor "anthropic/claude-4-sonnet" + And I call _complete_first_run with actor "anthropic/claude-sonnet-4-20250514" Then the registry should contain a persona named "default" And the persona bar should reflect the new actor diff --git a/src/cleveragents/cli/commands/actor.py b/src/cleveragents/cli/commands/actor.py index fa0723afc..d4d0dc3f0 100644 --- a/src/cleveragents/cli/commands/actor.py +++ b/src/cleveragents/cli/commands/actor.py @@ -185,7 +185,7 @@ def run( except UnsafeConfigurationError as exc: typer.echo(f"Error: {exc}", err=True) raise typer.Exit(code=1) from exc - except click.exceptions.Exit: + except (click.exceptions.Exit, typer.Exit): raise except CleverAgentsError as exc: typer.echo(f"Error: {exc}", err=True) diff --git a/src/cleveragents/cli/commands/actor_run.py b/src/cleveragents/cli/commands/actor_run.py index 0d3bc220e..761473c65 100644 --- a/src/cleveragents/cli/commands/actor_run.py +++ b/src/cleveragents/cli/commands/actor_run.py @@ -159,7 +159,7 @@ def run( except UnsafeConfigurationError as exc: typer.echo(f"Error: {exc}", err=True) raise typer.Exit(code=1) from exc - except click.exceptions.Exit: + except (click.exceptions.Exit, typer.Exit): raise except CleverAgentsError as exc: typer.echo(f"Error: {exc}", err=True) -- 2.52.0