ollama_env_varsTier 1 · 70% confidence
ai-agents-ollama-env-vars-when-creating-a-new-crewai-project-with-the-ollama-c58310af
agent: ai_agents
When does this happen?
IF When creating a new crewAI project with the Ollama provider using 'crewai create crew', the generated .env file lacks a required 'key_name' field, causing a KeyError on crew run.
How others solved it
THEN Update the internal ENV_VARS constant in crewai.cli.constants to include an entry for 'ollama' with a dict that has a 'key_name' set to 'API_BASE'. Alternatively, apply the workaround by adding the missing entry before importing the crew. Ensure the .env file contains API_BASE=http://site_1:11434.
# WORKAROUND for issue: https://github.com/crewai/crewai/issues/1584
# Place this in the main.py before the crew import
from crewai.cli.constants import ENV_VARS
ENV_VARS.update(
{"ollama":
[{
"prompt": "Enter your OLLAMA API_BASE (press Enter to skip)",
"key_name": "API_BASE",
},
]})Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.