GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GPT-6.2: system prompt in top-level `instructions` is excluded from prompt caching · Issue #64550 · anomalyco/opencode

GPT-6.2: system prompt in top-level instructions is excluded from prompt caching #64550

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
GPT-6.2: system prompt in top-level instructions is excluded from prompt caching#64550
Copy link
Labels
area/providersProviders and model liststype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@hcrosse
hcrosse
opened on Nov 18, 2026
Issue body actions

Description

GPT-6.2 intentionally excludes top-level instructions from prompt caching on the Responses API. OpenAI confirmed to us that this is a deliberate GPT-6.2 change: the Responses API now places top-level instructions at the end of the model's input and does not cache them, so repeating an identical request shows no cache writes or reads. For reusable prompts, OpenAI recommends putting the static text in the first developer message of input, ahead of the user message, where it can be cached.

OpenCode sends its system prompt as instructions, so every GPT-6.2 request pays the full input rate for it. In our review sessions that was 12,926 tokens per request, making GPT-6.2 Sol reviews 2.85 times the cost of identical GPT-6.1 Sol reviews, which cache the same instructions normally.

Code location: packages/ai/src/protocols/open-responses.ts, lowerConversation,

opencode/packages/ai/src/protocols/open-responses.ts

Lines 827 to 833 in e92fbcf

export const lowerConversation = Effect.fnUntraced(function* (request: LLMRequest, adapter: ProviderAdapter) {
const instructions = ProviderShared.joinText(request.system)
return {
model: request.model.id,
input: yield* lowerMessages(request, adapter),
...(instructions ? { instructions } : {}),
}
.

Steps to reproduce

Send each request twice to /v1/responses (non-streaming, store: false, a 10.1k-token text with a unique prefix per pair, user input "Reply with the single word OK."):

Model Text sent as 1st request 2nd request
gpt-6.2-sol instructions written 0, cached 0 written 0, cached 0
gpt-6.2-sol developer message written 10,113 cached 10,113
gpt-6.1-sol instructions written 10,114 cached 10,114
gpt-6.1-sol developer message written 10,113 cached 10,113

Proposed fix

For GPT-6.2 and later, send the system prompt as a leading developer message instead of instructions, as OpenAI recommends. Earlier models can keep instructions, since they cache it.

OpenCode version

Dev build from 2026-11-13. The lowering is unchanged on dev at e92fbcf.

Activity

  1. opencodejr
    added
    area/providersProviders and model lists
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 18, 2026
  2. hcrosse commented on Nov 18, 2026

    @hcrosse
    hcrosse
    on Nov 18, 2026
    Author
    More actions

    Already fixed by #64542 and #64544, which send the system prompt as a leading developer message on every Responses route. Closing as a duplicate.

  3. hcrosse
    closed this as not plannedon Nov 18, 2026
  4. opencodejr commented on Nov 18, 2026

    @opencodejr
    opencodejrBot
    on Nov 18, 2026
    Contributor
    More actions

    Thanks for the detailed report and measurements. I can reproduce this on 2.2.7 but not on the latest dev (de291ab), so it's probably already fixed. The fix should be in the next release.

    What I checked: I ran opencode run with openai/gpt-6.2-sol against a local mock of the Responses endpoint and captured the request body. I didn't have a real OpenAI account, so I checked the request shape, not the cache numbers themselves.

    • 2.2.7: the system prompt goes in top-level instructions (about 10k characters) and input starts with the user message, as you described.
    • dev at de291ab: there is no instructions field. input starts with a developer message holding the system prompt, as OpenAI recommends. This comes from fix(ai): send the system prompt as a developer message on every Responses route #64544, which makes the change on every Responses route, not only OpenAI. On dev it applies to all models, not only GPT-6.2 and later.

    I'm closing this issue now. If it still happens on a newer version, reply here and it will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/providersProviders and model liststype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.