Config¶
G6 configuration v3.0 — Settings singleton with 100+ fields and 13 sub-config modules.
Cluster: Core Infrastructure | Type: component | MCP Tools: None
Overview¶
Pydantic-based settings singleton loaded from environment variables and .env files, providing central configuration for API keys, LLM timeouts, token caps, and CSF safety limits.
When to use:
- Accessing API keys and runtime configuration
- Setting LLM timeouts and token caps
- Configuring CSF safety bounds and allowed LLM base URLs
Example:
from mvp.config import settings
key = settings.openrouter_api_key
cap = settings.max_llm_tokens_cap # default 128_000
timeout = settings.default_llm_timeout_sec # default 60
Works well with: llm_router, agent_claude, align_csf
Public API¶
BiasEvolutionConfig(BaseModel)¶
EXPERIMENTAL: Self-evolving inductive bias system.
| Field | Type | Default |
|---|---|---|
enabled | bool | False |
auto_evolve | bool | False |
max_iterations_per_cycle | int | 5 |
safety_layers_required | int | 4 |
workspace_base_dir | str | '' |
always_on_memory_enabled | bool | False |
consolidation_interval_minutes | int | 30 |
theoretical_grounding_check | bool | True |
observability_required | bool | True |
require_premium_tier | bool | True |
auto_evolve_speed_threshold | float | 0.4 |
auto_evolve_cost_threshold | float | 0.4 |
auto_evolve_quality_threshold | float | 0.4 |
auto_evolve_cooldown | int | 10 |
ConfigInput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | str | required |
parameters | dict[str, Any] | Field(default_factory=dict) |
ConfigOutput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | str | '' |
result | dict[str, Any] | Field(default_factory=dict) |
message | str | '' |
completion_state | str | _COMPLETION_QUALIFIED |
warning_card | dict[str, Any] | Field(default_factory=dict) |
evidence | dict[str, Any] | Field(default_factory=dict) |
request_id | str | Field(default_factory=lambda: get_request_id() or new_request_id('req')) |
task_id | str | Field(default_factory=lambda: get_task_id() or new_request_id('task')) |
run_id | str | Field(default_factory=lambda: get_run_id() or new_request_id('run')) |
degraded | bool | False |
degradation_reason | str | '' |
ConfigBlock(AIBlock)¶
AIBlock wrapper for the G6 configuration subsystem.
Methods:
infer(input: ConfigInput) -> Result[ConfigOutput]¶
CSFBaseConfig(BaseModel)¶
Base CSF parameters for LLM safety bounds.
| Field | Type | Default |
|---|---|---|
allowed_llm_base_urls | list[str] | ['https://openrouter.ai/api/v1'] |
default_llm_timeout_sec | int | 60 |
default_llm_max_retries | int | 3 |
max_llm_tokens_cap | int | 128000 |
max_horizon_cap | int | 10000 |
default_state_limit | int | 50000 |
CSFTierConfig(BaseModel)¶
Per-tier safety thresholds for the job framework.
| Field | Type | Default |
|---|---|---|
safety_primary_max_steps | int | 3 |
safety_primary_epsilon | float | 0.1 |
safety_primary_timeout_sec | int | 120 |
safety_primary_tokens_per_min | int | 5000 |
safety_primary_human_review | bool | True |
safety_secondary_max_steps | int | 4 |
safety_secondary_epsilon | float | 0.15 |
safety_secondary_timeout_sec | int | 180 |
safety_secondary_tokens_per_min | int | 8000 |
safety_secondary_human_review | bool | True |
safety_tertiary_max_steps | int | 5 |
safety_tertiary_epsilon | float | 0.2 |
safety_tertiary_timeout_sec | int | 300 |
safety_tertiary_tokens_per_min | int | 10000 |
safety_tertiary_human_review | bool | False |
safety_quaternary_max_steps | int | 8 |
safety_quaternary_epsilon | float | 0.2 |
safety_quaternary_timeout_sec | int | 600 |
safety_quaternary_tokens_per_min | int | 15000 |
safety_quaternary_human_review | bool | False |
safety_quinary_max_steps | int | 10 |
safety_quinary_epsilon | float | 0.15 |
safety_quinary_timeout_sec | int | 600 |
safety_quinary_tokens_per_min | int | 12000 |
safety_quinary_human_review | bool | True |
DistillationConfig(BaseModel)¶
Hyperdistillation settings.
| Field | Type | Default |
|---|---|---|
enable_capture | bool | False |
enable_execution | bool | False |
confidence_threshold | float | 0.85 |
db_path | str | '' |
ContentStudioConfig(BaseModel)¶
business_manager content-studio cost gating and quality routing.
| Field | Type | Default |
|---|---|---|
max_daily_spend_usd | float | 5.0 |
require_user_confirm_above_usd | float | 0.5 |
prefer_local_when_quality_ge | float | 0.7 |
AccountingConfig(BaseModel)¶
business_manager accounting jurisdiction + fiscal year.
| Field | Type | Default |
|---|---|---|
tax_jurisdiction | Literal['AU', 'US', 'none'] | 'none' |
financial_year_start_month | int | 7 |
IntegrationsConfig(BaseModel)¶
Aggregate of all external integration sub-configs.
| Field | Type | Default |
|---|---|---|
obsidian | ObsidianConfig | ObsidianConfig() |
paid_apis | PaidAPIsConfig | PaidAPIsConfig() |
virtualbox | VirtualBoxConfig | VirtualBoxConfig() |
computer_use | ComputerUseConfig | ComputerUseConfig() |
claude_mem | ClaudeMemConfig | ClaudeMemConfig() |
flywheel | FlywheelConfig | FlywheelConfig() |
external_services | ExternalServicesConfig | ExternalServicesConfig() |
patch_service | PatchServiceConfig | PatchServiceConfig() |
content_studio | ContentStudioConfig | ContentStudioConfig() |
accounting | AccountingConfig | AccountingConfig() |
LLMConfig(BaseModel)¶
Configuration for LLM backend selection and endpoints.
| Field | Type | Default |
|---|---|---|
g6_llm_backend | str | 'disabled' |
g6_ollama_model | str | 'gpt-oss:20b' |
g6_ollama_base_url | str | 'http://localhost:11434' |
g6_safeguard_model | str | 'gpt-oss-safeguard' |
g6_safeguard_base_url | str | 'http://localhost:11434' |
g6_bonsai_base_url | str | 'http://localhost:8080' |
g6_bonsai_demo_path | str | '' |
MultimodalConfig(BaseModel)¶
Configuration for multimodal pipeline tools and outputs.
| Field | Type | Default |
|---|---|---|
comfyui_url | str | '' |
comfyui_api_key | str | '' |
ffmpeg_path | str | '' |
blender_path | str | '' |
media_output_dir | str | '' |
max_media_size_bytes | int | 100000000 |
piper_model_path | str | '' |
whisper_model | str | 'base' |
default_image_format | str | 'png' |
default_audio_format | str | 'wav' |
default_video_format | str | 'mp4' |
RecoveryConfig(BaseModel)¶
RTO/RPO recovery objectives (SOC 2 CC7.5).
| Field | Type | Default |
|---|---|---|
rto_hours | int | 4 |
rpo_hours | int | 24 |
backup_cron_schedule | str | '0 2 * * *' |
backup_retention_days | int | 30 |
backup_verify_enabled | bool | True |
backup_verify_cron_schedule | str | '0 3 1 * *' |
PersistenceConfig(BaseModel)¶
Persistence & backup settings.
| Field | Type | Default |
|---|---|---|
project_db_dir | str | '' |
enable_backup | bool | False |
backup_destination | str | '' |
backup_interval_minutes | int | 60 |
backup_max_size_mb | int | 500 |
jsonl_rotation_policy | str | 'size' |
jsonl_max_file_size_mb | int | 100 |
GitConfig(BaseModel)¶
Git tracking settings.
| Field | Type | Default |
|---|---|---|
enable_tracking | bool | False |
auto_commit | bool | True |
remote_url | str | '' |
push_on_phase_complete | bool | False |
branch_prefix | str | 'g6/' |
SecurityConfig(BaseModel)¶
Configuration for the security gateway and rate limiting.
| Field | Type | Default |
|---|---|---|
security_rate_limiter_backend | Literal['memory', 'redis'] | 'memory' |
security_redis_url | str | '' |
security_rate_limit_key_prefix | str | 'g6:ratelimit:' |
security_rate_limit_fail_closed | bool | True |
security_audit_retention_days | int | 365 |
SolverConfig(BaseModel)¶
Solver (15-Step Orchestrator) settings.
| Field | Type | Default |
|---|---|---|
default_operation_mode | str | 'semi_autonomous' |
default_llm_backend | str | 'ollama' |
default_ollama_model | str | Field(default_factory=_default_ollama_model) |
max_parallel_agents | int | 3 |
vote_margin_k | int | 1 |
max_retries_per_step | int | 3 |
step_timeout_seconds | int | 300 |
overall_timeout_seconds | int | 7200 |
degradation_enabled | bool | True |
degradation_cost_threshold_usd | float | 10.0 |
degradation_fallback_model | str | 'ollama/llama3' |
rosette_racket_path | str | '' |
rosette_timeout_seconds | int | 10 |
AutonomousOrchestratorConfig(BaseModel)¶
Autonomous orchestrator safety settings.
| Field | Type | Default |
|---|---|---|
max_cost_usd | float \| None | 10.0 |
max_tokens_per_hour | int | 1000000 |
kill_switch_path | str | '' |
StandardsConfig(BaseModel)¶
Configuration for professional standards verification.
| Field | Type | Default |
|---|---|---|
default_jurisdiction | str | 'INTL' |
default_failure_mode | str | 'grade' |
standards_auto_remediate_max_retries | int | 3 |
standards_verification_enabled | bool | True |
standards_llm_enabled | bool | True |
standards_consensus_threshold | float | 0.7 |
standards_checklist_threshold | float | 0.3 |