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/claudetool/differential.go b/claudetool/differential.go
index a6b3413..d76209a 100644
--- a/claudetool/differential.go
+++ b/claudetool/differential.go
@@ -20,18 +20,18 @@
"time"
"golang.org/x/tools/go/packages"
- "sketch.dev/ant"
+ "sketch.dev/llm"
)
// This file does differential quality analysis of a commit relative to a base commit.
// Tool returns a tool spec for a CodeReview tool backed by r.
-func (r *CodeReviewer) Tool() *ant.Tool {
- spec := &ant.Tool{
+func (r *CodeReviewer) Tool() *llm.Tool {
+ spec := &llm.Tool{
Name: "codereview",
Description: `Run an automated code review.`,
// If you modify this, update the termui template for prettier rendering.
- InputSchema: ant.MustSchema(`{"type": "object", "properties": {}}`),
+ InputSchema: llm.MustSchema(`{"type": "object", "properties": {}}`),
Run: r.Run,
}
return spec
@@ -663,7 +663,7 @@
// testStatus represents the status of a test in a given commit
type testStatus int
-//go:generate go tool stringer -type=testStatus -trimprefix=testStatus
+//go:generate go tool golang.org/x/tools/cmd/stringer -type=testStatus -trimprefix=testStatus
const (
testStatusUnknown testStatus = iota
testStatusPass