Resolve public documentation contract questions

This commit is contained in:
2026-07-29 13:53:33 +00:00
parent bcb327f643
commit c1cecb1ee8
10 changed files with 1164 additions and 23 deletions

View File

@@ -65,7 +65,6 @@ type RunRequest struct {
Vars map[string]string
Execution *ExecutionTargetOverride
Validation *OutputContract
Metadata map[string]string
}
// PreparedRun contains prepared prompt execution state. It does not include
@@ -106,7 +105,7 @@ type RunResult struct {
Usage TokenUsage `json:"usage"`
StartTime time.Time `json:"start_time,omitempty"`
EndTime time.Time `json:"end_time,omitempty"`
Duration time.Duration `json:"duration,omitempty"`
Duration time.Duration `json:"-"`
}
// ArtifactRef represents a reference to prompt input content.
@@ -118,12 +117,12 @@ type ArtifactRef struct {
// Artifact represents loaded artifact content.
type Artifact struct {
Name string
ContentType string
Body []byte
URI string
Size int64
Hash string
Name string `json:"name"`
ContentType string `json:"content_type"`
Body []byte `json:"body"`
URI string `json:"uri"`
Size int64 `json:"size"`
Hash string `json:"hash"`
}
// ArtifactReader resolves a prompt input reference into its content.
@@ -205,10 +204,10 @@ type OpenAICompatibleProfileConfig struct {
// ExecutionTargetPresence tracks which numeric runtime settings were explicit
// request overrides.
type ExecutionTargetPresence struct {
Temperature bool
MaxTokens bool
TopP bool
TimeoutSeconds bool
Temperature bool `json:"temperature"`
MaxTokens bool `json:"max_tokens"`
TopP bool `json:"top_p"`
TimeoutSeconds bool `json:"timeout_seconds"`
}
// OutputContract defines output and validation requirements.