You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: extract Vertex AI timeout and max tokens to named constants #82
PR #79 updated Timeout from 120s to 300s and MaxTokens from 4096 to 16000 in llm/vertex.go. These values are inline literals with explanatory comments. The existing codebase already defines retry-related values as named constants (vertexSynthMaxRetries, vertexSynthBaseDelay, vertexSynthMaxDelay) in the same file — the timeout and max tokens should follow the same pattern for consistency.
Convention: CS-007 (magic numbers should be named constants)
What to change
In llm/vertex.go, add two named constants to the existing const block:
const (
vertexSynthMaxRetries=5vertexSynthBaseDelay=1*time.SecondvertexSynthMaxDelay=60*time.Second+// vertexSynthTimeout is the HTTP client timeout for Vertex AI requests.+// Large curation prompts (36K+ tokens) need ~120-180s for response generation.+vertexSynthTimeout=300*time.Second+// vertexSynthMaxTokens is the maximum output tokens for Vertex AI responses.+// Curation extractions routinely exceed 4K tokens; 16K provides headroom.+vertexSynthMaxTokens=16000
)
Then replace the inline literals:
// line 85
Timeout: vertexSynthTimeout,
// line 119
MaxTokens: vertexSynthMaxTokens,
Scope
File: llm/vertex.go (2 lines changed)
Tests: No test changes needed — values are not asserted directly
Activity