Ending up with broken codebase with gemini-2.5-pro-preview-06-05 #732

Closed
opened 2026-02-16 17:28:03 -05:00 by yindo · 1 comment
Owner

Originally created by @janostik on GitHub (Jul 15, 2025).

Originally assigned to: @thdxr on GitHub.

Currently when using gemini in most of the times I'm ending up with broken codebase. The problem is that gemini gives you edit prompt which looks like:

return updatedAgent;
  }
  return null;
};
// ... in the return statement ...
<Button
  size="sm"
  variant="outline"
  className="h-8 gap-1"
  onClick={handleOpenCreateModal}
>
  <PlusCircle className="h-3 w-3" />
  Add Agent
</Button>
// ... after the main element ...
{agentToConfigure && isEditModalOpen && (

with the comments instructing the merge tool how the merge should proceed. For full trace take a look at the session: https://opencode.ai/s/BwOXLWV3
The prompt for the gemini should be improved in how to propose the changes.

Just a note:
Alternatively there are also models for more "cursor like" code merges. Finetuned models to do more intelligent merges like: https://huggingface.co/osmosis-ai/Osmosis-Apply-1.7B and could give bit of advantage over other cli tools. With these models you can save on inference cost, since you can instruct agent to make more targeted changes.

Since this is 2B parameter model it's somewhat lightweight, but not sure something you want to ship with the tool. Maybe a way for SST to make some money by hosting this, or allowing users to run local MCP if they have the resources required.

Originally created by @janostik on GitHub (Jul 15, 2025). Originally assigned to: @thdxr on GitHub. Currently when using gemini in most of the times I'm ending up with broken codebase. The problem is that gemini gives you edit prompt which looks like: ```typescript return updatedAgent; } return null; }; // ... in the return statement ... <Button size="sm" variant="outline" className="h-8 gap-1" onClick={handleOpenCreateModal} > <PlusCircle className="h-3 w-3" /> Add Agent </Button> // ... after the main element ... {agentToConfigure && isEditModalOpen && ( ``` with the comments instructing the merge tool how the merge should proceed. For full trace take a look at the session: https://opencode.ai/s/BwOXLWV3 The prompt for the gemini should be improved in how to propose the changes. **Just a note:** Alternatively there are also models for more "cursor like" code merges. Finetuned models to do more intelligent merges like: https://huggingface.co/osmosis-ai/Osmosis-Apply-1.7B and could give bit of advantage over other cli tools. With these models you can save on inference cost, since you can instruct agent to make more targeted changes. Since this is 2B parameter model it's somewhat lightweight, but not sure something you want to ship with the tool. Maybe a way for SST to make some money by hosting this, or allowing users to run local MCP if they have the resources required.
yindo added the model-problem label 2026-02-16 17:28:03 -05:00
yindo closed this issue 2026-02-16 17:28:03 -05:00
Author
Owner

@janostik commented on GitHub (Aug 14, 2025):

No longer having these problems in latest version.

@janostik commented on GitHub (Aug 14, 2025): No longer having these problems in latest version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#732