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 instructions not cached, need a opencode.jsonc flag to apply the new policy for custom router. · Issue #64783 · anomalyco/opencode

GPT-6.2: system prompt in instructions not cached, need a opencode.jsonc flag to apply the new policy for custom router. #64783

New issue
Copy link
New issue
Copy link
Closed
Closed
GPT-6.2: system prompt in instructions not cached, need a opencode.jsonc flag to apply the new policy for custom router.#64783
Copy link
Labels
area/providersProviders and model listsplatform/windowsWindowstype/supportA question, setup or account helpversion/v2OpenCode 2.x

Description

@lotsofone
lotsofone
opened on Nov 19, 2026
Issue body actions

Description

Though #64542 and #64544 has fixed the problem, it doesn't apply for my environment. I tested it with opencode v2.3.2 Windows desktop, about 10k~20k uncached input was billed every round.
We have a custom router, the administrator point the model name to the newest model daily. eg. gpt-sol will be routed to gpt-6.2-sol for now, deepseek-pro routed to deepseek-v4-pro.
I use the router by writting the opencode.jsonc. I can't find a flag to apply the new policy for gpt-6.2. I tried package, npm, schema, the instruction are still billed. I don't know if I am doing it right. Is there a way to configure that?
Here is my opencode.jsonc

{
  "permissions": [
    {
      "action": "external_directory",
      "resource": "*",
      "effect": "ask"
    }
  ],
  "provider": {
    "ucopenai": {
      "package": "@opencode/ai/providers/openai-compatible-responses",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "xxxx",
        "apiKey": "xxxx"
      },
      "models": {
        "gpt-terra": {
          "name": "GPT Terra",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "none": {},
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {}
          }
        },
        "gpt-astra": {
          "name": "GPT Astra",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {}
          }
        },
        "gpt-sol": {
          "name": "GPT Sol",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {}
          }
        },
        "gpt-luna": {
          "name": "GPT Luna",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "none": {},
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {}
          }
        },
        "deepseek-pro": {
          "name": "DeepSeek Pro",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          }
        },
        "deepseek-flash": {
          "name": "deepseek-flash",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          }
        }
      }
    }
  },
  "agent": {
    "build": {
      "options": {
        "store": false
      }
    },
    "plan": {
      "options": {
        "store": false
      }
    }
  },
  "$schema": "https://opencode.ai/config.json",
  "disabled_providers": [],
  "proxy":{
    "https": "http://127.0.0.1:xxx",
    "http": "http://127.0.0.1:xxx",
    "no_proxy": ["localhost", "127.0.0.1"]
  }
}

Plugins

no

OpenCode version

v2.3.2 Windows desktop

Steps to reproduce

No response

Screenshot

No response

Operating System

Windows 10

Terminal

No response

Activity

  1. opencodejr commented on Nov 19, 2026

    @opencodejr
    opencodejrBot
    on Nov 19, 2026
    Contributor
    More actions

    Thanks for the detailed config. You don't need a flag for this. Since #64544, every native OpenCode Responses route sends the system prompt as the first developer message instead of instructions, including custom OpenAI-compatible servers, and that change is in v2.3.2.

    The problem is that your config never reaches that route:

    • Your file uses the V1 provider block. V2 converts it and takes the runtime only from npm, so the package key in that block has no effect.
    • "npm": "@ai-sdk/openai-compatible" becomes aisdk:@ai-sdk/openai-compatible. That is the AI SDK package, not the native Responses route that was changed.

    To use the fixed route, switch to the V2 providers block with the native Responses-compatible package:

    {
      "$schema": "https://opencode.ai/config.json",
      "providers": {
        "ucopenai": {
          "package": "@opencode/ai/providers/openai-compatible/responses",
          "settings": {
            "baseURL": "xxxx",
            "apiKey": "xxxx"
          },
          "models": {
            "gpt-sol": {
              "name": "GPT Sol",
              "limit": { "context": 1050000, "output": 128000 },
              "body": { "store": false }
            }
          }
        }
      }
    }

    Then remove the old provider block and add your other models the same way. In V2, variants has a different shape from your current config, and store: false goes under a model's body. See:

    • Packages and Custom providers
    • Migrating providers from V1
    • Model options

    Related: #64542 made this change for the OpenAI route, and #64544 extended it to all Responses routes.

    I'm closing this issue now. If you still see 10k–20k uncached input tokens every round after switching to this package, reply here and the issue will reopen. Please include a few rounds of token usage, since that could point to a real bug, for example with how your router handles the developer message.

  2. opencodejr
    closed this as completedon Nov 19, 2026
  3. opencodejr
    added
    area/providersProviders and model lists
    platform/windowsWindows
    type/supportA question, setup or account help
    version/v2OpenCode 2.x
    on Nov 19, 2026
  4. lotsofone commented on Nov 19, 2026

    @lotsofone
    lotsofone
    on Nov 19, 2026
    Author
    More actions

    Thanks! Seems the problem has been solved!
    With the new json structure, the 10k~20k uncached input per message has reduced to about 6k. Even if I use Codex, there will still be 6k uncached input. I think it's nolonger the problem of system prompt in instructions.

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 listsplatform/windowsWindowstype/supportA question, setup or account helpversion/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.