Fix Anthropic requests failing due to missing MaxTokens in agent configuration

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-13 18:24:02 +01:00
parent 356de5ab19
commit 7c77c217c7
14 changed files with 29 additions and 10 deletions

View File

@@ -59,6 +59,7 @@ type (
llmClient *llm.Client
llmModel string
llmTemperature float64
llmMaxTokens int
html2pdfConverter *html2pdf.Converter
acmeService *certmanager.ACMEService
fileManager *filemanager.Service
@@ -132,6 +133,7 @@ func NewService(
llmClient *llm.Client,
llmModel string,
llmTemperature float64,
llmMaxTokens int,
html2pdfConverter *html2pdf.Converter,
acmeService *certmanager.ACMEService,
fileManagerService *filemanager.Service,
@@ -157,6 +159,7 @@ func NewService(
llmClient: llmClient,
llmModel: llmModel,
llmTemperature: llmTemperature,
llmMaxTokens: llmMaxTokens,
html2pdfConverter: html2pdfConverter,
acmeService: acmeService,
fileManager: fileManagerService,
@@ -178,7 +181,7 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
baseURL: s.baseURL,
scope: coredata.NewScope(tenantID),
tokenSecret: s.tokenSecret,
agent: agents.NewAgent(nil, s.llmClient, s.llmModel, s.llmTemperature),
agent: agents.NewAgent(nil, s.llmClient, s.llmModel, s.llmTemperature, s.llmMaxTokens),
fileManager: s.fileManager,
esign: s.esign,
}