`ValidationError` in AzureOpenAIEmbeddings when `OPENAI_API_BASE` is set

### Checked other resources

- [x] I added a very descriptive title to this issue.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- [x] I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

### Example Code

```python
import os
from langchain_openai import AzureOpenAIEmbeddings

os.environ["OPENAI_API_BASE"] = "foo"

embeddings = AzureOpenAIEmbeddings(
    api_key="my_api_key",
    azure_endpoint="https://myendpoint.com",
    model="azure.mymodel",
)
```

### Error Message and Stack Trace (if applicable)

```
---------------------------------------------------------------------------
ValidationError                           Traceback (most recent call last)
Cell In[2], [line 6](vscode-notebook-cell:?execution_count=2&line=6)
      [2](vscode-notebook-cell:?execution_count=2&line=2) from langchain_openai import AzureOpenAIEmbeddings
      [4](vscode-notebook-cell:?execution_count=2&line=4) os.environ["OPENAI_API_BASE"] = "foo"
----> [6](vscode-notebook-cell:?execution_count=2&line=6) embeddings = AzureOpenAIEmbeddings(
      [7](vscode-notebook-cell:?execution_count=2&line=7)     api_key="my_api_key",
      [8](vscode-notebook-cell:?execution_count=2&line=8)     azure_endpoint="https://myendpoint.com/",
      [9](vscode-notebook-cell:?execution_count=2&line=9)     model="azure.mymodel",
     [10](vscode-notebook-cell:?execution_count=2&line=10) )

File c:\Users\fffff\anaconda3\envs\lchain\lib\site-packages\pydantic\main.py:253, in BaseModel.__init__(self, **data)
    [251](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:251) # `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks
    [252](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:252) __tracebackhide__ = True
--> [253](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:253) validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
    [254](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:254) if self is not validated_self:
    [255](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:255)     warnings.warn(
    [256](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:256)         'A custom validator is returning a value other than `self`.\n'
    [257](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:257)         "Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.\n"
    [258](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:258)         'See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.',
    [259](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:259)         stacklevel=2,
    [260](file:///C:/Users/fffff/anaconda3/envs/lchain/lib/site-packages/pydantic/main.py:260)     )

ValidationError: 1 validation error for AzureOpenAIEmbeddings
  Value error, As of openai>=1.0.0, Azure endpoints should be specified via the `azure_endpoint` param not `openai_api_base` (or alias `base_url`).  [type=value_error, input_value={'api_key': 'MY_API_KEY',...el', 'model_kwargs': {}}, input_type=dict]
```

### Description

I'm using langchain_openai `AzureOpenAIEmbeddings`.
I expect `AzureOpenAIEmbeddings` is instantiated using `azure_endpoint` parameter value. I also expect to see an error message saying that the value of `azure_endpoint` can't be overridden when `OPENAI_API_BASE` is set if this is the case but I would also expect the user to be able to create an instance regardless of `OPENAI_API_BASE`.
Instead I see a validation error saying that I should specify Azure endpoint via the `azure_endpoint` which is already there. It's important because I'm using `OPENAI_API_BASE` env variable for different agents.

### System Info

```
System Information
------------------
> OS:  Windows
> OS Version:  10.0.19045
> Python Version:  3.9.23 (main, Jun  5 2025, 13:25:08) [MSC v.1929 64 bit (AMD64)]

Package Information
-------------------
> langchain_core: 0.3.66
> langsmith: 0.4.2
> langchain_openai: 0.3.25

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> httpx: 0.28.1
> jsonpatch<2.0,>=1.33: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.66: Installed. No version info available.
> langsmith-pyo3: Installed. No version info available.
> langsmith>=0.3.45: Installed. No version info available.
> openai-agents: Installed. No version info available.
> openai<2.0.0,>=1.86.0: Installed. No version info available.
> opentelemetry-api: Installed. No version info available.
> opentelemetry-exporter-otlp-proto-http: Installed. No version info available.
> opentelemetry-sdk: Installed. No version info available.
> orjson: 3.10.18
> packaging: 24.2
> packaging<25,>=23.2: Installed. No version info available.
> pydantic: 2.11.7
> pydantic>=2.7.4: Installed. No version info available.
> pytest: Installed. No version info available.
> PyYAML>=5.3: Installed. No version info available.
> requests: 2.32.4
> requests-toolbelt: 1.0.0
> rich: Installed. No version info available.
> tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
> tiktoken<1,>=0.7: Installed. No version info available.
> typing-extensions>=4.7: Installed. No version info available.
> zstandard: 0.23.0
```

Also reproduced on macOS with python 3.13

Labels: bug
State: closed