all: support openai-compatible models
The support is rather minimal at this point:
Only hard-coded models, only -unsafe, only -skabandaddr="".
The "shared" LLM package is strongly Claude-flavored.
We can fix all of this and more over time, if we are inspired to.
(Maybe we'll switch to https://github.com/maruel/genai?)
The goal for now is to get the rough structure in place.
I've rebased and rebuilt this more times than I care to remember.
diff --git a/loop/donetool.go b/loop/donetool.go
index e4b0542..63604d8 100644
--- a/loop/donetool.go
+++ b/loop/donetool.go
@@ -5,8 +5,8 @@
"encoding/json"
"fmt"
- "sketch.dev/ant"
"sketch.dev/claudetool"
+ "sketch.dev/llm"
)
// makeDoneTool creates a tool that provides a checklist to the agent. There
@@ -14,8 +14,8 @@
// not as reliable as it could be. Historically, we've found that Claude ignores
// the tool results here, so we don't tell the tool to say "hey, really check this"
// at the moment, though we've tried.
-func makeDoneTool(codereview *claudetool.CodeReviewer, gitUsername, gitEmail string) *ant.Tool {
- return &ant.Tool{
+func makeDoneTool(codereview *claudetool.CodeReviewer, gitUsername, gitEmail string) *llm.Tool {
+ return &llm.Tool{
Name: "done",
Description: `Use this tool when you have achieved the user's goal. The parameters form a checklist which you should evaluate.`,
InputSchema: json.RawMessage(doneChecklistJSONSchema(gitUsername, gitEmail)),