Agent Warnings

Receive warnings from the server if an issue has occurred.
Voice Agent

A notification from the server to the client of a non-fatal error or warning.

Purpose

The Warning message is a non-fatal error or warning that the server will send to the client to notify the client of possible issues. If you receive a Warning message, check the warning code and description to identify the specific issue. Follow the recommended resolution and implement appropriate error handling.

Warnings are non-fatal and your application should continue to function normally.

Example Payload

The server will send a Warning message to the client to notify the client of possible issues.

1{
2 "type": "Warning",
3 "description": "" // A description of the warning
4 "code": "" // The code of the warning
5}

Types of Warnings

WarningMessageRecommended Resolution
INJECT_AGENT_MESSAGE_DURING_USER_SPEECHInjectAgentMessage was ignored during user speech.Wait for the user to finish speaking before attempting to inject a new agent message.
INJECT_AGENT_MESSAGE_DURING_AGENT_SPEECHInjectAgentMessage was ignored during agent speech.Wait for the agent to complete its current response before injecting a new message.
PROMPT_TOO_LONGThe prompt was too long and had to be truncated.Reduce the length of your prompt to fit within the maximum allowed size limit. Limit of 25,000 characters for managed LLMs and unlimited for BYO LLMs.
THINK_REQUEST_FAILEDWe encountered an error when making a request to a think provider.Review provider error message & respond accordingly. Always specify a fallback think provider to be robust to individual provider outages.
SPEAK_REQUEST_FAILEDWe encountered an error when making a request to a speak provider.Review provider error message & respond accordingly. Always specify a fallback speak provider to be robust to individual provider outages.
FUNCTION_CALL_FAILEDWe encountered an error when making a function call.Review provider error message & respond accordingly. Always specify a fallback think provider to be robust to individual provider outages.
SLOW_THINK_REQUESTA request to a think provider is taking a long time.Monitor for ongoing slowness and consider another think provider, pending your use case.
SLOW_SPEAK_REQUESTA request to a speak provider is taking a long time.Monitor for ongoing slowness and consider another speak provider, pending your use case.
GPT_4O_STREAM_END_ERRORgpt-4o specifically can have an error where it fails to send a final done messageMonitor for ongoing errors and consider another LLM model or provider.