Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions devlog/2026-08-17_log-model-identity/REQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# REQ — log: model identity on transform lines

## Background

Analyzing a user log (omp issue #47 family, 2026-08-17): the compress-rejection loop could not be attributed to a model from the log alone — required environment forensics. All sibling adapters (omp #78, pi #156, proxy #164) are adding model identity in the same sweep.

## Requirements

- R1: The per-turn debug line (`transform-in`) must carry the model identity when the host provides it (`event.model`).
- R2: Format: `providerID/model.id` (matches the plugin's own model-limit resolution key). `null` when absent (V1 path has no model ref in scope).
- R3: Debug-only (existing `debug()` gate), no behavior change, no new dependency.

## Acceptance

- AC1: `transform-in` debug line includes `model` field on the V2 context path.
- AC2: typecheck clean; full suite green (54/54).
3 changes: 3 additions & 0 deletions devlog/2026-08-17_log-model-identity/WORKLOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# WORKLOG

- 2026-08-17: Added `model: event.model ? providerID/id : null` to the `transform-in` debug line in `runPipelineV2` (packages/billion-context-opencode/src/index.ts). V1 path untouched (no model ref in that scope; the V1 line already lacks per-model resolution). tsc clean, 54/54.
4 changes: 3 additions & 1 deletion packages/billion-context-opencode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ async function runPipelineV2(
const coveredIds = collectCoveredMessageIds(state)
const tokenCount = estimateTokens(cores, coveredIds)
const resolved = runtime.configFor(runtime.getModelLimit(sessionID))
debug("transform-in", { sid: sessionID, msgs: msgs.length, cores: cores.length, tokens: tokenCount, limit: resolved.modelContextLimit, blocks: state.blocks.length })
// Model identity on every transform line: weak-model compress-rejection
// loops must be attributable from logs alone (omp #78 family).
debug("transform-in", { sid: sessionID, model: event.model ? `${event.model.providerID}/${event.model.id}` : null, msgs: msgs.length, cores: cores.length, tokens: tokenCount, limit: resolved.modelContextLimit, blocks: state.blocks.length })

const turn = runtime.core.processTurn({
messages: cores,
Expand Down
Loading