Skip to content

docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts #7022

Description

@cursor

Feature Type

Would make my life easier

Feature Description

LiveKit docs already cover custom base_url on openai.LLM() (Chat Completions). The trap is using openai.responses.LLM() against a host that only speaks HTTP Chat Completions / HTTP POST /v1/responses. The Responses helper is WebSocket-oriented and is the wrong class for a generic OpenAI-compat inference API.

PZERO is a live Chat Completions host (POST /v1/chat/completions). Public catalog: GET https://api.pzero.studio/v1/models. Default text id: deepseek-v4-flash. Prepaid Bearer key (pzero_…). Use chat openai.LLM(), not openai.responses.LLM(). Do not point STT or TTS at this host.

from livekit.plugins import openai

llm = openai.LLM(
    model="deepseek-v4-flash",
    base_url="https://api.pzero.studio/v1",
    api_key="pzero_…",
)

Node:

import * as openai from '@livekit/agents-plugin-openai';

const llm = new openai.LLM({
  model: 'deepseek-v4-flash',
  baseURL: 'https://api.pzero.studio/v1',
  apiKey: 'pzero_…',
});

Docs: https://docs.livekit.io/agents/models/llm/openai-compatible-llms/

No first-party with_pzero() helper asked.

Workarounds / Alternatives

The generic openai.LLM({ base_url }) constructor already works. This issue is the class-choice gotcha vs openai.responses.LLM().

Additional Context

PZERO POST /v1/responses exists over HTTP (401 without a key, not 404). That is not the LiveKit Responses WebSocket path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions