Skip to content
All guides

Developers & integrations

Ecosystem & AI Tool Integrations

Connect OpenAI-compatible endpoints to Dify, Open WebUI, LangChain, Cursor, and CLI coding assistants.

Updated 2026-11-26 · 2 min read

How Ecosystem Tools Connect

Because the gateway exposes standard OpenAI-compatible endpoints, popular AI orchestration platforms, team chat UIs, and IDE coding assistants connect using just three configuration values:

SettingHow to ConfigureExample Value
Provider modeChoose OpenAI-API-Compatible or Custom OpenAIOpenAI Compatible
API Base URLEnter the gateway /v1 root (verify whether the tool appends /v1 automatically)https://your-gateway.example.com/v1
Model Name / IDCopy the exact identifier from Modelsqwen4-max or qwen3-coder-plus

Connecting Dify Workflows and Knowledge Bases

Dify supports chat, vision, embeddings, and reranking through its OpenAI-API-Compatible provider plugin:

  1. Navigate to Settings → Model Providers in Dify and select OpenAI-API-Compatible.
  2. Register Chat / Vision LLMs: Choose model type LLM, enter deepseek-v3.2 or qwen3-vl-plus (enable Vision toggle for VL models), set API Endpoint URL to ${API_BASE_URL}, and supply your API key.
  3. Register RAG Embeddings & Rerank: Add entries with model type Text Embedding (qwen3-embedding-8b from Qwen3 Embedding 8B) and Rerank (qwen3-reranker-8b from Qwen3 Reranker 8B).

Connecting Open WebUI for Team Chat

When hosting an internal team chat portal, pass the gateway endpoint and key via environment variables:

OPENAI_API_BASE_URL="https://your-gateway.example.com/v1"
OPENAI_API_KEY="sk-your-team-gateway-key"

Open WebUI automatically queries /v1/models to populate the model selector, and administrators can curate which models appear to end users.

Integrating with LangChain

Use the official langchain-openai package for both conversational chains and vector stores:

import os
from langchain_openai import ChatOpenAI, OpenAIEmbeddings

llm = ChatOpenAI(
    model="deepseek-v3.2",
    api_key=os.environ["API_KEY"],
    base_url=os.environ["API_BASE_URL"],
    temperature=0.2,
    streaming=True,
)

embeddings = OpenAIEmbeddings(
    model="qwen3-embedding-8b",
    api_key=os.environ["API_KEY"],
    base_url=os.environ["API_BASE_URL"],
    check_embedding_ctx_length=False,
)

Tip: Set check_embedding_ctx_length=False in OpenAIEmbeddings so LangChain sends raw strings rather than pre-tokenized tiktoken integer arrays.

Connecting Cursor and AI Coding Editors

To pair IDE coding assistants with models such as Qwen3 Coder Plus, Qwen3 Coder 480B-A35B, or GLM-4.7:

  1. Open the editor Models settings and add the exact model identifier (e.g., qwen3-coder-plus).
  2. Enable Override OpenAI Base URL, enter ${API_BASE_URL} and a dedicated developer key, and run verification.
  3. If verification returns 404, check whether the client already appends /v1 internally—see Error Codes, Rate Limits & Troubleshooting.