Skip to content

feat(cli): exclude ChatGPT subscriptions from explicit promptCacheBreakpoint treatment - #13044

Merged
chrarnoldus merged 3 commits into
mainfrom
feat/exclude-chatgpt-from-prompt-cache-breakpoint
Aug 10, 2026
Merged

feat(cli): exclude ChatGPT subscriptions from explicit promptCacheBreakpoint treatment#13044
chrarnoldus merged 3 commits into
mainfrom
feat/exclude-chatgpt-from-prompt-cache-breakpoint

Conversation

@chrarnoldus

Copy link
Copy Markdown
Collaborator

Summary

@chrarnoldus chrarnoldus self-assigned this Aug 10, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/exclude-chatgpt-from-prompt-cache-breakpoint.md
  • packages/opencode/src/provider/transform.ts
  • packages/opencode/test/provider/transform.test.ts

Incremental review of 9b820d2 (since 2e5199a): the isChatGPTSubscriptionisLikelyChatGPTSubscription simplification drops the chatgpt.com URL check and keeps only the zero-cost heuristic. Verified against the production mechanism: CodexAuthPlugin's models hook zeroes cost for every OAuth model under providerID: "openai", so ChatGPT subscription models are still excluded; the dropped URL branch only covered manual configs targeting the Codex backend endpoint, which requires OAuth (and thus zeroed cost) to function at all. The rename is applied consistently with no stale references, the removed endpoint test matches the removed branch, and the remaining zero-cost test exercises the real implementation. Changeset unchanged and user-facing. Note: the PR description still mentions the chatgpt.com endpoint check — worth a minor edit for accuracy, not blocking.

Previous Review Summary (commit 2e5199a)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 2e5199a)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/exclude-chatgpt-from-prompt-cache-breakpoint.md
  • packages/opencode/src/provider/transform.ts
  • packages/opencode/test/provider/transform.test.ts

Verified the isChatGPTSubscription heuristic against the actual production mechanism: CodexAuthPlugin zeroes cost for OAuth models under providerID: "openai", and the chatgpt.com URL check covers direct backend endpoint configuration. The supportsPromptCacheBreakpoint(modelId)(model) signature change is applied consistently at both call sites, existing positive coverage (standard API-key gpt-5.6 with non-zero cost) remains intact, and the new tests exercise the real implementation without mocks. Changeset is present and user-facing.


Reviewed by kimi-k3 · Input: 35.5K · Output: 5.6K · Cached: 253.9K

Review guidance: REVIEW.md from base branch main

…euristic

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus
chrarnoldus merged commit ff6f207 into main Aug 10, 2026
30 checks passed
@chrarnoldus
chrarnoldus deleted the feat/exclude-chatgpt-from-prompt-cache-breakpoint branch August 10, 2026 13:37
function supportsPromptCacheBreakpoint(modelId: string): boolean {
const match = modelId.match(/gpt-(\d+)\.(\d+)/)
// kilocode_change start - explicit prompt cache breakpoints for GPT-5.6+ (excluding ChatGPT subscriptions)
function isLikelyChatGPTSubscription(model: Provider.Model): boolean {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this is joke!

t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…from-prompt-cache-breakpoint

feat(cli): exclude ChatGPT subscriptions from explicit promptCacheBreakpoint treatment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants