Hello! We're running into an issue with the new xA...
# agents
a
Hello! We're running into an issue with the new xAI plugin (v1.3.9) where custom instructions aren't making it to Grok. I'll leave some details in thread but just curious if anyone has some advice or if we should file an issue on github
Quick summary: - Using livekit-agents==1.3.9 and livekit-plugins-xai==1.3.9 - Tried two approaches: a. xai.realtime.RealtimeModel(instructions="...") → TypeError: unexpected keyword argument b. Agent(instructions="...", llm=xai.realtime.RealtimeModel()) → starts fine, but Grok completely ignores the system prompt What's weird: The exact same pattern works perfectly with OpenAI Realtime. Instructions get forwarded properly and the model follows the prompt as expected. Current behavior: Grok just uses its default personality regardless of what we pass to Agent.instructions. It's like the instructions never make it through the plugin to the xAI API. Is this a known limitation, or are we missing something in how xAI needs to be configured? Happy to provide more details
s
Instructions should be on the Agent as you have in your second example, or on the AgentSession -- not passed as a parameter to the model.
There was a PR intended to fix this but if you're on 1.3.9 it's possible that did not happen. Try setting it on the AgentSession when you construct it, as opposed to the Agent
Question to help narrow this down -- are all instructions ignored, or are instructions passed to
Agent.session.generate_reply()
ignored?
a
Thanks for the the reply! Unfortunately we're still not having much luck. We've tested a few things": 1. xai.realtime.RealtimeModel(instructions="...") → TypeError: unexpected keyword argument 2. Agent(instructions="...", llm=xai.realtime.RealtimeModel()) → No error, but Grok ignores instructions completely 3. AgentSession(instructions="...") → TypeError: unexpected keyword argument All instructions seem to be ignored for xAI - it uses default Grok behavior regardless of what we pass. The same code (Agent(instructions=..., llm=openai.realtime.RealtimeModel())) works great with OpenAI Realtime Seems like the xAI plugin isn't forwarding instructions to the xAI API via session.update. "Version: livekit-plugins-xai==1.3.9 (latest)"
Ah yeah I added that issue and then closed it because I wasn't confident I was correct 😄. Reopened