Skip to main content

Prompt Efficiency

Bound output length, remove repeated context and choose a capable model for the task. Measure quality and cost on representative prompts before changing production defaults. Provider-native output limits differ; do not apply one provider's parameter names to another.

The quickstarts use max_tokens for OpenAI/Anthropic and generationConfig.maxOutputTokens for Google. These are bounded demonstration outputs, not an application quality target. Model-specific token and feature support still apply.

Keep conversation history within the selected model's context window. STICKY continuity can retain the conversation's selected model. Choosing models · routing.