Skip to content
Tracon

TraconImageOptions

Namespace Tracon · Assembly Tracon.Core.dll

Settings for the image-generation tool.

public sealed class TraconImageOptions
Inheritance
object ← TraconImageOptions
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The tool is off by default. Setting TraconImageOptions.Enabled to true registers generate_image only when an AI.IImageGenerator is also registered.

public TraconImageOptions()

Default configuration section name.

public const string SectionName = "Tracon:Images"

string

Gets or sets whether the image tool and operator endpoint are enabled.

public bool Enabled { get; set; }

bool

Gets or sets the most images one call may produce. Default is one.

public int MaxImagesPerRequest { get; set; }

int

Gets or sets the image model.

public string? Model { get; set; }

string?

Image model names are not inferred from a chat model. Providers use distinct model catalogues, and an inferred name could spend money on the wrong model.

Gets or sets the provider name used to find configured image prices.

public string? Provider { get; set; }

string?

Provider extensions set this value when it is empty. Set it explicitly when registering a custom AI.IImageGenerator.

Gets or sets the longest one generate_image call may run. Default is two minutes.

public TimeSpan Timeout { get; set; }

TimeSpan

The installation-wide Tracon:Tools:DefaultTimeout is 30 seconds, which suits a tool that reads a database or calls an API. Image generation does not belong in that class: a measured gpt-image-1 request routinely needs 30 to 35 seconds, so the generic default cut off a call that was about to succeed and the model was told it had failed.

A shorter value is legitimate for an installation that would rather fail fast. The charge is not lost either way: a call that outlives its timeout is cancelled, and if the provider finishes anyway the spend is recorded against the original call (ToolInvocationRecord.LateCompletedAt).

Must be from one millisecond to about 49.7 days; any other value fails at startup.