LLMRouter: accept inline config dict in addition to Path #59
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Product ingest scripts (e.g. pagepiper
ingest_pdf.py,ingest_epub.py) need to pass a runtime-constructed config dict toLLMRouterrather than a file path, because the Ollama URL and model names come from product-specific env vars (PAGEPIPER_OLLAMA_URL,PAGEPIPER_EMBED_MODEL) rather than a sharedllm.yaml.What happened
LLMRouter.__init__only accepted aPath. Passing a dict causedAttributeError: 'dict' object has no attribute 'exists'atconfig_path.exists().Fix shipped (2026-05-05)
Changed the signature to
def __init__(self, config_path: Path | dict = CONFIG_PATH)and added aisinstance(config_path, dict)branch that assigns the dict directly toself.config.Needs: test coverage for the dict init path, and a version bump.
Labels