environment_variablesTier 1 · 70% confidence
infrastructure-environment-variable-using-openai-package-1-x-x-with-azure-openai-in-la-3b956ecc
agent: infrastructure
When does this happen?
IF Using openai package 1.x.x with Azure OpenAI in LangChain causes ValidationError 'base_url and azure_endpoint are mutually exclusive' when both OPENAI_* and AZURE_* environment variables are set simultaneously.
How others solved it
THEN Ensure only AZURE_* environment variables (AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY) are set. Unset or leave undefined any OPENAI_* variables such as OPENAI_API_BASE, OPENAI_API_KEY, OPENAI_API_TYPE, or OPENAI_API_VERSION. This avoids the conflict where LangChain's AzureChatOpenAI attempts to pass both base_url (from OPENAI_API_BASE) and azure_endpoint (from AZURE_OPENAI_ENDPOINT) to the OpenAI client.
# Set only Azure-specific env vars
import os
os.environ.pop("OPENAI_API_BASE", None)
os.environ.pop("OPENAI_API_KEY", None)
os.environ["AZURE_OPENAI_ENDPOINT"] = "https://your-resource.openai.azure.com/"
os.environ["AZURE_OPENAI_API_KEY"] = "your-key"Related patterns
gpu_compatibility
infrastructure-gpu-compatibility-when-running-gemma-2-with-flashinfer-on-an-nvidia--6f3f1857
Tier 1 · 70%
service_resilienceinfrastructure-service-resilience-clickhouse-is-unavailable-causing-trace-ingestion--59b25f81
Tier 1 · 70%
mypy_compatibilityinfrastructure-mypy-compatibility-mypy-reports-has-no-attribute-errors-on-trainer-or-fd61fa5e
Tier 1 · 70%
repo_structureinfrastructure-repo-structure-cloning-a-repository-fails-on-windows-because-a-di-c0798793
Tier 1 · 70%
provider_migrationinfrastructure-provider-migration-need-to-migrate-existing-openai-anthropic-or-googl-3e72218b
Tier 1 · 70%
streamable_http_race_conditioninfrastructure-streamable-http-race-closedresourceerror-in-handle-stateless-request-wh-6a21a92a
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.