Skip to content

Support separate models & mechanism for applying changes #5880

@anh-chu

Description

@anh-chu

What specific problem does this solve?

  • Problem: apply_diff intermittently fails with various models
  • All users are affected
  • This happens when models are trying to edit files with apply_diff, but particularly more with setups like automatic linting/prettier. Seems to also happens more with multiple continuous edits where (presumably) the models become more flaky with context. I am using both Claude Sonnet 4 and Gemini Pro 2.5 Preview.
  • Current behavior: the chat/edit models use apply_diff themselves, requiring strict diff format and adherence to existing file contents while also diluting the context window.
  • Expected behavior: a separate apply model such as Morph Fast Apply or Relace’s Instant Apply model can be chosen to apply changes instead, reducing the burden of generating lengthy and correct diffs.
  • Impact: the current methods consume more tokens, enlarge the context, and can be more unreliable and time-consuming. With a new apply method, we can expect stable, long running flows with fewer re-edits.

Additional context (optional)

This is inspired by continue.dev's paradigm, which literally never failed me while making complex edits. Some links:

Roo Code Task Links (Optional)

No response

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear impact and context

Interested in implementing this?

  • Yes, I'd like to help implement this feature

Implementation requirements

  • I understand this needs approval before implementation begins

How should this be solved? (REQUIRED if contributing, optional otherwise)

No response

How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)

No response

Technical considerations (REQUIRED if contributing, optional otherwise)

No response

Trade-offs and risks (REQUIRED if contributing, optional otherwise)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.enhancementNew feature or requestproposal

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions