Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model environment variable should be case insensitive #2139

Open
pylanglois opened this issue Feb 15, 2025 · 0 comments · May be fixed by #2140
Open

model environment variable should be case insensitive #2139

pylanglois opened this issue Feb 15, 2025 · 0 comments · May be fixed by #2140

Comments

@pylanglois
Copy link

crewai create ... with Azure options generates a .env file with a lowercase model, but the code tries to load an uppercase MODEL, which falls back to the default model.

Here is the line that breaks the execution:

or os.environ.get("MODEL")

The resulting trace looks like this:

Error during LLM call: 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
python-BaseException
devin-ai-integration bot added a commit that referenced this issue Feb 15, 2025
- Update Azure provider config to use uppercase MODEL env var
- Add test case to verify MODEL env var handling
- Fixes #2139

Co-Authored-By: Joe Moura <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant