Skip to content

Bug: The Grok's response API can only answer the first, third, fifth, seventh sentences #25

@alabulei1

Description

@alabulei1

When I use EchoKit Box + Grok's response API, It can only answer the first, third, fifth, seventh sentences.

To reproduce this error, set LLM to the Grok's response APi

[llm]
platform = "openai_responses"
url = "https://api.x.ai/v1/responses"
api_key = ""
model = "grok-4-1-fast-non-reasoning"

The log below shows when I say Hey, the ASR worked well and I can see the ASR result on the screen but I can't hear any voices back. From the log I can see the LLM doesn't generate answers. When I say the next sentence Hello, the response API works well.

[2026-01-14T17:39:35Z INFO  echokit_server::services::ws] `fc012ccfc8dc` ASR took: 302.767333ms
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws] ASR result: " Hey!"
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 asr result:  Hey!
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 started llm and tts handling for this input
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable::llm] start llm responses
[2026-01-14T17:39:35Z DEBUG echokit_server::ai] #### send to responses llm:
    {
      "model": "grok-4-1-fast-non-reasoning",
      "previous_response_id": "a030ed39-bad3-743b-3c62-72a4b067c71a",
      "instructions": "Your name is EchoKit, a smart and highly individualistic AI assistant. Your current mission is to help users to manager their google calendar. When users mention they want to manage the calendar(Adding events and delete events), please call the MCP server to do that. The default time is SGT.\n\n- NEVER use bullet points\n- NEVER use tables\n- Answer in complete English sentences but shortly as if you are in a conversation.\n\n",
      "input": " Hey!",
      "stream": true
    }
    #####
[2026-01-14T17:39:35Z DEBUG reqwest::connect] starting new connection: https://api.x.ai/
[2026-01-14T17:39:35Z DEBUG hyper_util::client::legacy::connect::http] connecting to 104.18.18.80:443
[2026-01-14T17:39:35Z DEBUG hyper_util::client::legacy::connect::http] connected to 104.18.18.80:443
[2026-01-14T17:39:35Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.x.ai)
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable::llm] llm responses done
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 session processing done for this input
[2026-01-14T17:39:35Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 waiting for asr input
[2026-01-14T17:39:35Z DEBUG echokit_server::services::ws] EndResponse
[2026-01-14T17:39:39Z DEBUG echokit_server::services::ws] Received text message: {"event":"StartChat"}
[2026-01-14T17:39:39Z DEBUG echokit_server::services::ws] Received binary message of size: 16384
[2026-01-14T17:39:40Z DEBUG echokit_server::services::ws] Received binary message of size: 15360
[2026-01-14T17:39:40Z DEBUG echokit_server::services::ws] Received text message: {"event":"Submit"}
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws] end audio
[2026-01-14T17:39:40Z DEBUG reqwest::connect] starting new connection: http://localhost:9093/
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::connect::http] connecting to [::1]:9093
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::connect::http] connecting to 127.0.0.1:9093
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::pool] reuse idle connection for ("https", api.groq.com)
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.groq.com)
[2026-01-14T17:39:40Z DEBUG echokit_server::ai] ASR response: Object {
        "text": String(" Hello?"),
        "x_groq": Object {
            "id": String("req_01keysez9ge5nbq51xf73cq3n0"),
        },
    }
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws] `fc012ccfc8dc` ASR took: 248.8465ms
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws] ASR result: " Hello?"
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 asr result:  Hello?
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 started llm and tts handling for this input
[2026-01-14T17:39:40Z INFO  echokit_server::services::ws::stable::llm] start llm responses
[2026-01-14T17:39:40Z DEBUG echokit_server::ai] #### send to responses llm:
    {
      "model": "grok-4-1-fast-non-reasoning",
      "instructions": "Your name is EchoKit, a smart and highly individualistic AI assistant. Your current mission is to help users to manager their google calendar. When users mention they want to manage the calendar(Adding events and delete events), please call the MCP server to do that. The default time is SGT.\n\n- NEVER use bullet points\n- NEVER use tables\n- Answer in complete English sentences but shortly as if you are in a conversation.\n\n",
      "input": " Hello?",
      "stream": true
   #####
[2026-01-14T17:39:40Z DEBUG reqwest::connect] starting new connection: https://api.x.ai/
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::connect::http] connecting to 104.18.18.80:443
[2026-01-14T17:39:40Z DEBUG hyper_util::client::legacy::connect::http] connected to 104.18.18.80:443
[2026-01-14T17:39:42Z DEBUG echokit_server::services::ws::stable::llm] llm responses chunk: "Hello! How can I help with your Google Calendar today?"
[2026-01-14T17:39:42Z INFO  echokit_server::services::ws::stable::tts] 3 processing TTS request: Hello! How can I help with your Google Calendar today?
[2026-01-14T17:39:42Z DEBUG echokit_server::ai::elevenlabs::tts] Connect Elevenlabs TTS WebSocket URL: wss://api.elevenlabs.io/v1/text-to-speech/pNInz6obpgDQGcFmaJgB/stream-input?model_id=eleven_flash_v2_5&output_format=pcm_16000
[2026-01-14T17:39:42Z INFO  echokit_server::services::ws::stable] fc012ccfc8dc:9172d0ba13b94799ae0b424632a80da6 starting tts for chunk: Hello! How can I help with your Google Calendar today?
[2026-01-14T17:39:42Z DEBUG reqwest::connect] starting new connection: https://api.elevenlabs.io/
[2026-01-14T17:39:42Z DEBUG hyper_util::client::legacy::connect::http] connecting to 34.36.213.91:443
[2026-01-14T17:39:42Z DEBUG hyper_util::client::legacy::connect::http] connected to 34.36.213.91:443

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