mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #93] [MERGED] feat: patch refiner #153
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/93
Author: @zavgorodnii
Created: 12/17/2025
Status: ✅ Merged
Merged: 12/29/2025
Merged by: @asdek
Base:
feat/graphiti-search← Head:feat/patch-refiner📝 Commits (1)
da9019bfeat: added patch refiner📊 Changes
12 files changed (+1129 additions, -22 deletions)
View changed files
📝
backend/pkg/providers/openai/config.yml(+2 -2)📝
backend/pkg/providers/performers.go(+47 -12)📝
backend/pkg/providers/provider.go(+7 -1)➕
backend/pkg/providers/subtask_patch.go(+249 -0)➕
backend/pkg/providers/subtask_patch_test.go(+679 -0)📝
backend/pkg/templates/prompts/refiner.tmpl(+38 -5)📝
backend/pkg/templates/templates.go(+1 -1)📝
backend/pkg/templates/validator/testdata.go(+1 -0)📝
backend/pkg/tools/args.go(+26 -0)📝
backend/pkg/tools/registry.go(+9 -0)📝
backend/pkg/tools/tools.go(+69 -0)📝
docker-compose.yml(+1 -1)📄 Description
Description of the Change
Problem
The current subtask refiner regenerates the entire subtask list on each refinement cycle, which is token inefficient - Requires the LLM to output all subtasks even when only minor changes are needed.
Solution
Implement a delta-based patch system for subtask refinement that allows the refiner to submit only the changes needed rather than regenerating the complete list.
Key changes:
SubtaskPatchwith four operation types:add,remove,modify, andreorderapplySubtaskOperations()function to apply patch operations to the existing subtask listGetRefinerExecutor()with the newsubtask_patchtoolAdditional optimizations:
gpt-5togpt-5-mini🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.