fix: local picolm provider no longer requires API key (#488)
- Add providerTypePicoLM constant for local picolm provider - Add explicit 'picolm' case in provider selection - Add fallback case for models starting with 'picolm/' - Local picolm provider now bypasses API key requirement - Fixes issue where local inference with GGUF models failed with 'no API key' error
This commit is contained in:
parent
028605cfd0
commit
c2495efc90
1 changed files with 19 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ const (
|
|||
providerTypeClaudeCLI
|
||||
providerTypeCodexCLI
|
||||
providerTypeGitHubCopilot
|
||||
providerTypePicoLM
|
||||
)
|
||||
|
||||
type providerSelection struct {
|
||||
|
|
@ -199,6 +200,15 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) {
|
|||
}
|
||||
sel.connectMode = cfg.Providers.GitHubCopilot.ConnectMode
|
||||
return sel, nil
|
||||
case "picolm":
|
||||
// Local picolm provider - no API key required
|
||||
workspace := cfg.WorkspacePath()
|
||||
if workspace == "" {
|
||||
workspace = "."
|
||||
}
|
||||
sel.providerType = providerTypePicoLM
|
||||
sel.workspace = workspace
|
||||
return sel, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,6 +310,15 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) {
|
|||
if sel.apiBase == "" {
|
||||
sel.apiBase = "https://api.mistral.ai/v1"
|
||||
}
|
||||
case strings.Contains(lowerModel, "picolm") || strings.HasPrefix(model, "picolm/"):
|
||||
// Local picolm provider - no API key required
|
||||
workspace := cfg.WorkspacePath()
|
||||
if workspace == "" {
|
||||
workspace = "."
|
||||
}
|
||||
sel.providerType = providerTypePicoLM
|
||||
sel.workspace = workspace
|
||||
return sel, nil
|
||||
case cfg.Providers.VLLM.APIBase != "":
|
||||
sel.apiKey = cfg.Providers.VLLM.APIKey
|
||||
sel.apiBase = cfg.Providers.VLLM.APIBase
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue