feat: claude-code backends + llamaswap provider + dogfood the CC engine (#3)
Build & push image / build-and-push (push) Successful in 10s
Build & push image / build-and-push (push) Successful in 10s
Phase 2: bump majordomo to latest and wire its new llamaswap provider into gadfly's endpoint switches; add claude-code/sonnet to gadfly's own dogfood swarm (pin :sha-86f12c1, map CLAUDE_CODE_OAUTH_TOKEN) so the Phase-1 engine runs as a live competitor; document the Ollama-through-CC ANTHROPIC_BASE_URL proxy path as example-only. The 11-model swarm (incl. claude-code/sonnet) reviewed it; 52 findings graded via the MCP. Folded in the two real ones: a llamaswap endpointProvider test (caught by claude-code/sonnet, citing CLAUDE.md) and adding "openai-compatible" to the provider error messages (gpt-oss). gofmt clean, go vet quiet, go build + go test -race green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Steve Dudenhoeffer <[email protected]> Co-committed-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #3.
This commit is contained in:
@@ -32,6 +32,20 @@ func TestEndpointProvider(t *testing.T) {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
})
|
||||
t.Run("llamaswap registers under its name", func(t *testing.T) {
|
||||
p, err := endpointProvider("ls", "llamaswap|http://swap.lan:8080|tok")
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if p.Name() != "ls" {
|
||||
t.Errorf("Name() = %q, want %q", p.Name(), "ls")
|
||||
}
|
||||
})
|
||||
t.Run("llamaswap without token", func(t *testing.T) {
|
||||
if _, err := endpointProvider("ls2", "llamaswap|http://swap.lan:8080"); err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
})
|
||||
for _, bad := range []string{"", "ollama", "noprovider-no-pipe", "mystery|http://x"} {
|
||||
t.Run("rejects "+bad, func(t *testing.T) {
|
||||
if _, err := endpointProvider("n", bad); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user