LlamaIndex on Mingles Router

Run LlamaIndex on Mingles Router

LlamaIndex ships a dedicated wrapper for third-party OpenAI-compatible endpoints. It has one non-obvious default.

Pick your model and paste your key — every command and value on this page updates live.

Endpoint: https://router.mingles.ai/v1 · key stays in your browser · no key entered? commands show <your-key>.

Wire it up

1. Install the wrapper

shell
pip install llama-index-llms-openai-like

2. Construct it

Three of these arguments are not optional in practice — see the note below:

python
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="deepseek-ai/DeepSeek-V4-Flash-0731",
    api_base="https://router.mingles.ai/v1",
    api_key="<your-key>",
    context_window=128000,
    is_chat_model=True,
    is_function_calling_model=True,
)

print(llm.complete("Hello World!"))

is_chat_model defaults to False, which sends your request to the legacy completions endpoint and fails. is_function_calling_model defaults to False too, which silently disables tool calling for agents. Set both.

3. Make it the default for the whole app

So indexes and query engines pick it up without passing it around:

python
from llama_index.core import Settings

Settings.llm = llm

Exact values

api_base https://router.mingles.ai/v1
api_key <your-key>
model deepseek-ai/DeepSeek-V4-Flash-0731
context_window 128000

Switch model

OpenAILike is a thin wrapper over the OpenAI class — anything the OpenAI integration does, it does, against your endpoint.

Before you file a bug: read the limits

Reasoning models spend the output budget on internal thinking, output is capped at 8192 tokens, there is no KV cache, and there are no built-in web tools. Most “it broke on Mingles Router” reports are one of these. See Model limits & behavior →

Frequently asked

Why is my agent not calling tools? +

is_function_calling_model defaults to False. LlamaIndex then assumes the model cannot call tools and falls back to prompting tricks instead of the tools API. Set it to True.

What about the embedding model? +

Set Settings.embed_model to a provider that serves embeddings — we do not. A LlamaIndex app commonly uses one service for the LLM and another for embeddings.