.NET API
TraconOutputTruncatedException
Tracon.Abstractions.dllThrown when the model stops at its output token limit before a structured (JSON) response is complete.
public sealed class TraconOutputTruncatedException : TraconException, ISerializable- Inheritance
- object ← Exception ← TraconException ← TraconOutputTruncatedException
- Implements
- ISerializable
- Inherited Members
- TraconException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The run fails with error type output_truncated, classified as
RunErrorClass.OutputTruncated. A cut-off JSON document cannot be
parsed, and asking the model again with the same limit cuts it off again, so
no structured-response repair turn runs. Raise
ModelBinding.MaxOutputTokens instead.
Detection lives in the same shared IChatClient decorator that detects a
provider’s content filter, so every provider that reports
ChatFinishReason.Length gets the same behaviour. A plain-text response
cut off the same way does not throw this exception; its run records a
RunEventCustomTypes.OutputTruncated event instead.
The message names the provider and the limit. It never carries the response text.
Constructors
Section titled “Constructors”TraconOutputTruncatedException()
Section titled “ TraconOutputTruncatedException()”Creates a new error.
public TraconOutputTruncatedException()TraconOutputTruncatedException(string)
Section titled “ TraconOutputTruncatedException(string)”Creates a new error.
public TraconOutputTruncatedException(string message)Parameters
Section titled “Parameters”message string
The error message. Must not carry the response text.
TraconOutputTruncatedException(string, Exception)
Section titled “ TraconOutputTruncatedException(string, Exception)”Creates a new error.
public TraconOutputTruncatedException(string message, Exception innerException)Parameters
Section titled “Parameters”message string
The error message. Must not carry the response text.
innerException Exception
The underlying error.
Fields
Section titled “Fields”OutputTruncatedErrorType
Section titled “ OutputTruncatedErrorType”The stable value written to TraconException.ErrorType.
public const string OutputTruncatedErrorType = "output_truncated"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ErrorType
Section titled “ ErrorType”Gets the stable error type name written to the run record.
public override string ErrorType { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaults to the full name of the exception type, so today’s behaviour does
not change. A derived type overrides this member when the record has to be
machine readable — for example TraconContentFilteredException
writes content_filtered. Reports and alert rules can rely on this
stable name instead of an assembly name.
The value is written to RunError.Type and carries no secret.
MaxOutputTokens
Section titled “ MaxOutputTokens”Gets the output token limit the request set, or null when the binding set none and the provider applied its own default.
public int? MaxOutputTokens { get; init; }Property Value
Section titled “Property Value”int?
ProviderName
Section titled “ ProviderName”Gets the provider whose model stopped at the limit, or null when unknown.
public string? ProviderName { get; init; }