diff --git a/README.md b/README.md index e9cf374..765b84d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Env vars (override at the shell): | `LICENCE_SIGNING_KEY` / `LICENCE_ISSUER` / `LICENCE_TTL_DAYS` | empty (ephemeral) / `tenant-registry` / `30` | CLI licence signer (base64 Ed25519 seed) | | `LITELLM_BASE_URL` | `https://llm.breakpilot.com` | LiteLLM proxy root; returned to Werkpilot as `llm_base_url` | | `LITELLM_MASTER_KEY` | empty (LLM keys off — logged once at start) | LiteLLM admin key for `/key/generate` + `/key/delete` (secret) | -| `LITELLM_MODELS` | `Qwen3-Coder-30B-A3B-Instruct,gpt-oss-120b` | Comma list of models a tenant key may call | +| `LITELLM_MODELS` | `Qwen3-Coder-30B-A3B-Instruct,gpt-oss-120b,Qwen3.8-27B` | Comma list of models a tenant key may call | | `LITELLM_BUDGET_TRIAL` / `LITELLM_BUDGET_DEFAULT` | `5` / `50` | USD per 30 days (`budget_duration: 30d`) for trial / paying tenants | ## Endpoints diff --git a/internal/config/config.go b/internal/config/config.go index f8e12a8..3831255 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -120,7 +120,7 @@ func Load() (*Config, error) { LiteLLMBaseURL: getenv("LITELLM_BASE_URL", "https://llm.breakpilot.com"), LiteLLMMasterKey: os.Getenv("LITELLM_MASTER_KEY"), - LiteLLMModels: getlist("LITELLM_MODELS", []string{"Qwen3-Coder-30B-A3B-Instruct", "gpt-oss-120b"}), + LiteLLMModels: getlist("LITELLM_MODELS", []string{"Qwen3-Coder-30B-A3B-Instruct", "gpt-oss-120b", "Qwen3.8-27B"}), LiteLLMBudgetTrial: getfloat("LITELLM_BUDGET_TRIAL", 5), LiteLLMBudgetDefault: getfloat("LITELLM_BUDGET_DEFAULT", 50), }, nil diff --git a/internal/config/config_test.go b/internal/config/config_test.go index f63b943..acfc72f 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -61,7 +61,7 @@ func TestLoad_litellmDefaultsAndOverrides(t *testing.T) { t.Fatal(err) } if cfg.LiteLLMBaseURL != "https://llm.breakpilot.com" || cfg.LiteLLMMasterKey != "" || - len(cfg.LiteLLMModels) != 2 || cfg.LiteLLMModels[0] != "Qwen3-Coder-30B-A3B-Instruct" || cfg.LiteLLMModels[1] != "gpt-oss-120b" || + len(cfg.LiteLLMModels) != 3 || cfg.LiteLLMModels[0] != "Qwen3-Coder-30B-A3B-Instruct" || cfg.LiteLLMModels[1] != "gpt-oss-120b" || cfg.LiteLLMModels[2] != "Qwen3.8-27B" || cfg.LiteLLMBudgetTrial != 5 || cfg.LiteLLMBudgetDefault != 50 { t.Errorf("litellm defaults: %+v", cfg) } @@ -82,7 +82,7 @@ func TestLoad_litellmDefaultsAndOverrides(t *testing.T) { } // a list of only separators falls back to the default t.Setenv("LITELLM_MODELS", " , ") - if cfg, _ = Load(); len(cfg.LiteLLMModels) != 2 { + if cfg, _ = Load(); len(cfg.LiteLLMModels) != 3 { t.Errorf("blank list should fall back: %v", cfg.LiteLLMModels) } } diff --git a/internal/llmkeys/llmkeys.go b/internal/llmkeys/llmkeys.go index 2e3a0c6..603e426 100644 --- a/internal/llmkeys/llmkeys.go +++ b/internal/llmkeys/llmkeys.go @@ -28,7 +28,7 @@ const ( ) // DefaultModels are the models tenant keys may call. -var DefaultModels = []string{"Qwen3-Coder-30B-A3B-Instruct", "gpt-oss-120b"} +var DefaultModels = []string{"Qwen3-Coder-30B-A3B-Instruct", "gpt-oss-120b", "Qwen3.8-27B"} // ErrDisabled — no master key configured. var ErrDisabled = errors.New("llmkeys: disabled (no master key)") diff --git a/internal/llmkeys/llmkeys_test.go b/internal/llmkeys/llmkeys_test.go index 73d9dc6..d223136 100644 --- a/internal/llmkeys/llmkeys_test.go +++ b/internal/llmkeys/llmkeys_test.go @@ -59,7 +59,7 @@ func TestClient_generateAndDelete(t *testing.T) { if !c.Enabled() || c.BaseURL() != srv.URL || c.Budget(true) != DefaultBudgetTrial || c.Budget(false) != DefaultBudgetDefault || c.BudgetDuration() != DefaultBudgetDuration { t.Fatalf("defaults: %+v", c.cfg) } - if m := c.Models(); len(m) != 2 || m[0] != DefaultModels[0] { + if m := c.Models(); len(m) != len(DefaultModels) || m[0] != DefaultModels[0] || m[len(m)-1] != "Qwen3.8-27B" { t.Fatalf("models: %v", m) } k, err := c.Generate(context.Background(), GenerateRequest{ diff --git a/internal/server/licences_llm_test.go b/internal/server/licences_llm_test.go index 9fad5e2..e380a1a 100644 --- a/internal/server/licences_llm_test.go +++ b/internal/server/licences_llm_test.go @@ -104,7 +104,7 @@ func TestLicences_llmKey_issueRenewRevoke(t *testing.T) { if g["key_alias"] != "werkpilot-llm-co-"+lic.ID || g["max_budget"] != 5.0 || g["budget_duration"] != "30d" { t.Fatalf("generate body: %+v", g) } - if models, _ := g["models"].([]any); len(models) != 2 || models[0] != "Qwen3-Coder-30B-A3B-Instruct" || models[1] != "gpt-oss-120b" { + if models, _ := g["models"].([]any); len(models) != 3 || models[0] != "Qwen3-Coder-30B-A3B-Instruct" || models[1] != "gpt-oss-120b" || models[2] != "Qwen3.8-27B" { t.Fatalf("models: %v", g["models"]) } md, _ := g["metadata"].(map[string]any)