{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "sidekick_usage_log_base", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1 }, "entity_type": { "type": "string", "minLength": 1, "readOnly": true }, "created_on": { "type": "string", "format": "date-time", "readOnly": true }, "user_id": { "type": "integer", "format": "int32", "readOnly": true }, "organization_id": { "type": "integer", "format": "int32", "nullable": true }, "request_id": { "type": "string", "maxLength": 64, "nullable": true }, "route_module": { "type": "string", "minLength": 1, "maxLength": 64 }, "route_full_path": { "type": "string", "minLength": 1, "maxLength": 2048 }, "route_entity_type": { "type": "string", "maxLength": 64, "nullable": true }, "route_entity_id": { "type": "string", "maxLength": 64, "nullable": true }, "route_parent_id": { "type": "string", "maxLength": 64, "nullable": true }, "prompt": { "type": "string", "minLength": 1, "maxLength": 16000 }, "chat_history_len": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 1000 }, "response": { "type": "string", "maxLength": 32000, "nullable": true }, "stop_reason": { "type": "string", "maxLength": 32, "nullable": true }, "model": { "type": "string", "minLength": 1, "maxLength": 128 }, "input_tokens": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 10000000 }, "output_tokens": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 10000000 }, "input_cost_usd": { "type": "number", "minimum": 0, "maximum": 999999.999999 }, "output_cost_usd": { "type": "number", "minimum": 0, "maximum": 999999.999999 }, "total_cost_usd": { "type": "number", "minimum": 0, "maximum": 999999.999999 }, "tool_rounds": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 100 }, "tool_call_count": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 1000 }, "tool_calls": { "type": "array", "nullable": true, "maxItems": 100, "items": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 128 }, "input": { "type": "object", "additionalProperties": true }, "is_error": { "type": "boolean" } }, "required": [ "name" ] } }, "error_code": { "type": "string", "maxLength": 64, "nullable": true }, "duration_ms": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 600000, "nullable": true } }, "required": [ "id", "entity_type", "created_on", "user_id", "route_module", "route_full_path", "prompt", "model", "input_tokens", "output_tokens", "input_cost_usd", "output_cost_usd", "total_cost_usd", "tool_rounds", "tool_call_count" ] }