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/bash.go b/claudetool/bash.go
index b3b8b03..882dddf 100644
--- a/claudetool/bash.go
+++ b/claudetool/bash.go
@@ -13,8 +13,8 @@
"syscall"
"time"
- "sketch.dev/ant"
"sketch.dev/claudetool/bashkit"
+ "sketch.dev/llm"
)
// PermissionCallback is a function type for checking if a command is allowed to run
@@ -27,15 +27,15 @@
}
// NewBashTool creates a new Bash tool with optional permission callback
-func NewBashTool(checkPermission PermissionCallback) *ant.Tool {
+func NewBashTool(checkPermission PermissionCallback) *llm.Tool {
tool := &BashTool{
CheckPermission: checkPermission,
}
- return &ant.Tool{
+ return &llm.Tool{
Name: bashName,
Description: strings.TrimSpace(bashDescription),
- InputSchema: ant.MustSchema(bashInputSchema),
+ InputSchema: llm.MustSchema(bashInputSchema),
Run: tool.Run,
}
}