Cohere Constraints
Parameter Limits:
- Strict Tools: Cannot be enabled without defining specific tools/functions.
- Frequency/Presence Penalty: Must be between 0 and 1. Values >= 2 will fail.
- K (Top K): Must be between 0 and 500.
- P (Top P): Must be between 0 and 1.
- Temperature: Must be between 0 and 2.0.
- Seed: Must be a positive integer (uint64). Negative values cause errors.
- Safety Mode: Not supported by all models (e.g., command-light). Use compatible models if setting this parameter.
- Permissions: Accessing Cohere requires the specific Cohere Permission Set assigned to the user. The generic “All AI Providers” set may not be sufficient.
Perplexity Constraints
- Deep Research Models: Models like sonar-deep-research have long processing times. This may trigger Salesforce’s 120-second timeout limit for callouts, resulting in a “Read timed out” error.
- Response Format: The Response Format field requires a strict dictionary structure (JSON). Entering plain text like “json” will fail.
- Return Images: Some text-based models do not support returning images even if the checkbox is enabled.
Gemini & Vertex AI Constraints
- Max Output Tokens: Must be a positive integer (>= 1). Setting this to 0 or negative values triggers an INVALID_ARGUMENT error.
- Top K: Must be non-negative. Setting a negative value (e.g., -40) causes an error.
- Image Generation: The Imagen 3 model is accessible only to billed users/projects. Free tier projects will receive an access error.
General Platform Limits (All Providers)
- Image Generation Timeout: Generating high-resolution or multiple variations of images (e.g., via DALL-E or Veo) may take longer than 120 seconds, causing a Salesforce timeout error (Read timed out) even if the AI successfully generated the content in the background.
- Heap Size Limit: Uploading multiple large files or generating too many image variations in a single request can hit the Salesforce Apex Heap Size limit (approx. 6MB for synchronous transactions), resulting in STRING_TOO_LONG or “Heap size too large” errors.