Repository navigation
feat(kin): a price table for the carry cost gate - #1088
Merged
Merged
Conversation
Mark the existing instructions as a reusable prefix and default shared chats to the same cache lifetime as the owner's chat. Record relative prices for known Claude models without activating a cost rule. People-change: none Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Fresh sessions still rematerialize Kin's instructions through the gateway, even with equivalent plain API calls or an explicit scope. Restore the plain custom prompt; keep the shared-chat cache lifetime and neutral price weights. People-change: none Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
With no instructions reused across fresh sessions, a one-hour write on shared chats only pays when a later wake arrives 5-60 minutes after the last request with the same prefix. On the recorded week that is 7 of 35 wakes against a break-even of 88%, so an install that honours the marker pays about $0.07 more per shared wake; the recorded gateway bills every write at one hour already, so there it changes nothing. Restore kin's lifetime rule and pin it: owner 1h by default, explicit lifetimes win, shared, bills, review and triage seats unset. cacheWeights stays. People-change: none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joins fix/kin-cache-instructions-boundary (46045f8). No conflict. Net of its three commits, it adds only cacheWeights(driver, model) in turn/providers/provider.ts and tests that every seat's request matches kin; the instructions boundary and the shared-chat lifetime were reverted on the branch. Step 2's cost gate now prices with this export. People-change: none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly, and four models re-confirmed for train 16
With step 5's cacheWeights(driver, model) on the line, the optional shim
in WakeupRunner ("until then no turn is priced") is no longer true: call
the export directly. The test's comment no longer names a branch.
Re-confirm money, tasks, discussion and reply (their READMEs name
work/bills.ts, lead/LeadPrompt.ts and lead/WakeupRunner.ts): no spec
change, every rule holds and every broken variant is caught. No pin moved.
People-change: none
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
People-change: none Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The carry cost gate (train 16's step 2) needs each model's relative token prices to tell whether continuing a session costs more than a fresh start. Kin had no such table, so the gate could never fire.
What changed:
cacheWeights(driver, model)in the turn provider gives relative prices for Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5, in units of plain input: read, 5-minute write, 1-hour write and output. Any other driver or model gets nothing, so the gate stays silent for it.People-change: none
Checked as part of train 16's one check at the tip.
An independent review (Claude Opus 5.5) found it LANDS AFTER FIXES. It dropped the shared-chat lifetime with a failing test first, and that commit is on this branch.
🤖 Generated with Claude Code