fix(provider): local picolm provider no longer requires API key (#488)
- Added providerTypePicoLM constant for local picolm provider - Added explicit "picolm" case in provider selection that bypasses API key requirement - Added fallback case for models starting with "picolm/" - Local picolm provider now behaves like other local providers (claude-cli, codex-cli) Fixes #488 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
028605cfd0
commit
92d78fe7fd
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -304,6 +314,15 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) {
|
|||
sel.apiKey = cfg.Providers.VLLM.APIKey
|
||||
sel.apiBase = cfg.Providers.VLLM.APIBase
|
||||
sel.proxy = cfg.Providers.VLLM.Proxy
|
||||
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
|
||||
default:
|
||||
if cfg.Providers.OpenRouter.APIKey != "" {
|
||||
sel.apiKey = cfg.Providers.OpenRouter.APIKey
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue