cai icon indicating copy to clipboard operation
cai copied to clipboard

Error when running two CAI instances in .env variables

Open Mery-Sanz opened this issue 7 months ago • 0 comments

You can't run two CAI instances with two different models because environment variables interfere with both. I was running two instances, one with Claude and one with Qwen, and I encountered this error:

Image

A possible solution could be to read the environment variables and assign them a unique ID for each session, for example:

global ID
ID = 7442
model=os.getenv(ID+'CAI_MODEL', "qwen2.5:14b"),

In the .env file, 7442_CAI_MODEL="qwen2.5:14b" would be saved for that session.

Mery-Sanz avatar May 26 '25 09:05 Mery-Sanz