.NET API
TraconImageOptions
Tracon.Core.dllSettings 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()
Remarks
Section titled “Remarks”The tool is off by default. Setting TraconImageOptions.Enabled to true
registers generate_image only when an AI.IImageGenerator
is also registered.
Constructors
Section titled “Constructors”TraconImageOptions()
Section titled “ TraconImageOptions()”public TraconImageOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”Default configuration section name.
public const string SectionName = "Tracon:Images"Field Value
Section titled “Field Value”Properties
Section titled “Properties”Enabled
Section titled “ Enabled”Gets or sets whether the image tool and operator endpoint are enabled.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”MaxImagesPerRequest
Section titled “ MaxImagesPerRequest”Gets or sets the most images one call may produce. Default is one.
public int MaxImagesPerRequest { get; set; }Property Value
Section titled “Property Value”Gets or sets the image model.
public string? Model { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
Provider
Section titled “ Provider”Gets or sets the provider name used to find configured image prices.
public string? Provider { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Provider extensions set this value when it is empty. Set it explicitly when
registering a custom AI.IImageGenerator.
Timeout
Section titled “ Timeout”Gets or sets the longest one generate_image call may run. Default
is two minutes.
public TimeSpan Timeout { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.