# Adding support for MaaS models (GPT-OSS, etc.) in Vertex AI

**URL:** <https://forum.langchain.com/t/adding-support-for-maas-models-gpt-oss-etc-in-vertex-ai/2388>\
**Category:** LangChain\
**Tags:** product-feedback, python-help\
**Created:** [December 1, 2025, 12:11pm UTC](https://forum.langchain.com/t/adding-support-for-maas-models-gpt-oss-etc-in-vertex-ai/2388 "2025-12-01T12:11:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeonym](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/codeonym/32/1174_2.png) [@codeonym](https://forum.langchain.com/u/codeonym)\
**Post date:** [December 1, 2025, 12:11pm UTC](https://forum.langchain.com/t/adding-support-for-maas-models-gpt-oss-etc-in-vertex-ai/2388/1 "2025-12-01T12:11:43Z")

</div>

Could we get support for the available MaaS models on Vertex AI (GPT-OSS, etc.)?  
At the moment, the only supported models are the ones shown below

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/e/eb468786a7e58008f3e1926553fe079ffb6b6be6.png)

---

<div class="post-metadata">

**Author:** ![codeonym](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/codeonym/32/1174_2.png) [@codeonym](https://forum.langchain.com/u/codeonym)\
**Post date:** [December 2, 2025, 10:04am UTC](https://forum.langchain.com/t/adding-support-for-maas-models-gpt-oss-etc-in-vertex-ai/2388/2 "2025-12-02T10:04:53Z")

</div>

For those who wants to use vertexai’ maas models, you can use OpenAI’s integration, here is a quick demo:

```python
from langchain_openai import ChatOpenAI
import google.auth
from google.auth.transport.requests import Request

# 1. Get default credentials and project
SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
creds, project_id = google.auth.default(scopes=SCOPES)

# 2. Refresh immediately to get the token (it's often blank initially)
creds.refresh(Request())

# 3. Dynamic Configuration
REGION = "us-central1"
# PROJECT_ID is auto-fetched above

# 4. Corrected BASE_URL
BASE_URL = f"https://aiplatform.googleapis.com/v1/projects/{project_id}/locations/{REGION}/endpoints/openapi"

llm = ChatOpenAI(
    model="openai/gpt-oss-120b-maas",
    base_url=BASE_URL,
    api_key=creds.token,
    # Optimization: Default max_retries is often too high for interactive apps;
    # reducing it can fail faster if the endpoint is down.
    max_retries=2
)

```
