I’m running into an odd issue with the Assistant API, specifically when using the instructions
parameter in client.beta.threads.runs.create
. Even when I pass very minimal and clear extra instructions (e.g., the current time or a language setting), the assistant’s behavior becomes inconsistent or confused.
run = client.beta.threads.runs.create(
thread_id=thread_id,
assistant_id=assistant_id,
model="gpt-4o",
instructions="The current time is 2025-06-20 11:12. Please respond in Swedish.",
tools=[{"type": "file_search"}]
)
With the above, the assistant either:
- Fails to respond correctly,
- Ignores the instruction altogether,
But when I omit the instructions
argument entirely, the assistant works as expected.
My questions:
- Is this a known issue — that
instructions
may override/conflict with the system prompt too aggressively? - Is this model-related? (e.g., more sensitive in
gpt-4o
than others?) - Are there best practices for injecting minor dynamic context (like timestamps) without breaking assistant behavior?
- Has anyone found reliable workarounds?