AI_APICallError: Please ensure that single turn requests end with a user role or the role field is empty. #926

Closed
opened 2026-02-16 17:28:47 -05:00 by yindo · 2 comments
Owner

Originally created by @esafak on GitHub (Jul 25, 2025).

Originally assigned to: @thdxr on GitHub.

This is with Gemini 2.5 Flash Lite Preview 06-17 in Build mode on 0.3.74 0.3.79

Originally created by @esafak on GitHub (Jul 25, 2025). Originally assigned to: @thdxr on GitHub. This is with Gemini 2.5 Flash Lite Preview 06-17 in Build mode on ~~0.3.74~~ 0.3.79
yindo closed this issue 2026-02-16 17:28:47 -05:00
Author
Owner

@thdxr commented on GitHub (Aug 12, 2025):

closing this old issue - not enough detail to debug and it's been 2+ weeks. if you're still hitting this with gemini, feel free to open a new one with more context about what you were doing when it happened

@thdxr commented on GitHub (Aug 12, 2025): closing this old issue - not enough detail to debug and it's been 2+ weeks. if you're still hitting this with gemini, feel free to open a new one with more context about what you were doing when it happened
Author
Owner

@aka7774 commented on GitHub (Sep 17, 2025):

Reference: This issue was reproduced in v0.9.6.

opencode -m "google/gemini-2.5-flash-lite-preview-06-17"

This issue occurs when calling opencode within this command.
This issue does not occur with google/gemini-2.5-pro, so it is likely due to a hold on the model.
I actually wanted to run it on the lightweight model to avoid rate limits, but gave up.

@aka7774 commented on GitHub (Sep 17, 2025): Reference: This issue was reproduced in v0.9.6. opencode -m "google/gemini-2.5-flash-lite-preview-06-17" This issue occurs when calling opencode within this command. This issue does not occur with google/gemini-2.5-pro, so it is likely due to a hold on the model. I actually wanted to run it on the lightweight model to avoid rate limits, but gave up.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#926