This commit is contained in:
Jordan Diaz
2026-05-08 21:31:28 +00:00
parent 0dabba5442
commit 44cb956f95
37 changed files with 2120 additions and 251 deletions

View File

@@ -45,7 +45,19 @@ class Settings(BaseSettings):
compaction_threshold_ratio: float = 0.80
context_reserve_ratio: float = 0.10
artifact_summary_max_chars: int = 2000
knowledge_base_max_tokens: int = 30_000
# KB inyectada como system prompt. Default 4k (antes 30k) — la doc
# oficial de M2.7 advierte que system prompts grandes degradan rendimiento.
# Top-2 docs medianos + cheat sheet ≈ 4k tokens caben con margen.
# Se sobrescribe per-agent via `agent.yaml.kb_max_tokens`.
knowledge_base_max_tokens: int = 4_000
# Cap absoluto del numero de docs incluidos (filtro tras ranking).
kb_top_n_docs: int = 2
# Penalty al `load_priority` de docs `load_when: [ranked]` para que
# no entren "por defecto" en el branch top_n, solo si rankean muy alto.
kb_ranked_penalty: int = 10
# Umbral de similitud por debajo del cual el ranking no es confiable
# y se usa el `load_priority` del frontmatter como tie-break.
kb_similarity_floor: float = 0.6
working_context_max_items: int = 20
tool_raw_output_max_chars: int = 2000
conversation_recent_raw_limit: int = 2