agents icon indicating copy to clipboard operation
agents copied to clipboard

No llm response for the model gpt-5-mini

Open satheeshkhl opened this issue 6 months ago • 1 comments

Bug Description

Bug Report: gpt-5-mini (Azure) returns empty response in streaming mode while gpt-5.4-nano works

Summary

When using gpt-5-mini via Azure OpenAI in a LiveKit streaming setup, the model does not return any text or tool call. The stream completes but no content is produced.

However, when switching to gpt-5.4-nano with the same exact code and configuration, the system works correctly and returns proper responses.

This indicates a model-specific issue or incompatibility with gpt-5-mini in Azure streaming/tool-calling setup.


Environment

  • Framework: LiveKit Agents (livekit.agents)
  • LLM wrapper: openai.LLM.with_azure
  • Azure OpenAI deployment
  • Python: 3.10+
  • HTTP client: httpx
  • Streaming enabled: stream=True
  • Tools enabled: Yes (tool_schemas passed)

Model Comparison

Failing Model

  • gpt-5-mini (Azure deployment)

Working Model

  • gpt-5.4-nano (Azure deployment)

LLM Configuration

session_llm = AgentSession(
    llm=openai.LLM.with_azure(
        model=AZURE_DEPLOYMENT,
        azure_deployment=AZURE_DEPLOYMENT,
        api_key=AZURE_API_KEY,
        azure_endpoint=AZURE_OPENAI_ENDPOINT,
        api_version=AZURE_OPENAI_API_VERSION,
        timeout=httpx.Timeout(connect=20.0, read=600.0, write=30.0, pool=30.0),
        max_completion_tokens=4096,
    ),
    max_tool_steps=20,
)

### Expected Behavior

[USER INPUT] >>> hi
📨 [USER → LLM]: 'hi'
[LLM RESPONSE] <<< Hi, I’m AI—what would you like to learn or work on today in Python or related topics?

### Reproduction Steps

```bash
Start LiveKit agent session
Send user input:
hi
Run _run() method with streaming enabled
Observe logs from debug print section

Operating System

Windows 11

Models Used

llm only, with gpt-5-mini

Package Versions

Name: livekit-agents
Version: 1.5.16
Summary: A powerful framework for building realtime voice AI agents
Home-page:
Author:
Author-email: LiveKit <[email protected]>
License:
Location: /data/veda-livekit/veda-agent/agent/lib/python3.10/site-packages
Requires: aiofiles, aiohttp, av, certifi, click, colorama, docstring-parser, eval-type-backport, json-repair, livekit, livekit-api, livekit-blingfire, livekit-protocol, nest-asyncio, numpy, openai, opentelemetry-api, opentelemetry-exporter-otlp, opentelemetry-sdk, prometheus-client, protobuf, psutil, pydantic, pyjwt, sounddevice, typer, types-protobuf, typing-extensions, watchfiles
Required-by: livekit-plugins-azure, livekit-plugins-openai

Session/Room/Call IDs

No response

Proposed Solution


Additional Context

No response

Screenshots and Recordings

No response

satheeshkhl avatar Jun 02 '26 11:06 satheeshkhl

One possible thing to check:

There are reports of gpt-5-mini returning an empty response/output text even though the request completes successfully. Some users were able to work around it by explicitly forcing text output format, for example:

response = await client.responses.create( model="gpt-5-mini", input=[...], text={"format": {"type": "text"}}, )

Could this be related to how the Azure/OpenAI response is being parsed in the current plugin implementation?

For reference, there is a discussion here describing similar gpt-5-mini empty-output behavior: https://community.openai.com/t/gpt-5-mini-responses-api-empty-output-text-issue/1342786

acharan-tech-200037 avatar Jun 09 '26 13:06 acharan-tech-200037