fix(tui): Anthropic claude persona uses wrong model name causing not_found_error #11250

Closed
opened 2026-05-20 13:26:47 +00:00 by hamza.khyari · 0 comments
Member

Metadata

  • Commit Message: fix(tui): correct Anthropic model name in default claude persona to claude-sonnet-4-20250514
  • Branch: bugfix/m8-tui-anthropic-model-name

Background and Context

When a user creates a persona with actor: anthropic/claude-4-sonnet (e.g. following the TUI first-run flow or creating ~/.config/cleveragents/personas/claude.yaml manually), typing a message and pressing Enter produces:

[Error] not_found_error, model: claude-4-sonnet

The model name claude-4-sonnet does not exist in the Anthropic API. The codebase's AnthropicProvider defaults to claude-sonnet-4-20250514 (see src/cleveragents/providers/llm/anthropic_provider.py:17 and src/cleveragents/providers/registry.py:524).

Current Behaviour

User sets persona to actor: anthropic/claude-4-sonnet → sends a message → receives [Error] not_found_error, model: claude-4-sonnet.

Expected Behaviour

The correct canonical model name is used so the Anthropic API call succeeds.

Acceptance Criteria

  • The default claude persona (created by first-run or documentation examples) uses actor: anthropic/claude-sonnet-4-20250514
  • Sending a message with a correctly configured Anthropic persona returns a real LLM response
  • The first-run actor selection overlay shows valid, working actor names

Supporting Information

Valid Anthropic actor name: anthropic/claude-sonnet-4-20250514

The _DEFAULT_ACTORS list in src/cleveragents/tui/widgets/actor_selection_overlay.py also contains anthropic/claude-4-sonnet and anthropic/claude-4-opus — these should be updated to the correct model names.

Relevant files:

  • src/cleveragents/tui/widgets/actor_selection_overlay.py_DEFAULT_ACTORS list
  • src/cleveragents/providers/llm/anthropic_provider.py — canonical default model
  • src/cleveragents/providers/registry.py — model resolution

Subtasks

  • Update _DEFAULT_ACTORS in actor_selection_overlay.py to use correct model names (claude-sonnet-4-20250514, claude-opus-4-20250514 etc.)
  • Verify model names against src/cleveragents/providers/llm/anthropic_provider.py defaults
  • Update any documentation or example persona YAMLs that reference incorrect model names
  • Tests (Behave): verify _DEFAULT_ACTORS contains only valid provider-resolvable actor names
  • Run nox (all sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly.
  • The commit is pushed to the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a PR to master, reviewed, and merged.
## Metadata - **Commit Message**: `fix(tui): correct Anthropic model name in default claude persona to claude-sonnet-4-20250514` - **Branch**: `bugfix/m8-tui-anthropic-model-name` ## Background and Context When a user creates a persona with `actor: anthropic/claude-4-sonnet` (e.g. following the TUI first-run flow or creating `~/.config/cleveragents/personas/claude.yaml` manually), typing a message and pressing Enter produces: ``` [Error] not_found_error, model: claude-4-sonnet ``` The model name `claude-4-sonnet` does not exist in the Anthropic API. The codebase's `AnthropicProvider` defaults to `claude-sonnet-4-20250514` (see `src/cleveragents/providers/llm/anthropic_provider.py:17` and `src/cleveragents/providers/registry.py:524`). ## Current Behaviour User sets persona to `actor: anthropic/claude-4-sonnet` → sends a message → receives `[Error] not_found_error, model: claude-4-sonnet`. ## Expected Behaviour The correct canonical model name is used so the Anthropic API call succeeds. ## Acceptance Criteria - The default claude persona (created by first-run or documentation examples) uses `actor: anthropic/claude-sonnet-4-20250514` - Sending a message with a correctly configured Anthropic persona returns a real LLM response - The first-run actor selection overlay shows valid, working actor names ## Supporting Information Valid Anthropic actor name: `anthropic/claude-sonnet-4-20250514` The `_DEFAULT_ACTORS` list in `src/cleveragents/tui/widgets/actor_selection_overlay.py` also contains `anthropic/claude-4-sonnet` and `anthropic/claude-4-opus` — these should be updated to the correct model names. Relevant files: - `src/cleveragents/tui/widgets/actor_selection_overlay.py` — `_DEFAULT_ACTORS` list - `src/cleveragents/providers/llm/anthropic_provider.py` — canonical default model - `src/cleveragents/providers/registry.py` — model resolution ## Subtasks - [ ] Update `_DEFAULT_ACTORS` in `actor_selection_overlay.py` to use correct model names (`claude-sonnet-4-20250514`, `claude-opus-4-20250514` etc.) - [ ] Verify model names against `src/cleveragents/providers/llm/anthropic_provider.py` defaults - [ ] Update any documentation or example persona YAMLs that reference incorrect model names - [ ] Tests (Behave): verify `_DEFAULT_ACTORS` contains only valid provider-resolvable actor names - [ ] Run `nox` (all sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the first line matches the Commit Message in Metadata exactly. - The commit is pushed to the branch matching the Branch in Metadata exactly. - The commit is submitted as a PR to master, reviewed, and merged.
hamza.khyari added this to the v3.7.0 milestone 2026-05-20 13:26:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#11250
No description provided.