Integrate task-model assignment routing via cf-orch /api/inference/task #135
Labels
No labels
accessibility
backlog
beta-feedback
bug
duplicate
enhancement
feature-request
help wanted
invalid
needs-design
needs-triage
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/kiwi#135
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
cf-orch #60 shipped a three-layer task-model assignment system:
assignments.yaml):product.task → model_idmodel_registry.yaml):model_id → {service_type, vram_mb, alias, ...}This exposes a new endpoint:
POST /api/inference/taskwhich accepts{product, task, prompt, ...}and resolves the right model+node automatically — no hardcoded model IDs or service type checks in product code.Spec:
circuitforge-plans/circuitforge-orch/superpowers/specs/2026-05-13-task-model-assignments-design.mdWhat needs to change in Kiwi
1. Register tasks in
assignments.yaml2. Migration path for call sites
services/coordinator_proxy.py— main cf-orch proxy layerservices/meal_plan/llm_router.py— meal plan LLM routingservices/meal_plan/llm_planner.py— planner callsservices/ocr/vl_model.py— vision/OCR model selectionReplace explicit model selection with
POST /api/inference/taskcalls using{"product": "kiwi", "task": "<task_name>", ...}.Note for vision tasks (ocr, barcode_scan): The model registry
service_typeshould be set tocf-visionfor these entries. The/api/inference/taskendpoint allocates appropriately based on service_type from Layer 2.3. Backwards compatibility
This is opt-in — existing
POST /api/inferencecalls continue to work. Migrate call sites incrementally.Acceptance Criteria
assignments.yamlhas entries for kiwi tasks (at minimummeal_planandrecipe_generation)services/coordinator_proxy.pyorllm_router.pymigrated to/api/inference/taskservice_type: cf-visionin model registryRelated
circuitforge-plans/circuitforge-orch/superpowers/specs/2026-05-13-task-model-assignments-design.md