symfonic.memory.models.context¶
context ¶
AssembledContext and ContextBudget models.
Deprecated: These models are no longer used by the active hydration path. Hydration is handled by SymfonicAgent._hydrate() which returns HydratedMemory. MemoryOrchestrator.hydrate_context() which produces AssembledContext is never called by anyone in the current codebase.
AssembledContext ¶
Bases: BaseModel
Fully assembled context ready for LLM consumption.
.. deprecated:: AssembledContext is deprecated. Hydration is handled by SymfonicAgent._hydrate() which returns HydratedMemory.
Source code in src/symfonic/memory/models/context.py
is_within_budget ¶
Check whether this context respects all budget constraints.
Returns True if all component counts are within the budget limits.
max_memory_entries was removed in v5.6.0 (v6.0 API freeze prep);
memory-entry count is no longer budget-enforced -- the live
SymfonicAgent._hydrate path uses max_tokens instead.
Source code in src/symfonic/memory/models/context.py
ContextBudget ¶
Bases: BaseModel
Defines the limits for context assembly.
.. deprecated:: ContextBudget is deprecated. Budget constraints are now handled internally by SymfonicAgent._hydrate() via FrameworkConfig.
Source code in src/symfonic/memory/models/context.py
framework_default
classmethod
¶
The framework's own default, built without the adopter-facing warning.
OrchestratorConfig.context_budget needs an instance, and taking it
from __init__ made the framework fire a deprecation about its own
default on the first line of every platform program — pinned as EX-3 in
the warning budget and recorded there as "not actionable by an adopter",
because there was nothing for them to change.
A deprecation warns whoever chose the deprecated thing. Nobody chose
this one, so nobody is warned for it. An adopter who constructs
ContextBudget() is still warned, and a test pins both halves.
model_construct rather than a suppressed __init__: suppression
needs warnings.catch_warnings, which mutates process-global filter
state and would briefly swallow another thread's warnings. Validation
loses nothing here — every field is a literal default this class
declares, with no input to check.