Files
VianoBugAnalysis/src/viano_bug_analysis/schemas/llm-call-v1.schema.json
T

350 lines
7.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"operation": {
"const": "llm-round"
},
"operation_key": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"input_request_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"config_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"phase": {
"enum": [
"BUILDING_CASE",
"BUILDING_DIAGNOSIS",
"GENERATING_HYPOTHESES",
"INTERPRETING_CASE",
"INVESTIGATING_HYPOTHESES",
"REOPENED",
"VALIDATED"
]
},
"rounds": {
"type": "integer",
"minimum": 1
},
"request_ref": {
"type": "string",
"minLength": 1
},
"result_ref": {
"type": "string",
"minLength": 1
},
"retry_not_before": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"code": {
"type": [
"string",
"null"
]
},
"status": {
"enum": [
"SUCCESS",
"ERROR",
"RETRY_PENDING",
"BLOCKED"
]
},
"automatic_retry": {
"type": "boolean"
},
"format": {
"const": "viano-llm-call"
},
"format_version": {
"const": 1
},
"case_id": {
"type": "string",
"minLength": 1
},
"package_id": {
"type": "string",
"minLength": 1
},
"analysis_revision": {
"type": "integer",
"minimum": 0
},
"outcome": {
"type": "object",
"properties": {
"http_status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"attempts": {
"type": "array",
"items": {
"$ref": "#/$defs/http_attempt"
}
},
"metadata": {
"type": "object",
"properties": {
"attempts": {
"type": "array",
"items": {
"$ref": "#/$defs/http_attempt"
}
},
"reasoning_profile": {
"const": "investigation_review"
},
"reasoning_effort": {
"enum": [
"none",
"minimal",
"low",
"medium",
"high"
]
}
}
},
"diagnostics": {
"type": "object",
"properties": {
"input_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"max_output_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"output_characters": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"output_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"reasoning_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"response_bytes": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"finish_reason": {
"enum": [
"MAX_TOKENS",
"OTHER",
"SAFETY",
"STOP",
"content_filter",
"function_call",
"length",
"missing",
"stop",
"tool_calls",
"unknown"
]
},
"has_refusal": {
"type": "boolean"
},
"has_tool_calls": {
"type": "boolean"
},
"validation_keyword": {
"enum": [
"additionalProperties",
"anyOf",
"const",
"enum",
"maxItems",
"maximum",
"minItems",
"minimum",
"oneOf",
"pattern",
"required",
"type"
]
},
"cached_input_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"cache_created_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"cache_ttl_seconds": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"cache_status": {
"enum": [
"disabled",
"below_minimum",
"created",
"reused",
"fallback"
]
},
"validation_path": {
"type": "string",
"maxLength": 240
},
"validation_fields": {
"type": "array",
"maxItems": 8,
"items": {
"type": "string",
"maxLength": 64
}
},
"response_stage": {
"enum": [
"http_envelope",
"candidate",
"output_json"
]
},
"response_error": {
"enum": [
"invalid_json",
"json_policy",
"invalid_structure",
"root_not_object"
]
},
"parse_line": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
},
"parse_column": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 1000000000000
}
},
"additionalProperties": false
}
}
}
},
"$defs": {
"http_attempt": {
"type": "object",
"properties": {
"http_status": {
"type": "integer",
"minimum": 100,
"maximum": 599
}
}
}
},
"required": [
"operation",
"operation_key",
"input_request_hash",
"config_hash",
"phase",
"rounds",
"request_ref",
"result_ref",
"retry_not_before",
"code",
"status",
"format",
"format_version",
"case_id",
"package_id",
"analysis_revision",
"outcome"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"status": {
"enum": [
"RETRY_PENDING",
"BLOCKED"
]
}
}
},
"then": {
"properties": {
"retry_not_before": {
"type": "string",
"format": "date-time"
},
"code": {
"const": "LLM_UNAVAILABLE"
}
}
}
}
]
}