Skip to content
Updates & support on Telegram

llama_index.llms.openai_like.[OI]Like

Native [OI] support

LlamaIndex with an [OI]-compatible endpoint

LlamaIndex's [OI]Like class is built for [OI]-compatible servers with a custom base URL. Point it at the gateway and plug it into your existing indexes.

Base URL

https://uncensoredai.dev/v1

  1. 01

    Configure the model

    [OI]Like takes api_base and model. Always pass context_window explicitly — the class has no built-in model table and will otherwise truncate long prompts.

    python
    from llama_index.llms.openai_like import [OI]Like
    from llama_index.core import Settings
    
    llm = [OI]Like(
        model="deepseek-v4.1-flash",
        api_base="https://uncensoredai.dev/v1",
        api_key="sk-ua-XXXX-XXXX-XXXX-XXXX",
        is_chat_model=True,
        context_window=1000000,
        max_tokens=65536,
    )
    
    Settings.llm = llm
  2. 02

    Use it in a query engine

    Assign it to Settings.llm or pass it per index — RAG behaviour is unchanged.

FAQ

Why [OI]Like instead of [OI] in LlamaIndex?+

[OI]Like exists specifically for [OI]-compatible servers with a custom base URL and avoids [OI]-only assumptions.

Can I use embeddings from the gateway?+

Not currently — the catalog is chat completions only. Keep embeddings on your existing provider.

More integrations