Part of #70
Question
The v2 context hook's SessionContext.model is a Model.Ref ({ providerID, id, variant? } — Model.ID is under id, verified in @opencode-ai/schema@beta model.js), but captureSessionContext (src/runtime/chat-capture.ts) reads input.model?.modelID and orchestrator.ts declares model?: { modelID?: string }. Under the real hook, lastModelID is never captured, so every model:-conditioned rule silently fails to match.
Fix the capture (read model.id, keep modelID as the internal RuleMatchContext field name), update the V2SessionContextInput type, and adjust test fixtures that pass { modelID: 'x' } as the hook's model ref. Also check whether the variant suffix (model#high parsing) matters for model: matching and decide accept/defer.
Part of #70
Question
The v2
contexthook'sSessionContext.modelis aModel.Ref({ providerID, id, variant? }—Model.IDis underid, verified in@opencode-ai/schema@betamodel.js), butcaptureSessionContext(src/runtime/chat-capture.ts) readsinput.model?.modelIDandorchestrator.tsdeclaresmodel?: { modelID?: string }. Under the real hook,lastModelIDis never captured, so everymodel:-conditioned rule silently fails to match.Fix the capture (read
model.id, keepmodelIDas the internalRuleMatchContextfield name), update theV2SessionContextInputtype, and adjust test fixtures that pass{ modelID: 'x' }as the hook's model ref. Also check whether the variant suffix (model#highparsing) matters formodel:matching and decide accept/defer.