Skip to content

Commit

Permalink
Include 'openrouter' in list of model providers when adding a custom …
Browse files Browse the repository at this point in the history
…model, fixes #107
  • Loading branch information
danenania committed May 6, 2024
1 parent e0bd047 commit a940d2f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions app/cli/cmd/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ func listAvailableModels(cmd *cobra.Command, args []string) {

if customModelsOnly {
if len(customModels) > 0 {
term.PrintCmds("", "models", "set-model", "models create", "models delete")
term.PrintCmds("", "models", "set-model", "models add", "models delete")
} else {
term.PrintCmds("", "models create")
term.PrintCmds("", "models add")
}
} else {
term.PrintCmds("", "models available --custom", "models", "set-model", "models create", "models delete")
term.PrintCmds("", "models available --custom", "models", "set-model", "models add", "models delete")
}
}

Expand All @@ -336,7 +336,7 @@ func deleteCustomModel(cmd *cobra.Command, args []string) {
if len(models) == 0 {
fmt.Println("🤷‍♂️ No custom models")
fmt.Println()
term.PrintCmds("", "models create")
term.PrintCmds("", "models add")
return
}

Expand Down Expand Up @@ -402,7 +402,7 @@ func deleteCustomModel(cmd *cobra.Command, args []string) {
fmt.Printf("✅ Deleted custom model %s\n", color.New(color.Bold, term.ColorHiCyan).Sprint(string(modelToDelete.Provider)+" → "+modelToDelete.ModelName))

fmt.Println()
term.PrintCmds("", "models available", "models create")
term.PrintCmds("", "models available", "models add")
}

func renderSettings(settings *shared.PlanSettings) {
Expand Down
7 changes: 6 additions & 1 deletion app/shared/plan_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ const (
ModelProviderCustom ModelProvider = "custom"
)

var AllModelProviders = []string{string(ModelProviderOpenAI), string(ModelProviderTogether), string(ModelProviderCustom)}
var AllModelProviders = []string{
string(ModelProviderOpenAI),
string(ModelProviderOpenRouter),
string(ModelProviderTogether),
string(ModelProviderCustom),
}

var BaseUrlByProvider = map[ModelProvider]string{
ModelProviderOpenAI: OpenAIV1BaseUrl,
Expand Down
3 changes: 2 additions & 1 deletion releases/cli/versions/0.9.1.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Fix for occasional stream TUI panic during builds with long file paths (https://github.com/plandex-ai/plandex/issues/105)
- If auto-upgrade fails due to a permissions issue, suggest re-running command with `sudo` (https://github.com/plandex-ai/plandex/issues/97 - thanks @kalil0321!)
- If auto-upgrade fails due to a permissions issue, suggest re-running command with `sudo` (https://github.com/plandex-ai/plandex/issues/97 - thanks @kalil0321!)
- Include 'openrouter'in list of model providers when adding a custom model (https://github.com/plandex-ai/plandex/issues/107)
2 changes: 2 additions & 0 deletions releases/server/versions/0.9.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added an auto-verify and auto-fix step to plan builds to improve reliability and reduce syntax errors, mistaken duplication or removal of code, and other similar issues.
- Improvements to auto-continue check. It should now do a better job determining whether a plan is finished or should automatically continue.

0 comments on commit a940d2f

Please sign in to comment.