on main help sign in
fix(hyper): ensure it's possible to override with `HYPER_URL`
d89120cAndrey Nering
internal/agent/coordinator.go+2−3
@@ -778,9 +778,8 @@ func (c *coordinator) buildGoogleVertexProvider(headers map[string]string, optio
778 return google.New(opts...)
778 return google.New(opts...)
779}
779}
780
780
781−func (c *coordinator) buildHyperProvider(baseURL, apiKey string) (fantasy.Provider, error) {
781+func (c *coordinator) buildHyperProvider(apiKey string) (fantasy.Provider, error) {
782 opts := []hyper.Option{
782 opts := []hyper.Option{
783− hyper.WithBaseURL(baseURL),
784 hyper.WithAPIKey(apiKey),
783 hyper.WithAPIKey(apiKey),
785 }
784 }
786 if c.cfg.Config().Options.Debug {
785 if c.cfg.Config().Options.Debug {
@@ -842,7 +841,7 @@ func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model con
842 }
841 }
843 return c.buildOpenaiCompatProvider(baseURL, apiKey, headers, providerCfg.ExtraBody, providerCfg.ID, isSubAgent)
842 return c.buildOpenaiCompatProvider(baseURL, apiKey, headers, providerCfg.ExtraBody, providerCfg.ID, isSubAgent)
844 case hyper.Name:
843 case hyper.Name:
845− return c.buildHyperProvider(baseURL, apiKey)
844+ return c.buildHyperProvider(apiKey)
846 default:
845 default:
847 return nil, fmt.Errorf("provider type not supported: %q", providerCfg.Type)
846 return nil, fmt.Errorf("provider type not supported: %q", providerCfg.Type)
848 }
847 }