Skip to content

CAI hangs when using Anthropic provided Claude model #401

@biggmojo

Description

@biggmojo

Hello!

I'm trying to use cai for the first time and it seems to just hang when I attempt to use a Claude model provided by Anthropic? I started cai, chose the claude-sonnet-4-5 model, chose the redteam_agent agent, and asked for it to check what services are running on a machine on my local network. The log file was generated, then nothing happened for over 10 minutes before I exited out.

Here's a screenshot showing it:
Image

And here's the content of my .env file:

OPENAI_API_KEY="empty"
ANTHROPIC_API_KEY="{redacted but is a valid key from Anthropic}"
OLLAMA=""
PROMPT_TOOLKIT_NO_CPR=1
CAI_STREAM=true

No errors or anything are thrown either when I Control+C out of cai. I tried following along with this YouTube demo to see if there was something I was missing or doing wrong but it didn't seem like it.

Other details that might be beneficial:

  • Running cai in a Fedora VM.
  • Installed with:
python3.13 -m venv cai_env
source cai_env/bin/activate
pip install cai-framework
  • If I try to use a Claude model provided by Openrouter, running a prompt throws an error because I haven't authenticated to Openrouter or provided an access token (as expected).

I'm not really sure what else to try. Any suggestions? More than happy to provide additional information as necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions