fix(tui): correct Anthropic model name in default claude persona to claude-sonnet-4-20250514 #11252
@@ -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)
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
@@ -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}"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user