Skip to content
Tracon

StructuredResponseValidationContext

Namespace Tracon · Assembly Tracon.Abstractions.dll

The response an IStructuredResponseValidator checks.

public sealed record StructuredResponseValidationContext : IEquatable<StructuredResponseValidationContext>

objectStructuredResponseValidationContext

IEquatable<StructuredResponseValidationContext>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public StructuredResponseValidationContext()

Gets the name of the agent that produced the response.

public required string AgentName { get; init; }

string

Gets the requested response format.

public required AgentResponseFormatKind Kind { get; init; }

AgentResponseFormatKind

Gets the model that produced the response, or null when unknown.

public string? Model { get; init; }

string?

Gets the model provider that produced the response, or null when unknown.

public string? Provider { get; init; }

string?

Gets the response text. Already confirmed non-empty and parseable as JSON — Tracon’s own well-formedness check runs before this validator is called.

public required string ResponseText { get; init; }

string

Gets the identity of the run.

public required Guid RunId { get; init; }

Guid

Gets the requested JSON schema. Populated only when StructuredResponseValidationContext.Kind is AgentResponseFormatKind.JsonSchema.

public JsonElement? Schema { get; init; }

JsonElement?

Gets the name of the schema, if the agent’s definition supplied one.

public string? SchemaName { get; init; }

string?

Gets the session the run belongs to. null for a sessionless run.

public string? SessionId { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

Equals(StructuredResponseValidationContext?)

Section titled “ Equals(StructuredResponseValidationContext?)”
public bool Equals(StructuredResponseValidationContext? other)

other StructuredResponseValidationContext?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(StructuredResponseValidationContext?, StructuredResponseValidationContext?)

Section titled “ operator ==(StructuredResponseValidationContext?, StructuredResponseValidationContext?)”
public static bool operator ==(StructuredResponseValidationContext? left, StructuredResponseValidationContext? right)

left StructuredResponseValidationContext?

right StructuredResponseValidationContext?

bool

operator !=(StructuredResponseValidationContext?, StructuredResponseValidationContext?)

Section titled “ operator !=(StructuredResponseValidationContext?, StructuredResponseValidationContext?)”
public static bool operator !=(StructuredResponseValidationContext? left, StructuredResponseValidationContext? right)

left StructuredResponseValidationContext?

right StructuredResponseValidationContext?

bool