Skip to content

Intermittent Authentication Error in test.sh Despite Configured API Key #558

@fangyan1221

Description

@fangyan1221

Describe the issue

Title: Intermittent Authentication Error in test.sh Despite Configured API Key


The content of test.sh is as follows:

...
mini-extra config set MSWEA_MINI_CONFIG_PATH "$CONFIG_PATH"
mini-extra config set LITELLM_MODEL_REGISTRY_PATH "$MODEL_REGISTRY_PATH"
mini-extra config set MSWEA_CONFIGURED 'true'
echo "success"

echo "start..."
mini -y -t "${ISSUE_DESCRIPTION}" --exit-immediately
...

Try run sh test.sh , the execution does not always succeed. Sometimes I get the following error:

�[1;31mGive Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new�[0m
LiteLLM.Info: If you need to debug this error, use `litellm._turn_on_debug()'.
minisweagent: ERROR: Error running agent: litellm.AuthenticationError:          
AuthenticationError: OpenAIException - The api_key client option must be set    
either by passing api_key to the client or by setting the OPENAI_API_KEY        
environment variable You can permanently set your API key with `mini-extra      
config set KEY VALUE`. 

However, I clearly already configured the KEY-VALUE pair in the mini-extra config set with CONFIG_PATH. Why do I still get this error? What's more puzzling is that with the exact same test.sh file, sometimes it runs successfully when executed repeatedly, while other times it fails with this authentication error asking me to run mini-extra config set.

Has anyone else encountered a similar issue? Are there any known solutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions