Files

194 lines
6.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.aftech.internal/article-consolidation/v1/runtime-config.schema.json",
"x-contract-version": "1.0.0",
"title": "RuntimeConfigContract",
"type": "object",
"required": [
"config_version",
"paths",
"roles",
"prompts",
"ecp",
"limits",
"pricing",
"langfuse",
"sqlite"
],
"properties": {
"config_version": {
"type": "string",
"minLength": 1,
"description": "Semantic version of the functional configuration; changes with any model/prompt/parameter adjustment and enters fingerprint"
},
"paths": {
"type": "object",
"required": ["output_dir", "sqlite_db"],
"properties": {
"output_dir": { "type": "string" },
"sqlite_db": { "type": "string" }
},
"additionalProperties": false
},
"roles": {
"type": "object",
"required": ["runtime_primary", "runtime_fallback"],
"properties": {
"runtime_primary": {
"type": "object",
"required": [
"role_config_version",
"provider",
"model",
"endpoint_url",
"timeout_seconds",
"max_retries",
"parameters",
"hygiene_prompt_version",
"hygiene_schema_version",
"enrichment_prompt_version",
"enrichment_schema_version"
],
"properties": {
"role_config_version": { "type": "string" },
"provider": { "type": "string" },
"model": { "type": "string" },
"endpoint_url": { "type": "string", "format": "uri" },
"timeout_seconds": { "type": "number", "minimum": 1 },
"max_retries": { "type": "integer", "minimum": 0 },
"parameters": {
"type": "object",
"additionalProperties": true
},
"hygiene_prompt_version": { "type": "string" },
"hygiene_schema_version": { "type": "string" },
"enrichment_prompt_version": { "type": "string" },
"enrichment_schema_version": { "type": "string" }
},
"additionalProperties": false
},
"runtime_fallback": {
"type": "object",
"required": [
"role_config_version",
"provider",
"model",
"endpoint_url",
"timeout_seconds",
"max_retries",
"parameters",
"hygiene_prompt_version",
"hygiene_schema_version",
"enrichment_prompt_version",
"enrichment_schema_version"
],
"properties": {
"role_config_version": { "type": "string" },
"provider": { "type": "string" },
"model": { "type": "string" },
"endpoint_url": { "type": "string", "format": "uri" },
"timeout_seconds": { "type": "number", "minimum": 1 },
"max_retries": { "type": "integer", "minimum": 0 },
"parameters": {
"type": "object",
"additionalProperties": true
},
"hygiene_prompt_version": { "type": "string" },
"hygiene_schema_version": { "type": "string" },
"enrichment_prompt_version": { "type": "string" },
"enrichment_schema_version": { "type": "string" }
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"prompts": {
"type": "object",
"required": ["article_content_hygiene", "article_sentiment_tags"],
"properties": {
"article_content_hygiene": {
"type": "object",
"required": ["path", "version", "hash"],
"properties": {
"path": { "type": "string" },
"version": { "type": "string" },
"hash": { "type": "string" }
},
"additionalProperties": false
},
"article_sentiment_tags": {
"type": "object",
"required": ["path", "version", "hash"],
"properties": {
"path": { "type": "string" },
"version": { "type": "string" },
"hash": { "type": "string" }
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"ecp": {
"type": "object",
"required": ["canonical_schema_reference", "classifier_module"],
"properties": {
"canonical_schema_reference": { "type": "string" },
"classifier_module": { "type": "string" }
},
"additionalProperties": false
},
"limits": {
"type": "object",
"required": ["max_input_bytes", "context_strategy"],
"properties": {
"max_input_bytes": {
"type": "integer",
"minimum": 1024,
"description": "Maximum byte size of raw input article JSON payload before candidate extraction"
},
"context_strategy": {
"type": "string",
"const": "fail_before_provider",
"description": "Strategy applied when input exceeds limit; strictly fails before calling provider"
}
},
"additionalProperties": false
},
"pricing": {
"type": "object",
"description": "Operational token pricing for cost reporting; does NOT alter functional execution fingerprint",
"required": ["primary_input_1k", "primary_output_1k", "fallback_input_1k", "fallback_output_1k"],
"properties": {
"primary_input_1k": { "type": "number", "minimum": 0.0 },
"primary_output_1k": { "type": "number", "minimum": 0.0 },
"fallback_input_1k": { "type": "number", "minimum": 0.0 },
"fallback_output_1k": { "type": "number", "minimum": 0.0 }
},
"additionalProperties": false
},
"langfuse": {
"type": "object",
"required": ["environment", "trace_content_policy"],
"properties": {
"environment": { "type": "string" },
"trace_content_policy": {
"type": "string",
"enum": ["metadata_only", "full_redacted"]
}
},
"additionalProperties": false
},
"sqlite": {
"type": "object",
"required": ["busy_timeout_ms"],
"properties": {
"busy_timeout_ms": { "type": "integer", "minimum": 100 }
},
"additionalProperties": false
}
},
"additionalProperties": false
}