@@ -144,7 +144,7 @@ type CalculateResponse struct {
144144type RepoSampleRequest struct {
145145 Owner string `json:"owner"`
146146 Repo string `json:"repo"`
147- SampleSize int `json:"sample_size,omitempty"` // Default: 50
147+ SampleSize int `json:"sample_size,omitempty"` // Default: 100
148148 Days int `json:"days,omitempty"` // Default: 60
149149 Config * cost.Config `json:"config,omitempty"`
150150}
@@ -154,7 +154,7 @@ type RepoSampleRequest struct {
154154//nolint:govet // fieldalignment: API struct field order optimized for readability
155155type OrgSampleRequest struct {
156156 Org string `json:"org"`
157- SampleSize int `json:"sample_size,omitempty"` // Default: 50
157+ SampleSize int `json:"sample_size,omitempty"` // Default: 100
158158 Days int `json:"days,omitempty"` // Default: 60
159159 Config * cost.Config `json:"config,omitempty"`
160160}
@@ -1478,18 +1478,18 @@ func (s *Server) parseRepoSampleRequest(ctx context.Context, r *http.Request) (*
14781478
14791479 // Set defaults
14801480 if req .SampleSize == 0 {
1481- req .SampleSize = 50
1481+ req .SampleSize = 100
14821482 }
14831483 if req .Days == 0 {
14841484 req .Days = 60
14851485 }
14861486
1487- // Validate reasonable limits (silently cap at 50 )
1487+ // Validate reasonable limits (silently cap at 100 )
14881488 if req .SampleSize < 1 {
14891489 return nil , errors .New ("sample_size must be at least 1" )
14901490 }
1491- if req .SampleSize > 50 {
1492- req .SampleSize = 50
1491+ if req .SampleSize > 100 {
1492+ req .SampleSize = 100
14931493 }
14941494 if req .Days < 1 || req .Days > 365 {
14951495 return nil , errors .New ("days must be between 1 and 365" )
@@ -1536,18 +1536,18 @@ func (s *Server) parseOrgSampleRequest(ctx context.Context, r *http.Request) (*O
15361536
15371537 // Set defaults
15381538 if req .SampleSize == 0 {
1539- req .SampleSize = 50
1539+ req .SampleSize = 100
15401540 }
15411541 if req .Days == 0 {
15421542 req .Days = 60
15431543 }
15441544
1545- // Validate reasonable limits (silently cap at 50 )
1545+ // Validate reasonable limits (silently cap at 100 )
15461546 if req .SampleSize < 1 {
15471547 return nil , errors .New ("sample_size must be at least 1" )
15481548 }
1549- if req .SampleSize > 50 {
1550- req .SampleSize = 50
1549+ if req .SampleSize > 100 {
1550+ req .SampleSize = 100
15511551 }
15521552 if req .Days < 1 || req .Days > 365 {
15531553 return nil , errors .New ("days must be between 1 and 365" )
0 commit comments