File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ func WithHTTPClient(client option.HTTPClient) Option {
122122
123123func (a * provider ) LanguageModel (ctx context.Context , modelID string ) (fantasy.LanguageModel , error ) {
124124 clientOptions := make ([]option.RequestOption , 0 , 5 + len (a .options .headers ))
125+ clientOptions = append (clientOptions , option .WithMaxRetries (0 ))
126+
125127 if a .options .apiKey != "" && ! a .options .useBedrock {
126128 clientOptions = append (clientOptions , option .WithAPIKey (a .options .apiKey ))
127129 }
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ func WithUseResponsesAPI() Option {
134134// LanguageModel implements fantasy.Provider.
135135func (o * provider ) LanguageModel (_ context.Context , modelID string ) (fantasy.LanguageModel , error ) {
136136 openaiClientOptions := make ([]option.RequestOption , 0 , 5 + len (o .options .headers )+ len (o .options .sdkOptions ))
137+ openaiClientOptions = append (openaiClientOptions , option .WithMaxRetries (0 ))
137138
138139 if o .options .apiKey != "" {
139140 openaiClientOptions = append (openaiClientOptions , option .WithAPIKey (o .options .apiKey ))
You can’t perform that action at this time.
0 commit comments