Context window and longer responses for Pegasus 1.5
Pegasus 1.5 now uses a context window of 261,120 tokens that covers the combined input and output of each request. The maximum response length increases to 98,304 tokens (up from 65,536). These changes apply to Sync analysis and Create an async analysis task.
For details about what counts toward the context window, see the Context window section. Pegasus 1.2 still enforces the prompt limit of 2,000 tokens and supports responses up to 4,096 tokens.
Truncated responses
When a response reaches the maximum response length or the context window, the platform returns the partial output and sets finish_reason to "length". A warning appears in the error field. Asynchronous tasks with truncated output keep status set to "ready" and return both result and error.
Pegasus 1.2 async analysis tasks now also return finish_reason set to "length" when the response reaches the maximum response length. Previously, async analysis tasks always returned "stop".
Token usage
Responses for Pegasus 1.5 now include the usage.input_tokens field. Use it with usage.output_tokens to track how much of the context window a request uses.
For parameter details, see Sync analysis and Create an async analysis task in the API Reference section. For truncation messages, see the Error codes page.