@@ -10,10 +10,7 @@ import (
11 "charm.land/catwalk/pkg/catwalk"
11 "charm.land/catwalk/pkg/catwalk"
12 "charm.land/fantasy"
12 "charm.land/fantasy"
13− "charm.land/fantasy/providers/anthropic"
14− "charm.land/fantasy/providers/openai"
15 "charm.land/fantasy/providers/openaicompat"
13 "charm.land/fantasy/providers/openaicompat"
16− "charm.land/fantasy/providers/openrouter"
17 "charm.land/x/vcr"
14 "charm.land/x/vcr"
18 "github.com/charmbracelet/crush/internal/agent/prompt"
15 "github.com/charmbracelet/crush/internal/agent/prompt"
19 "github.com/charmbracelet/crush/internal/agent/tools"
16 "github.com/charmbracelet/crush/internal/agent/tools"
@@ -50,50 +47,11 @@ type modelPair struct {
50 smallModel builderFunc
47 smallModel builderFunc
53−func anthropicBuilder(model string) builderFunc {
54− return func(t *testing.T, r *vcr.Recorder) (fantasy.LanguageModel, error) {
55− provider, err := anthropic.New(
56− anthropic.WithAPIKey(os.Getenv("CRUSH_ANTHROPIC_API_KEY")),
57− anthropic.WithHTTPClient(&http.Client{Transport: r}),
62− return provider.LanguageModel(t.Context(), model)
66−func openaiBuilder(model string) builderFunc {
67− return func(t *testing.T, r *vcr.Recorder) (fantasy.LanguageModel, error) {
68− provider, err := openai.New(
69− openai.WithAPIKey(os.Getenv("CRUSH_OPENAI_API_KEY")),
70− openai.WithHTTPClient(&http.Client{Transport: r}),
75− return provider.LanguageModel(t.Context(), model)
79−func openRouterBuilder(model string) builderFunc {
80− return func(t *testing.T, r *vcr.Recorder) (fantasy.LanguageModel, error) {
81− provider, err := openrouter.New(
82− openrouter.WithAPIKey(os.Getenv("CRUSH_OPENROUTER_API_KEY")),
83− openrouter.WithHTTPClient(&http.Client{Transport: r}),
88− return provider.LanguageModel(t.Context(), model)
92−func zAIBuilder(model string) builderFunc {
50+func hyperBuilder(model string) builderFunc {
93 return func(t *testing.T, r *vcr.Recorder) (fantasy.LanguageModel, error) {
51 return func(t *testing.T, r *vcr.Recorder) (fantasy.LanguageModel, error) {
94 provider, err := openaicompat.New(
52 provider, err := openaicompat.New(
95− openaicompat.WithBaseURL("https://api.z.ai/api/coding/paas/v4"),
53+ openaicompat.WithBaseURL("https://hyper.charm.land/v1"),
96− openaicompat.WithAPIKey(os.Getenv("CRUSH_ZAI_API_KEY")),
54+ openaicompat.WithAPIKey(os.Getenv("CRUSH_HYPER_API_KEY")),
97 openaicompat.WithHTTPClient(&http.Client{Transport: r}),
55 openaicompat.WithHTTPClient(&http.Client{Transport: r}),
99 if err != nil {
57 if err != nil {