Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions config/config.yaml

This file was deleted.

7 changes: 6 additions & 1 deletion internal/providers/anthropic/anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
p := New(cfg.APIKey)
// Override base URL if provided in config
if cfg.BaseURL != "" {
p.baseURL = cfg.BaseURL
p.SetBaseURL(cfg.BaseURL)
}
return p, nil
})
Expand Down Expand Up @@ -60,6 +60,11 @@ func NewWithHTTPClient(apiKey string, client *http.Client) *Provider {
}
}

// SetBaseURL allows configuring a custom base URL for the provider
func (p *Provider) SetBaseURL(url string) {
p.baseURL = url
}

// Supports returns true if this provider can handle the given model
func (p *Provider) Supports(model string) bool {
return strings.HasPrefix(model, "claude-")
Expand Down
7 changes: 6 additions & 1 deletion internal/providers/gemini/gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
p := New(cfg.APIKey)
// Override base URL if provided in config
if cfg.BaseURL != "" {
p.baseURL = cfg.BaseURL
p.SetBaseURL(cfg.BaseURL)
}
return p, nil
})
Expand Down Expand Up @@ -63,6 +63,11 @@ func NewWithHTTPClient(apiKey string, client *http.Client) *Provider {
}
}

// SetBaseURL allows configuring a custom base URL for the provider
func (p *Provider) SetBaseURL(url string) {
p.baseURL = url
}

// Supports returns true if this provider can handle the given model
func (p *Provider) Supports(model string) bool {
return strings.HasPrefix(model, "gemini-")
Expand Down
7 changes: 6 additions & 1 deletion internal/providers/openai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
p := New(cfg.APIKey)
// Override base URL if provided in config
if cfg.BaseURL != "" {
p.baseURL = cfg.BaseURL
p.SetBaseURL(cfg.BaseURL)
}
return p, nil
})
Expand Down Expand Up @@ -56,6 +56,11 @@ func NewWithHTTPClient(apiKey string, client *http.Client) *Provider {
}
}

// SetBaseURL allows configuring a custom base URL for the provider
func (p *Provider) SetBaseURL(url string) {
p.baseURL = url
}

// Supports returns true if this provider can handle the given model
func (p *Provider) Supports(model string) bool {
return strings.HasPrefix(model, "gpt-") || strings.HasPrefix(model, "o1")
Expand Down