agreeable-egg-80889
03/18/2026, 6:49 PMtall-airline-16756
03/18/2026, 6:49 PMtall-airline-16756
03/18/2026, 6:49 PMagreeable-egg-80889
03/18/2026, 6:50 PMlivekit.agents._exceptions.APIStatusError: Error code: 400 - {'error': {'message': 'Function tools with reasoning_effort are not supported for gpt-5.4-nano in /v1/chat/completions. Please use /v1/responses instead.', 'type': 'invalid_request_error', 'param': 'reasoning_effort', 'code': None}}tall-airline-16756
03/18/2026, 6:50 PMreasoning_effort with function tools is not supported for gpt-5.4-nano when you call the Chat Completions endpoint (/v1/chat/completions). That combination triggers the 400 error you pasted.
You have two straightforward options:
• Use the OpenAI Responses API (/v1/responses) which supports reasoning_effort together with provider/function tools for gpt-5.4-nano. In LiveKit, switch to openai.responses.LLM() when creating your agent session. Example pattern:
from livekit.plugins import openai
session = AgentSession(
llm=openai.responses.LLM(
model="gpt-5.4-nano",
),
# ... other parameters
)
• Or keep using the Chat Completions API (/v1/chat/completions) but remove/disable the reasoning_effort parameter (or avoid combining it with function tools) for this model. That will stop the 400 error.
Which path would you prefer to take? If you want, tell me whether you’re using LiveKit code already and share the snippet that constructs the LLM/agent session — I can suggest the exact change.
Sources: OpenAI LLM models | LiveKit Documentation | Large language models (LLM) overview | LiveKit Documentation | xAI LLM plugin guide | LiveKit Documentation, with interactive elementsagreeable-egg-80889
03/18/2026, 6:53 PMtall-airline-16756
03/18/2026, 6:53 PMreasoning_effort parameter and/or avoid using function/provider tools with gpt-5.4-nano in the Chat Completions flow.
• Example change: locate where you construct the LLM/agent session and either delete the reasoning_effort setting or set it to `None`/omit it. That will stop the 400 error immediately.
Option B — Use the OpenAI Responses API (recommended if you need reasoning with tools)
• Switch your LiveKit LLM to openai.responses.LLM() so you can use reasoning_effort together with provider tools (WebSearch, FileSearch, CodeInterpreter, etc.) for gpt-5.4-nano.
• Example pattern:
from livekit.plugins import openai
session = AgentSession(
llm=openai.responses.LLM(
model="gpt-5.4-nano",
# keep/add any other LLM params here
),
# ... other AgentSession params (tools, memory, etc.)
)
• After switching, you can provide reasoning_effort where needed and use provider tools without hitting the chat-completions limitation.
Next steps — tell me which option you want:
• If Option A, paste the small snippet where you create the LLM/AgentSession and I’ll show exactly which line to remove.
• If Option B, paste your current session code and I’ll adjust it to use openai.responses.LLM() and show where to add reasoning_effort.
I can produce the exact code edits once you share the relevant snippet.
, with interactive elementsagreeable-egg-80889
03/18/2026, 6:54 PMopenai_model = livekit.plugins.openai.LLM(
model=effective_model,
api_key=openai_api_key,
base_url=settings.openai_base_url,
timeout=timeout,
# Type will be updated in later livekit-agents version to include "none"
reasoning_effort=reasoning_effort_value,
verbosity="low",
extra_kwargs=extra_kwargs,
)tall-airline-16756
03/18/2026, 6:54 PMreasoning_effort by either omitting the parameter or passing Python's None. Both approaches stop LiveKit from sending a reasoning_effort value to the Chat Completions endpoint and will avoid the 400 error for gpt-5.4-nano.
Two safe options:
1) Omit the parameter (recommended — cleanest):
openai_model = livekit.plugins.openai.LLM(
model=effective_model,
api_key=openai_api_key,
base_url=settings.openai_base_url,
timeout=timeout,
verbosity="low",
extra_kwargs=extra_kwargs,
)
2) Pass None explicitly:
openai_model = livekit.plugins.openai.LLM(
model=effective_model,
api_key=openai_api_key,
base_url=settings.openai_base_url,
timeout=timeout,
reasoning_effort=None, # explicitly disable reasoning_effort
verbosity="low",
extra_kwargs=extra_kwargs,
)
Either option will prevent the reasoning_effort parameter from being sent with the Chat Completions call. If you still need reasoning_effort together with provider/function tools, switch to openai.responses.LLM() as discussed earlier — I can show that exact change if you want.
, with interactive elementsagreeable-egg-80889
03/18/2026, 6:56 PMtall-airline-16756
03/18/2026, 6:56 PMreasoning_effort. OpenAI does not enable a separate “reasoning effort” flag by default.
• reasoning_effort is a LiveKit-specific option. To ensure no reasoning is applied via LiveKit, omit the parameter or set it to None (and avoid provider/function tools in Chat Completions for gpt-5.4-nano).
• If you want the model to behave as literally/ deterministically as possible, control it with temperature=0 and prompt wording — but some internal reasoning is intrinsic to the model and cannot be fully disabled.
What’s happening in your setup
• The 400 error you saw happens because LiveKit was sending a reasoning_effort value to the Chat Completions endpoint with gpt-5.4-nano while also using function/provider tools. That combination is not supported for the Chat Completions API. The root: reasoning_effort is a LiveKit extension, not an OpenAI core API field.
How to ensure no reasoning is applied (practical options)
• Omit reasoning_effort (recommended, cleanest):
openai_model = livekit.plugins.openai.LLM(
model=effective_model,
api_key=openai_api_key,
base_url=settings.openai_base_url,
timeout=timeout,
verbosity="low",
extra_kwargs=extra_kwargs,
)
• Or explicitly pass None:
openai_model = livekit.plugins.openai.LLM(
model=effective_model,
api_key=openai_api_key,
base_url=settings.openai_base_url,
timeout=timeout,
reasoning_effort=None, # explicitly disable LiveKit's reasoning option
verbosity="low",
extra_kwargs=extra_kwargs,
)
• If you need reasoning + tools, switch to the Responses API via openai.responses.LLM() in LiveKit — that supports reasoning_effort with provider tools. Otherwise, do not combine reasoning_effort + function tools on the Chat Completions path.
How to reduce the model’s internal “reasoning” style
• Set temperature=0 for deterministic, less creative outputs.
• Keep prompts explicit and instruct the model to avoid step-by-step thinking (e.g., “Provide a concise answer without showing step-by-step reasoning.”).
• Use a simpler or smaller model if you want less elaborate outputs.
If you’d like, I can:
• Show the exact minimal edit to your existing snippet to remove reasoning_effort.
• Convert your current Chat Completions LiveKit code to the Responses API version if you need to keep reasoning_effort with tools.
Which would you prefer?
Sources: OpenAI LLM models | LiveKit Documentation, with interactive elements